Info |
---|
REST API method / Метод REST API (настанова) (remove the link block before publishing the document) |
Properties of a REST API method document
Page Properties |
---|
id | page_properties_method_REST API |
---|
|
|
Purpose
Цей метод дозволяє створити композицію всіх типів і категорій для особи/передособи в eHealth.
Використовується в процесах:
2.1. МВН - Створення нового
2.2. МВТН - Створення нового
Logic
...
Expand |
---|
|
MIS/Medical employee->Compositions: Create Composition POST/patients/composition Compositions->Compositions: Check user scopes authorization composition:create Compositions-->MIS/Medical employee: In case of error HTTP/401 Compositions->Compositions: Async job planning Compositions->MIS/Medical employee: Async job details Compositions<->eHealth:data clarification and verification about author, custodsan, diagnosis etc Compositions->Compositions:Create and save Composition according to the XML template Compositions->Compositions:Async job Completed MIS/Medical employee->Compositions: GET/patients/composition/job/{asyncJobId} Compositions->MIS/Medical employee:Async job completed (conclusionAsyncJobListItem.href) MIS/Medical employee->Compositions:GET/patients/{patientId}/composition/{compositionId}/episode/{episodeId}/encounter/{encounterId} Compositions->MIS/Medical employee: Composition in PRELIMINARY status MIS/Medical employee->MIS/Medical employee:Signs document and gives to patient MIS/Medical employee->Compositions:Sign Composition PATCH /patients/composition/{compositionId}/sign Compositions->Compositions:Check user scopes authorization composition:sign Compositions-->MIS/Medical employee: In case of error HTTP/401 Compositions->MIS/Medical employee: HTTP/200 Async job Created Compositions<->eHealth:Signature and author validation Compositions->Compositions:Save object on SWIFT/S3 Compositions->Compositions:Schedule of trigger interactions (DIIA,MJU_DRACZ,ERLN,MPI,Closure) MIS/Medical employee->Compositions:GET /patients/composition/job/{asyncJobId} Compositions->MIS/Medical employee:Async job completed (conclusionAsyncJobListItem.href) MIS/Medical employee->Compositions:GET/patients/{patientId}/composition/{compositionId}/episode/{episodeId}/encounter/{encounterId} Compositions->MIS/Medical employee:Composition in FINAL status |
Configuration parameters
Description of the configuration parameters that are used when processing a request in the system
Dictionaries
СКЛАД_КАТЕГОРІЇ
КОМПОЗИЦІЯ_ТИПИ
КОМПОЗИЦІЯ_ПОДІЇ
eHealth/ресурси
Input parameters
Description of input parameters
| Input parameter | Mandatory | Type | Description | Example |
---|
1 | composition_id | M | String ($uuid) (path) | Composition object ID | 89678f60-4cdc-4fe3-ae83-e8b3ebd35c59 |
2 | | | | | |
Request structure
See on API-specification
Expand |
---|
|
Code Block |
---|
{
"category": {
"coding": [
{
"system": "COMPOSITION_CATEGORIES",
"code": "SICKNESS"
}
]
},
"type": {
"coding": [
{
"system": "COMPOSITION_TYPES",
"code": "TEMP_DISABILITY"
}
]
},
"event": [
{
"code": {
"coding": [
{
"system": "COMPOSITION_EVENTS",
"code": "COMPOSITION_VALIDITY_PERIOD"
}
]
},
"period": {
"start": "2022-10-24T10:45:16Z",
"end": "2022-10-28T10:45:16Z"
}
}
],
"subject": {
"type": {
"coding": [
{
"system": "eHealth/resources",
"code": "person"
}
],
"text": "string"
},
"value": "52b504c7-0177-4078-834b-52d89154081c"
},
"encounter": {
"type": {
"coding": [
{
"system": "eHealth/resources",
"code": "encounter"
}
],
"text": "string"
},
"value": "e39ee5ae-2644-4f04-8e64-bb359866e907"
},
"author": {
"type": {
"coding": [
{
"system": "eHealth/resources",
"code": "employee"
}
],
"text": "string"
},
"value": "43cc2161-1c2b-481b-a618-77e35817f850"
},
"section": {
"focus": {
"type": {
"coding": [
{
"system": "eHealth/resources",
"code": "person"
}
],
"text": "string"
},
"value": "52b504c7-0177-4078-834b-52d89154081c"
}
},
"extension": [
{
"valueCode": "AUTHORIZE_WITH",
"valueUuid": "e7ff2eef-712f-4676-960d-6aa16dce2103"
},
{
"valueCode": "IS_ACCIDENT",
"valueBoolean": true
},
{
"valueCode": "TREATMENT_VIOLATION",
"valueString": "reject_recommendation"
},
{
"valueCode": "TREATMENT_VIOLATION_DATE",
"valueDate": "2022-10-24"
},
{
"valueCode": "IS_INTOXICATED",
"valueBoolean": true
},
{
"valueCode": "IS_FOREIGN_TREATMENT",
"valueBoolean": true
},
{
"valueCode": "IS_FORCE_RENEW",
"valueBoolean": true
}
]
} |
|
Авторизувати
Перевірте область користувача, щоб виконати цю дію (scope = 'composition:create')
повертає 401 (неавторизовано) у разі недійсних областей
| Key | Value | Mandatory | Description | Example |
---|
1 | Content-Type | application/json | M | Тип контенту | Content-Type:application/json |
2 | Authorization | Bearer c2778f3064753ea70de870a53795f5c9 | M | Перевірка користувача | Authorization:Bearer c2778f3064753ea70de870a53795f5c9 |
3 | | | | | |
Request data validation
Describe the process of checking the input data transmitted in the request for compliance with the given rules and restrictions set in the API
Processing
A list of processes related to receiving, changing or transmitting data according to the logic defined in the REST API
Response structure examples
Description of the REST API response structure, example
HTTP status codes
| Response code | HTTP Status code | Message | Internal name | Description |
---|
1 | Базові |
2 | 1000 | 404 | Composition not found | COMPOSITION_NOT_FOUND_404 | Не знайдено медичний висновок |
3 | | 401 | Unauthorized | | Помилка підтвердження |
4 | Специфічні |
5 | | 422 | Only for active MPI record can be created medication request! | | |
Post-processing processes
Description of actions performed on data after processing
Technical modules where the method is used
List of pages describing technical modules where the method is used
Page Properties Report |
---|
headings | ID ТМ, Статус |
---|
cql | label = "tr-mis" |
---|
|