Table of Contents
minLevel1
maxLevel7

Purpose

This method is designed allows to create a request for composition.Composition of all types and categories for a person/pre-person in eHealth.

Used in processes:

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

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

Specification

Link

https://app.swaggerhub.com/apis/bugzi11aehealthua/emalcompositions/12.032.8#2#/main/createComposition

Resource

/patients/composition

Scope

composition:create

Components

Compositions

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

Logic

...

...

Sequence:

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

Request structure

See on SwaggerHub

Example

Expand
titleRequest example
Code Block
{
  "category": {
    "coding": [
      {
        "system": "eHealth/compositionCOMPOSITION_categoriesCATEGORIES",
        "code": "LIVE_BIRTHSICKNESS"
      }
    ]
  },
  "type": {
    "coding": [
      {
        "system": "eHealth/compositionCOMPOSITION_typesTYPES",
        "code": "NEWBORNTEMP_DISABILITY"
      }
    ]
  },
  "event": [
    {
      "code": {
        "coding": [
          {
            "system": "eHealth/compositionCOMPOSITION_eventsEVENTS",
            "code": "COMPOSITION_VALIDITY_PERIOD"
          }
        ]
      },
      "period": {
        "start": "20202022-0610-26T1524T10:2245:53.403Z16Z",
        "end": "20202022-0710-26T1528T10:2245:53.403Z16Z"
      }
    }
  ],
  "subject": {
    "type": {
      "coding": [
        {
          "system": "eHealth/compositionresources",
          "code": "stringperson"
        }
      ],
      "text": "string"
    },
    "value": "e49abc3052b504c7-6d170177-11ea4078-b83c834b-673680173afa52d89154081c"
  },
  "encounter": {
    "type": {
      "coding": [
        {
          "system": "eHealth/compositionresources",
          "code": "stringencounter"
        }
      ],
      "text": "string"
    },
    "value": "e49abc30e39ee5ae-6d172644-11ea4f04-b83c8e64-673680173afabb359866e907"
  },
  "author": {
    "type": {
      "coding": [
        {
          "system": "eHealth/compositionresources",
          "code": "stringemployee"
        }
      ],
      "text": "string"
    },
    "value": "e49abc3043cc2161-6d171c2b-11ea481b-b83ca618-673680173afa77e35817f850"
  },
  "section": {
    "focus": {
      "type": {
        "coding": [
          {
            "system": "eHealth/compositionresources",
            "code": "stringperson"
          }
        ],
        "text": "string"
      },
      "value": "e49abc3052b504c7-6d170177-11ea4078-b83c834b-673680173afa52d89154081c"
    }
  },
  "extension": [
    {
      "valueCode": "AUTHORIZE_WITH",
      "valueUuid": "3fa85f64e7ff2eef-5717712f-45624676-b3fc960d-2c963f66afa66aa16dce2103"
    },
    {
      "valueCode": "IS_ACCIDENT",
      "valueBoolean": true
    },
    {
      "valueCode": "TREATMENT_VIOLATION",
      "valueString": "latereject_arrivalrecommendation"
    },
    {
      "valueCode": "TREATMENT_VIOLATION_DATE",
      "valueDate": "20202022-1210-1224"
    },
    {
      "valueCode": "IS_INTOXICATED",
      "valueBoolean": true
    },
    {
      "valueCode": "IS_FOREIGN_TREATMENT",
      "valueBoolean": true
    },
    {
      "valueCode": "IS_FORCE_RENEW",
      "valueBoolean": true
    }
  ]
}

...

API paragraph not found

Response structure

See on SwaggerHub

Example:

Expand
titleResponse example
Code Block
{
  "data": {
    "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
    "status": "PENDING",
    "eta": "string",
    "doneAt": "string",
    "links": [
      {
        "entity": "eHealth/composition",
        "href": "composition/0daaad78-6cfb-11ea-9cd6-afab698838bc",
        "error": "string"
      }
    ]
  }
}

...