ЕСОЗ - публічна документація

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

REST API method / Метод REST API (настанова) (remove the link block before publishing the document)

Properties of a REST API method document

Document type

Метод REST API

Guideline ID

GUI-0011

Author

@

Document version

1

Document status

DRAFT

Date of creation

ХХ.ХХ.ХХХХ (дата фінальної версії документа – RC або PROD)

Date of update

ХХ.ХХ.ХХХХ (дата зміни версії)

Method API ID

API-001-001-001-0001

Microservices (namespace)

MPI

Component

Auth

Component ID

COM-001-001

Link на API-специфікацію

https://ehealthmisapi1.docs.apiary.io/#reference/public.-medical-service-provider-integration-layer/manage-client-configuration/get-client-details

Resource

{{host}}//api.ehealth.gov.ua/api/patients/id/encounter_package

Scope

Protocol type

Request type

Sync/Async

Public/Private

Purpose

Цей метод дозволяє створити композицію всіх типів і категорій для особи/передособи в eHealth.

Використовується в процесах:

2.1. МВН - Створення нового

2.2. МВТН - Створення нового

Logic

8bf11faa-c2f8-4f6e-8d37-5318d694e92b.png
 Послідовність

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

 Example
{
  "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 (неавторизовано) у разі недійсних областей

Headers

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

 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

  • No labels