Table of Contents | ||||
---|---|---|---|---|
|
...
Link | https://app.swaggerhub.com/apis/ehealthua/compositions/2.32.2#/main/createComposition |
Resource | /patients/composition |
Scope | composition:create |
Components | |
Using Dictionaries | API paragraph not found |
Using Microservices | API paragraph not found |
Protocol type | REST |
Request type | POST |
Sync/Async | Async |
Public/Private/Internal | Public |
...
Expand | ||
---|---|---|
| ||
|
Authorize
...
Check user scopes in order to perform this action (scope = 'composition:create')
return 401 (Unauthorized) in case of invalid scope(s)
Headers
API paragraph not found
Validation data request
prechecks - Initial checks of request
...
API paragraph not found
Processing
...
input data
If “relatesTo” isn’t null:
For Newborn Composition:
Validate that replacement is enabled
In case of error (replacement isn’t enabled) - return 1181 (REPLACEMENT_FLOW_NOT_IMPLEMENTED_YET)
For Temporary Disability Composition:
If Composition.subject=person in current composition, Composition.subject = preperson (in indicated composition in relatesTo.target.identifier) and composition.status is FINAL, then the Refinement process is initiated
If Composition.status in indicated composition in relatesTo.target.identifier is ENTERED_IN_ERROR and replacement is enabled, then the Raplacement process is initiated
In case of error (replacement isn’t enabled) - return 1181 (REPLACEMENT_FLOW_NOT_IMPLEMENTED_YET)
in other cases - return 1160 (INVALID_REPLACEMENT_ARGUMENT)
For Newborn Composition:
Encounter Processing - Receiving and processing medical records (Encounter)
Employee Processing - Receiving and processing Employee record (Composition.author)
Division Processing - Receiving and processing Devision record (Employee Devision)
Legal Entity Processing - Receiving and processing Legal Entity record (Employee Legal Entity)
Subject Processing - Receiving and processing Subject record
Focus Processing - Receiving and processing Focus record
getSmsPhoneNumber - Receiving phone number for sending SMS about creation of composition
Saving the record of the Сomposition into database
Task status updating in DONE
Processing
prechecks - Initial checks of request input data
Encounter Processing - Receiving and processing medical records (Encounter)
Employee Processing - Receiving and processing Employee record (Composition.author)
Division Processing - Receiving and processing Devision record (Employee Devision)
Legal Entity Processing - Receiving and processing Legal Entity record (Employee Legal Entity)
Subject Processing - Receiving and processing Subject record
Focus Processing - Receiving and processing Focus record
getSmsPhoneNumber - Receiving phone number for sending SMS about creation of composition
Saving the record of the Сomposition into database
Task status updating in DONE
Response structure
...
Expand | ||
---|---|---|
| ||
|
Post-processing processes
...
HTTP status code | Message | What caused the error |
---|---|---|
200 | In case of successful creation of the task on for creation of the Composition creation |
|
400 | Invalid request format | Validation failed |