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

RC_(MC-1205)_[NEW] Get publicComposition

Overview

This is a web service is based on SOAP protocol and designed to return information about Composition.

 

Get Public Composition.png

Request

In parameters

 

Key

Hierarchy level

Type

Description

Cardinality

Key

Hierarchy level

Type

Description

Cardinality

1

PublicGetCompositionRequest

1

object

 

1..1

2

firstName

2

string

Patient first name

1..1

3

secondName

2

string

Patient middle (second) name

0..1

4

lastName

2

string

Patient last (surname) name

1..1

5

UNZR

2

string

UNZR number

0..1

6

RNOKPP

2

string

RNOKPP number

0..1

7

document

2

object

 

0..1

8

documentType

3

string

Document type

1..1

9

documentNumber

3

string

Document number

1..1

10

compositionTitle

2

string

Composition title

1..1

11

compositionType

2

string

Composition type

1..1

Request example

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pub="http://example/soapgw/public"> <soapenv:Header/> <soapenv:Body> <pub:getAdoptersAccessStatusRequest> <pub:firstName>Петро</pub:firstName> <pub:lastName>Іванов</pub:lastName> <pub:UNZR>20090705-00011</pub:UNZR> <pub:RNOKPP>1234567891</pub:RNOKPP> <pub:compositionType>DRIVERS</pub:compositionType> <pub:document> <pub:documentType>PASSPORT</pub:documentType> <pub:documentNumber>АА120518</pub:documentNumber> </pub:document> <pub:compositionTitle>AX654654T</pub:compositionTitle> </pub:getAdoptersAccessStatusRequest> </soapenv:Body> </soapenv:Envelope>

Validations

  1. Validate request against XSD schema

  2. Validate one of RNOKPP or document is present in the request

    1. in case of an error return fault with faultCode=Server, faultString = “RNOKPP or document must be present”

  3. Validate person

    1. Search for a person using Active person search algorithm

      1. In case 0 or >1 persons found return fault with faultCode=Server, faultString = “Person not found”

      2. In case 1 person found validate that persons id matches Composition.subject

        1. In case persons id doesn't match perform Search Person's merged persons and check if Composition.subject is in merge_person_id

          1. In case Composition.subject is not merge_person_id return faultCode=Server, faultString = “Person not found”

  4. Validate compositionTitle

    1. In case compositionType is NEWBORN or TEMP_DISABILITYsearch for Medical Conclusion from MC BD with title = compositionTitle from the request

    2. Else search for ME.Composition with title = compositionTitle from the request

    3. in case of an error return fault with faultCode=Server, faultString = “Composition not found”

Service logic

  1. In case compositionType is NEWBORN or TEMP_DISABILITY

    1. Select Medical Conclusion from MC BD

    2. Create a response according to schema below

  2. Else select Composition from ME DB

    1. Create a response according to schema below

    2. If Composition contains extensions set additionalAdmissionCondition, for each element in extension array create an element in additionalAdmissionCondition array with following values:

      1. additionalAdmissionCondition.code = Composition.extension[@].valueCodeableConcept.coding[].code

      2. if Composition.extension[@].valueCodeableConcept.extension is not null:

        1. additionalAdmissionCondition.alphabeticalValue[]= Composition.extension[@].valueCodeableConcept.extension[?(@.valueCodeableConcept)].valueCodeableConcept.coding.code

        2. additionalAdmissionCondition.numericalValue=Composition.extension[@].valueCodeableConcept.extension[?(@.valueDecimal)].valueDecimal

  3. Set display value from corresponding dictionaries for following elements:

    1. status

    2. type

    3. category

    4. event.code

    5. additionAdmissionCondition.code

    6. additionAdmissionCondition.alphabeticalValue

  4. Find a record in PRM.legal_entity where id = Composition.custodian.identifier.value

    1. Set PublicGetCompositionResponse.custodian = PRM.legal_entity.name

  5. Return response to the client according to schema

Response

Out parameters

Key

Hierarchy level

Type

Description

Cardinality

Key

Hierarchy level

Type

Description

Cardinality

1

PublicGetCompositionResponse

1

object

 

0..1

2

title

2

string

Composition title

1..1

3

type

2

string

Composition type

1..1

4

category

2

string

Composition category

1..1

5

date

2

date

Composition signed date

1..1

6

custodian

2

string

Composition legal entity

1..1

7

status

2

string

Composition status

1..1

8

event

2

array

Event array

1..*

9

code

3

string

Code display value from event array

1..1

10

period

3

object

Period from event array

1..1

11

start

4

dateTime

Start of period (ISO8601 format)

1..1

12

end

4

dateTime

End of period (ISO8601 format)

0..1

13

additionAdmissionCondition

2

array

Addition admission condition

0..*

14

code

3

string

Code display value from addition admission condition array

1..1

15

codeNumber

3

string

Code from addition admission condition array

1..1

16

alphabeticalValue

3

array

Alphabetical value from addition admission condition array

0..*

17

numericalValue

3

decimal

Numerical value from addition admission condition array

0..1

18

fault

1

object

 

0..1

19

faultCode

2

string

Standard code that provides more information about the fault. A set of code values is predefined by the SOAP specification, as defined below:

  • VersionMismatch—Invalid namespace defined in SOAP envelope element. The SOAP envelope must conform to the http://schemas.xmlsoap.org/soap/envelope namespace.

  • MustUnderstand—SOAP header entry not understood by processing party.

  • Client—Message was incorrectly formatted or is missing information.

  • Server—Problem with the server that prevented message from being processed.

1..1

20

faultString

2

string

A human readable explanation of the fault

1..1

Examples

Example of an error

<soapenv:Envelope xmlns:soapenv='http://schemas.xmlsoap.org/soap/envelope'> <soapenv:Body> <soapenv:Fault> <faultcode>Server</faultcode> <faultstring> Patient not found </faultstring> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope>

Example of sucess

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:pub="http://example/soapgw/public"> <soapenv:Header/> <soapenv:Body> <pub:PublicGetCompositionResponse> <pub:title>1234-1234-1234-1234</pub:title> <pub:type>Медичний висновок влодія</pub:type> <pub:category>Медичний висновок водія, група ІІ</pub:category> <pub:createdAt>2024-10-01T00:00:00.000Z</pub:createdAt> <pub:custodian>Перша регіональня лікарня</pub:custodian> <pub:status>Фінальний статус. Медичний висновок підписаний</pub:status> <pub:event> <pub:code>Медичний висновок водія для ПЕРШОЇ групи: ДОПУСК</pub:code> <pub:period> <pub:start>2024-10-01T00:00:00.000Z</pub:start> <pub:end>2030-10-01T00:00:00.000Z</pub:end> </pub:period> </pub:event> <pub:event> <pub:code>Медичний висновок водія для ДРУГОЇ групи: НЕДОПУСК</pub:code> <pub:period> <pub:start>2024-10-01T00:00:00.000Z</pub:start> </pub:period> </pub:event> <pub:additionAdmissionCondition> <pub:code>Засіб корекції та/або захисту зору.</pub:code> <pub:alphabeticalValue>лівий</pub:alphabeticalValue> <pub:alphabeticalValue>правий</pub:alphabeticalValue> </pub:additionAdmissionCondition> </pub:PublicGetCompositionResponse> </soapenv:Body> </soapenv:Envelope>

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