Table of Contents | ||
---|---|---|
|
Overview
This is a web service is based on SOAP protocol and designed to return information about Composition.
...
Request
In parameters
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
Code Block |
---|
<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
Validate request against XSD schema
Validate one of RNOKPP or document is present in the request
in case of an error return fault with faultCode=Server, faultString = “RNOKPP or document must be present”
Validate person
Search for a person using Active person search algorithm
In case 0 or >1 persons found return fault with faultCode=Server, faultString = “Person not found”
In case 1 person found validate that persons id matches Composition.subject
In case persons id doesn't match perform Search Person's merged persons and check if Composition.subject is in
merge_person_id
In case Composition.subject is not
merge_person_id
return faultCode=Server, faultString = “Person not found”
Validate compositionTitle
In case compositionType is
NEWBORN
orTEMP_DISABILITY
search for Medical Conclusion from MC BD with title = compositionTitle from the requestElse search for ME.Composition with title = compositionTitle from the request
in case of an error return fault with faultCode=Server, faultString = “Composition not found”
Service logic
In case compositionType is
NEWBORN
orTEMP_DISABILITY
Select Medical Conclusion from MC BD
Create a response according to schema below
Else select Composition from ME DB
Create a response according to schema below
If Composition contains extensions set additionalAdmissionCondition, for each element in extension array create an element in additionalAdmissionCondition array with following values:
additionalAdmissionCondition.code = Composition.extension[@].valueCodeableConcept.coding[].code
if Composition.extension[@].valueCodeableConcept.extension is not null:
additionalAdmissionCondition.alphabeticalValue[]= Composition.extension[@].valueCodeableConcept.extension[?(@.valueCodeableConcept)].valueCodeableConcept.coding.code
additionalAdmissionCondition.numericalValue=Composition.extension[@].valueCodeableConcept.extension[?(@.valueDecimal)].valueDecimal
Set display value from corresponding dictionaries for following elements:
status
type
category
event.code
additionAdmissionCondition.code
additionAdmissionCondition.alphabeticalValue
Find a record in PRM.legal_entity where id = Composition.custodian.identifier.value
Set PublicGetCompositionResponse.custodian = PRM.legal_entity.name
Return response to the client according to schema
Response
Out parameters
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:
| 1..1 |
20 | faultString | 2 | string | A human readable explanation of the fault | 1..1 |
Examples
Example of an error
Code Block |
---|
<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
Code Block |
---|
<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> |