Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published
Table of Contents
stylenone

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

Code Block
<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

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: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

  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 compositionTitle

    1. Search for Composition with title = compositionTitle from the request

    2. Validate Composition.type=ADOPTION

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

  4. 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”

Service logic

  1. Select the last created Composition with type= ADOPTION using subject_id or merge_person_id (all merged person of this patient_id)

  2. Create response according to schema below

    1. in case Composition.event[0].code=ADOPTION_ADOPTER_INELIGIBLE  or ADOPTION_ADOPTER_RELATIVE_INELIGIBLE

    2. 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:

  • 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

9

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 success

Code Block
<soapenv:Envelope
	xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
	xmlns:pub="http://example/soapgw/public">
	<soapenv:Header/>
	<soapenv:Body>
		<pub:getAdoptersAccessStatusResponse>
			<pub:event>
				<pub:code>ELIGIBLE</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:getAdoptersAccessStatusResponse>
	</soapenv:Body>
</soapenv:Envelope>