ЕСОЗ - публічна документація
RC_(MC-1201)_[NEW] [SOAP API] Get Actual Access Status for Adopters
- 1 Overview
- 2 Request
- 2.1 In parameters
- 2.2 XSD schema
- 2.3 Request example
- 3 Validations
- 4 Service logic
- 5 Response
- 5.1 Out parameters
- 5.2 Examples
- 5.2.1 Example of an error
- 5.2.2 Example of success
Overview
This is a web service based on SOAP protocol that is designed to return information about access status for adopters.
Request
In parameters
Key | Hierarchy level | Type | Description | Cardinality | |
---|---|---|---|---|---|
1 | getAdoptersAccessStatusRequest | 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 |
XSD schema
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://example/soapgw/public" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="getAdoptersAccessStatusRequest">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="firstName"/>
<xs:element type="xs:string" name="secondName"/>
<xs:element type="xs:string" name="lastName"/>
<xs:element type="xs:string" name="UNZR"/>
<xs:element type="xs:int" name="RNOKPP"/>
<xs:element name="document">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="documentType"/>
<xs:element type="xs:string" name="documentNumber"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element type="xs:string" name="compositionTitle"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
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:document>
<pub:documentType>PASSPORT</pub:documentType>
<pub:documentNumber>АА120518</pub:documentNumber>
</pub:document>
<pub:compositionTitle>1234-1234-1234-1234</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 compositionTitle
Search for Composition with title = compositionTitle from the request
Validate Composition.type=ADOPTION
in case of an error return fault with faultCode=Server, faultString = “Composition not found”
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”
Service logic
Select the last created Composition with type= ADOPTION using subject_id or merge_person_id (all merged person of this patient_id)
Create response according to schema below
in case Composition.event[0].code=ADOPTION_ADOPTER_INELIGIBLE or ADOPTION_ADOPTER_RELATIVE_INELIGIBLE
else getAdoptersAccessStatusResponse.event[0] = Composition.event[0]
Response
Out parameters
№ | Key | Hierarchy level | Type | Description | Cardinality |
---|---|---|---|---|---|
1 | getAdoptersAccessStatusResponse | 1 | object |
| 0..1 |
2 | event | 2 | array | Event array | 1..* |
3 | code | 3 | string | Code display value from event array | 1..1 |
4 | period | 3 | object | Period from event array | 0..1 |
5 | start | 4 | dateTime | Start of period (ISO8601 format) | 1..1 |
6 | end | 4 | dateTime | End of period (ISO8601 format) | 0..1 |
7 | fault | 1 | object |
| 0..1 |
8 | 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 |
9 | 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 success
ЕСОЗ - публічна документація