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

Опис PostCompositionRequest та PostCompositionResponse

PostCompositionRequest

Валідація параметрів запиту

Валідація відбувається на стороні API згідно з описаною схемою XSD:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"           xmlns:tns="http://wldd.io/emal/soapgw/dracz"           targetNamespace="http://wldd.io/emal/soapgw/dracz"           elementFormDefault="qualified">    <xs:complexType name="AddressType">        <xs:sequence>            <xs:element name="CityID" type="xs:integer" minOccurs="0"/>            <xs:element name="CityTypeID" type="xs:integer" minOccurs="0"/>            <xs:element name="StreetName" type="xs:string" minOccurs="0"/>            <xs:element name="Region" type="xs:string" minOccurs="0" nillable="true"/>            <xs:element name="DistrictID" type="xs:integer" minOccurs="0"/>            <xs:element name="StreetID" type="xs:integer" minOccurs="0"/>            <xs:element name="BuildingNumber" type="xs:string" minOccurs="0"/>            <xs:element name="District" type="xs:string" minOccurs="0" nillable="true"/>            <xs:element name="CountryID" type="xs:integer" minOccurs="0"/>            <xs:element name="StreetTypeName" type="xs:string" minOccurs="0"/>            <xs:element name="RegionID" type="xs:string" minOccurs="0"/>            <xs:element name="CityKOATUU" type="xs:string" minOccurs="0"/>            <xs:element name="CityType" type="xs:string" minOccurs="0"/>            <xs:element name="Apartment" type="xs:string" minOccurs="0" nillable="true"/>            <xs:element name="BuildingPart" type="xs:string" minOccurs="0" nillable="true"/>            <xs:element name="Country" type="xs:string" minOccurs="0"/>            <xs:element name="StreetTypeID" type="xs:integer" minOccurs="0"/>            <xs:element name="CityName" type="xs:string" minOccurs="0" nillable="true"/>            <xs:element name="Postbox" type="xs:string" minOccurs="0"/>        </xs:sequence>    </xs:complexType>    <xs:complexType name="ApplicationReceivingOrgInfo">        <xs:sequence>            <xs:element name="RegionOrg" type="xs:string" minOccurs="0" nillable="true"/>            <xs:element name="ComposeOrg" type="xs:string" minOccurs="0" nillable="true"/>        </xs:sequence>    </xs:complexType>    <xs:complexType name="CBI">        <xs:sequence>            <xs:element name="CBIssueDate" type="xs:date"/>            <xs:element name="CBIssuer" type="xs:string"/>            <xs:element name="documentNumber" type="xs:string"/>            <xs:element name="documentSerial" type="xs:string"/>        </xs:sequence>    </xs:complexType>    <xs:complexType name="CBSBankChannelInfo">        <xs:sequence>            <xs:element name="CBSBankMFO" type="xs:string" minOccurs="0" nillable="true"/>            <xs:element name="CBSBankAccount" type="xs:string" minOccurs="0" nillable="true"/>            <xs:element name="CBSBankEDRPOU" type="xs:string" minOccurs="0" nillable="true"/>            <xs:element name="CBSBankName" type="xs:string" minOccurs="0" nillable="true"/>        </xs:sequence>    </xs:complexType>    <xs:complexType name="CBSPostChannelInfo">        <xs:sequence>            <xs:element name="PostalServiceBranchName" type="xs:string" minOccurs="0" nillable="true"/>            <xs:element name="Postbox" type="xs:string" minOccurs="0" nillable="true"/>        </xs:sequence>    </xs:complexType>    <xs:complexType name="ChildBorn">        <xs:sequence>            <xs:element name="childBornOrder" type="xs:integer" minOccurs="0" nillable="true"/>            <xs:element name="childBornAlive" type="xs:boolean" minOccurs="0" nillable="true"/>            <xs:element name="childrenWereBorn" type="xs:integer" minOccurs="0" nillable="true"/>        </xs:sequence>    </xs:complexType>    <xs:complexType name="DocOfBirth">        <xs:sequence>            <xs:element name="ChildDocName" type="xs:string"/>            <xs:element name="ChildDocNumb" type="xs:string"/>            <xs:element name="ChildDocOrgName" type="xs:string"/>            <xs:element name="ChildDocDate" type="xs:date"/>        </xs:sequence>    </xs:complexType>    <xs:complexType name="DracsCBSPostChannelInfo">        <xs:sequence>            <xs:element name="dracsPostbox" type="xs:string" minOccurs="0" nillable="true"/>            <xs:element name="dracsPostalServiceBranchName" type="xs:string" minOccurs="0" nillable="true"/>        </xs:sequence>    </xs:complexType>    <xs:complexType name="MarriageCert">        <xs:sequence>            <xs:element name="DocNumber" type="xs:string" minOccurs="0" nillable="true"/>            <xs:element name="ComposeDate" type="xs:date" minOccurs="0" nillable="true"/>            <xs:element name="ComposeOrg" type="xs:string" minOccurs="0" nillable="true"/>            <xs:element name="RegionOrg" type="xs:string" minOccurs="0" nillable="true"/>        </xs:sequence>    </xs:complexType>    <xs:complexType name="NotificationChannels">        <xs:sequence>            <xs:element name="notificationPhone" type="xs:string" minOccurs="0" nillable="true"/>            <xs:element name="notificationEmail" type="xs:string" minOccurs="0" nillable="true"/>        </xs:sequence>    </xs:complexType>    <xs:complexType name="PassportDocumentType">        <xs:sequence>            <xs:element name="IssueDate" type="xs:date"/>            <xs:element name="IssuerID" type="xs:string"/>            <xs:element name="passportTypeID" type="xs:integer"/>            <xs:element name="ExpiryDate" type="xs:date" minOccurs="0" nillable="true"/>            <xs:element name="documentNumber" type="xs:string"/>            <xs:element name="documentSerial" type="xs:string" minOccurs="0" nillable="true"/>        </xs:sequence>    </xs:complexType>    <xs:complexType name="PersonType">        <xs:sequence>            <xs:element name="familyName" type="xs:string"/>            <xs:element name="patronymicName" type="xs:string" minOccurs="0" nillable="true"/>            <xs:element name="givenName" type="xs:string"/>        </xs:sequence>    </xs:complexType>    <xs:complexType name="CertificateOfBirth">        <xs:complexContent>            <xs:extension base="tns:CBI">                <xs:sequence>                    <xs:element name="ARDate" type="xs:date" minOccurs="0" nillable="true"/>                    <xs:element name="ARNumber" type="xs:string" minOccurs="0" nillable="true"/>                    <xs:element name="ARIssuer" type="xs:string" minOccurs="0" nillable="true"/>                </xs:sequence>            </xs:extension>        </xs:complexContent>    </xs:complexType>    <xs:complexType name="ChildBornCertReceive">        <xs:sequence>            <xs:element name="dracsChildBornCertReceiveChannel" minOccurs="0" type="xs:string"/>            <xs:element name="dracsCBSPostChannelInfo" type="tns:DracsCBSPostChannelInfo" minOccurs="0"                        nillable="true"/>        </xs:sequence>    </xs:complexType>    <xs:complexType name="ChildBornStipend">        <xs:sequence>            <xs:element name="CBSParentRecipient" type="xs:string" minOccurs="0" nillable="true"/>            <xs:element name="CBSChannel" type="xs:string" minOccurs="0" nillable="true"/>            <xs:element name="CBSPostChannelInfo" type="tns:CBSPostChannelInfo" minOccurs="0" nillable="true"/>            <xs:element name="CBSBankChannelInfo" type="tns:CBSBankChannelInfo" minOccurs="0" nillable="true"/>        </xs:sequence>    </xs:complexType>    <xs:complexType name="ChildInfo">        <xs:complexContent>            <xs:extension base="tns:PersonType">                <xs:sequence>                    <xs:element name="gender" type="xs:string"/>                    <xs:element name="ChildBirthLocality" type="xs:string"/>                    <xs:element name="birthDate" type="xs:date"/>                    <xs:element name="ChildBirthLocalityType" type="xs:string"/>                    <xs:element name="ChildBirthRegion" type="xs:string"/>                    <xs:element name="placeOfBirthID" type="xs:string"/>                    <xs:element name="ChildBirthDistrict" type="xs:string" minOccurs="0" nillable="true"/>                    <xs:element name="ChildBirthState" type="xs:string"/>                </xs:sequence>            </xs:extension>        </xs:complexContent>    </xs:complexType>    <xs:complexType name="FatherReason">        <xs:sequence>            <xs:element name="marriageCert" type="tns:MarriageCert" minOccurs="0" nillable="true"/>        </xs:sequence>    </xs:complexType>    <xs:complexType name="LFChildNames">        <xs:complexContent>            <xs:extension base="tns:PersonType"/>        </xs:complexContent>    </xs:complexType>    <xs:complexType name="OfficialServantInfo">        <xs:complexContent>            <xs:extension base="tns:PersonType">                <xs:sequence>                    <xs:element name="authorityName" type="xs:string" minOccurs="0"/>                    <xs:element name="officeBranchID" type="xs:string" minOccurs="0"/>                    <xs:element name="certificate" type="xs:string" minOccurs="0" nillable="true"/>                </xs:sequence>            </xs:extension>        </xs:complexContent>    </xs:complexType>    <xs:complexType name="OfficialServantInfoAct">        <xs:complexContent>            <xs:extension base="tns:PersonType"/>        </xs:complexContent>    </xs:complexType>    <xs:complexType name="OtherChildInfo">        <xs:complexContent>            <xs:extension base="tns:PersonType"/>        </xs:complexContent>    </xs:complexType>    <xs:complexType name="ParentPerson">        <xs:complexContent>            <xs:extension base="tns:PersonType">                <xs:sequence>                    <xs:element name="RNOKPP" type="xs:string" minOccurs="0" nillable="true"/>                    <xs:element name="citizenship" type="xs:string"/>                    <xs:element name="gender" type="xs:string"/>                    <xs:element name="citizenCountry" type="xs:string" minOccurs="0" nillable="true"/>                    <xs:element name="UNZR" type="xs:string" minOccurs="0" nillable="true"/>                    <xs:element name="identityDocument" type="tns:PassportDocumentType"/>                    <xs:element name="birthDate" type="xs:date"/>                    <xs:element name="RegistrationAddress" type="tns:AddressType" minOccurs="0"/>                    <xs:element name="RNOKPPRefusal" type="xs:string" minOccurs="0" nillable="true"/>                </xs:sequence>            </xs:extension>        </xs:complexContent>    </xs:complexType>    <xs:complexType name="ActRecordOfBirth">        <xs:sequence>            <xs:element name="IssueDate" type="xs:date" minOccurs="0"/>            <xs:element name="officeBranchID" type="xs:string" minOccurs="0"/>            <xs:element name="officialServantInfo" type="tns:OfficialServantInfoAct" minOccurs="0"/>            <xs:element name="actRecordNumber" type="xs:string" minOccurs="0"/>        </xs:sequence>    </xs:complexType>    <xs:complexType name="FatherInfo">        <xs:complexContent>            <xs:extension base="tns:ParentPerson"/>        </xs:complexContent>    </xs:complexType>    <xs:complexType name="LFCertificates">        <xs:sequence>            <xs:element name="LFCertChild" type="xs:boolean" minOccurs="0" nillable="true"/>            <xs:element name="LFChildNames" type="tns:LFChildNames" minOccurs="0" nillable="true"/>            <xs:element name="LFCertParents" type="xs:boolean" minOccurs="0" nillable="true"/>        </xs:sequence>    </xs:complexType>    <xs:complexType name="LargeFamilyInfo">        <xs:sequence>            <xs:element name="birthDate" type="xs:date" minOccurs="0"/>            <xs:element name="certificateOfBirth" type="tns:CertificateOfBirth" minOccurs="0" nillable="true"/>            <xs:element name="otherChildInfo" type="tns:OtherChildInfo" minOccurs="0" nillable="true"/>        </xs:sequence>    </xs:complexType>    <xs:complexType name="MotherInfo">        <xs:complexContent>            <xs:extension base="tns:ParentPerson"/>        </xs:complexContent>    </xs:complexType>    <xs:element name="postCompositionRequest">        <xs:complexType>            <xs:sequence>                <xs:element name="requestID" type="xs:string"/>                <xs:element name="applicationDate" type="xs:date" minOccurs="0"/>                <xs:element name="TypeService1" type="xs:string" minOccurs="0" nillable="true"/>                <xs:element name="TypeService2" type="xs:string" minOccurs="0" nillable="true"/>                <xs:element name="TypeService3" type="xs:string" minOccurs="0" nillable="true"/>                <xs:element name="TypeService4" type="xs:string" minOccurs="0" nillable="true"/>                <xs:element name="TypeService5" type="xs:string" minOccurs="0" nillable="true"/>                <xs:element name="TypeService6" type="xs:string" minOccurs="0" nillable="true"/>                <xs:element name="TypeService7" type="xs:string" minOccurs="0" nillable="true"/>                <xs:element name="TypeService8" type="xs:string"/>                <xs:element name="applicationReceivingOrgInfo" type="tns:ApplicationReceivingOrgInfo" minOccurs="0"/>                <xs:element name="childInfo" type="tns:ChildInfo"/>                <xs:element name="childCitizenship" type="xs:string"/>                <xs:element name="citizenCountry" type="xs:string" minOccurs="0" nillable="true"/>                <xs:element name="childResidenceAddressRef" type="xs:string" minOccurs="0"/>                <xs:element name="childBorn" type="tns:ChildBorn" minOccurs="0" nillable="true"/>                <xs:element name="DocOfBirth" type="tns:DocOfBirth"/>                <xs:element name="officialServantInfo" type="tns:OfficialServantInfo" minOccurs="0"/>                <xs:element name="actRecordOfBirth" type="tns:ActRecordOfBirth" minOccurs="0"/>                <xs:element name="CBI" type="tns:CBI"/>                <xs:element name="RNOKPP" type="xs:string" minOccurs="0" nillable="true"/>                <xs:element name="UNZR" type="xs:string" minOccurs="0" nillable="true"/>                <xs:element name="notificationChannels" type="tns:NotificationChannels" minOccurs="0"                            nillable="true"/>                <xs:element name="ChildBornCertReceive" type="tns:ChildBornCertReceive" minOccurs="0"                            nillable="true"/>                <xs:element name="motherInfo" type="tns:MotherInfo"/>                <xs:element name="fatherInfo" type="tns:FatherInfo" minOccurs="0"/>                <xs:element name="FatherReason" type="tns:FatherReason" minOccurs="0" nillable="true"/>                <xs:element name="childBornStipend" type="tns:ChildBornStipend" minOccurs="0" nillable="true"/>                <xs:element name="LFCertificates" type="tns:LFCertificates" minOccurs="0" nillable="true"/>                <xs:element name="largeFamilyInfo" type="tns:LargeFamilyInfo" minOccurs="0" nillable="true"/>                <xs:element name="ApplicantType" type="xs:string" minOccurs="0" nillable="true"/>                <xs:element name="PortalRequestID" type="xs:string" minOccurs="0" nillable="true"/>                <xs:element name="ApplicationJson" type="xs:string" minOccurs="0" nillable="true"/>            </xs:sequence>        </xs:complexType>    </xs:element>    <xs:element name="postCompositionRequestResult">        <xs:complexType>            <xs:sequence>                <xs:element name="processingID" type="xs:string" minOccurs="0"/>                <xs:element name="faultCode" type="xs:string" minOccurs="0"/>            </xs:sequence>        </xs:complexType>    </xs:element> </xs:schema>

Додаткова валідація

Відбуваються додаткові перевірки таких параметрів

Параметр

Перевірка

Параметр

Перевірка

requestID

not null, not blank

typeService8

not null, not blank

cbi.cbIssuer

not null, not blank

cbi.documentSerial

not null, not blank

cbi.documentNumber

not null, not blank

childInfo.familyName

not null, not blank

childInfo.givenName

not null, not blank

childInfo.placeOfBirthID

not null, not blank

childInfo.childBirthState

not null, not blank

childInfo.childBirthRegion

not null, not blank

childInfo.childBirthLocalityType

not null, not blank

childInfo.childBirthLocality

not null, not blank

childInfo.gender

not null, not blank

childCitizenship

not null, not blank

docOfBirth.childDocName

not null, not blank

docOfBirth.childDocNumb

not null, not blank

docOfBirth.childDocOrgName

not null, not blank

motherInfo.familyName

not null, not blank

motherInfo.givenName

not null, not blank

motherInfo.gender

not null, not blank

motherInfo.citizenship

not null, not blank

motherInfo.identityDocument.documentNumber

not null, not blank

motherInfo.identityDocument.issuerID

not null, not blank

typeService8

== ”1”

Також, варто зазначити, що результат невалідного запиту має faultCode з QName = FaultCode.CLIENT

Обробка запиту

Обробкою запиту варто вважати його проксювання в emal-api на /private/newborn/postComposition

Приклад запиту PostCompositionRequest

За допомогою запиту PostCompositionRequest передається номер медвисновку і вибірка атрибутів, які визначають собою набір персональних даних для внесення особи в реєстри пацієнтів.

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">    <s:Header>        <h:client xmlns="http://x-road.eu/xsd/xroad.xsd" xmlns:a="http://x-road.eu/xsd/identifiers"                  xmlns:h="http://x-road.eu/xsd/xroad.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema"                  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" a:objectType="SUBSYSTEM">            <a:xRoadInstance>SEVDEIR-TEST</a:xRoadInstance>            <a:memberClass>GOV</a:memberClass>            <a:memberCode>22956058</a:memberCode>            <a:subsystemCode>TEST_DRAC</a:subsystemCode>            <a:serviceCode>eMaliatkoApplication</a:serviceCode>        </h:client>        <h:id xmlns="http://x-road.eu/xsd/xroad.xsd" xmlns:h="http://x-road.eu/xsd/xroad.xsd">103963-C</h:id>        <h:protocolVersion xmlns="http://x-road.eu/xsd/xroad.xsd" xmlns:h="http://x-road.eu/xsd/xroad.xsd">4.0        </h:protocolVersion>        <h:service xmlns="http://x-road.eu/xsd/xroad.xsd" xmlns:a="http://x-road.eu/xsd/identifiers"                   xmlns:h="http://x-road.eu/xsd/xroad.xsd" a:objectType="SERVICE">            <a:xRoadInstance>SEVDEIR-TEST</a:xRoadInstance>            <a:memberClass>GOV</a:memberClass>            <a:memberCode>42032422</a:memberCode>            <a:subsystemCode>TEST-NSZU-01</a:subsystemCode>            <a:serviceCode>postComposition</a:serviceCode>        </h:service>        <h:userId xmlns="http://x-road.eu/xsd/xroad.xsd" xmlns:h="http://x-road.eu/xsd/xroad.xsd"/>    </s:Header>    <s:Body xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">        <drac:postCompositionRequest xmlns:drac="http://wldd.io/emal/soapgw/dracz">            <drac:requestID>string</drac:requestID>            <!--Optional:-->            <drac:applicationDate>2008-09-29</drac:applicationDate>            <!--Optional:-->            <drac:TypeService1>string</drac:TypeService1>            <!--Optional:-->            <drac:TypeService2>string</drac:TypeService2>            <!--Optional:-->            <drac:TypeService3>string</drac:TypeService3>            <!--Optional:-->            <drac:TypeService4>string</drac:TypeService4>            <!--Optional:-->            <drac:TypeService5>string</drac:TypeService5>            <!--Optional:-->            <drac:TypeService6>string</drac:TypeService6>            <!--Optional:-->            <drac:TypeService7>string</drac:TypeService7>            <drac:TypeService8>string</drac:TypeService8>            <!--Optional:-->            <drac:applicationReceivingOrgInfo>                <!--Optional:-->                <drac:RegionOrg>string</drac:RegionOrg>                <!--Optional:-->                <drac:ComposeOrg>string</drac:ComposeOrg>            </drac:applicationReceivingOrgInfo>            <drac:childInfo>                <drac:familyName>string</drac:familyName>                <!--Optional:-->                <drac:patronymicName>string</drac:patronymicName>                <drac:givenName>string</drac:givenName>                <drac:gender>string</drac:gender>                <drac:ChildBirthLocality>string</drac:ChildBirthLocality>                <drac:birthDate>2014-09-19</drac:birthDate>                <drac:ChildBirthLocalityType>string</drac:ChildBirthLocalityType>                <drac:ChildBirthRegion>string</drac:ChildBirthRegion>                <drac:placeOfBirthID>string</drac:placeOfBirthID>                <!--Optional:-->                <drac:ChildBirthDistrict>string</drac:ChildBirthDistrict>                <drac:ChildBirthState>string</drac:ChildBirthState>            </drac:childInfo>            <drac:childCitizenship>string</drac:childCitizenship>            <!--Optional:-->            <drac:citizenCountry>string</drac:citizenCountry>            <!--Optional:-->            <drac:childResidenceAddressRef>string</drac:childResidenceAddressRef>            <!--Optional:-->            <drac:childBorn>                <!--Optional:-->                <drac:childBornOrder>100</drac:childBornOrder>                <!--Optional:-->                <drac:childBornAlive>true</drac:childBornAlive>                <!--Optional:-->                <drac:childrenWereBorn>100</drac:childrenWereBorn>            </drac:childBorn>            <drac:DocOfBirth>                <drac:ChildDocName>string</drac:ChildDocName>                <drac:ChildDocNumb>string</drac:ChildDocNumb>                <drac:ChildDocOrgName>string</drac:ChildDocOrgName>                <drac:ChildDocDate>2018-11-01+02:00</drac:ChildDocDate>            </drac:DocOfBirth>            <!--Optional:-->            <drac:officialServantInfo>                <drac:familyName>string</drac:familyName>                <!--Optional:-->                <drac:patronymicName>string</drac:patronymicName>                <drac:givenName>string</drac:givenName>                <!--Optional:-->                <drac:authorityName>string</drac:authorityName>                <!--Optional:-->                <drac:officeBranchID>string</drac:officeBranchID>                <!--Optional:-->                <drac:certificate>string</drac:certificate>            </drac:officialServantInfo>            <!--Optional:-->            <drac:actRecordOfBirth>                <!--Optional:-->                <drac:IssueDate>2013-05-22+03:00</drac:IssueDate>                <!--Optional:-->                <drac:officeBranchID>string</drac:officeBranchID>                <!--Optional:-->                <drac:officialServantInfo>                    <drac:familyName>string</drac:familyName>                    <!--Optional:-->                    <drac:patronymicName>string</drac:patronymicName>                    <drac:givenName>string</drac:givenName>                </drac:officialServantInfo>                <!--Optional:-->                <drac:actRecordNumber>string</drac:actRecordNumber>            </drac:actRecordOfBirth>            <drac:CBI>                <drac:CBIssueDate>2002-11-05+02:00</drac:CBIssueDate>                <drac:CBIssuer>string</drac:CBIssuer>                <drac:documentNumber>string</drac:documentNumber>                <drac:documentSerial>string</drac:documentSerial>            </drac:CBI>            <!--Optional:-->            <drac:RNOKPP>string</drac:RNOKPP>            <!--Optional:-->            <drac:UNZR>string</drac:UNZR>            <!--Optional:-->            <drac:notificationChannels>                <!--Optional:-->                <drac:notificationPhone>string</drac:notificationPhone>                <!--Optional:-->                <drac:notificationEmail>string</drac:notificationEmail>            </drac:notificationChannels>            <!--Optional:-->            <drac:ChildBornCertReceive>                <!--Optional:-->                <drac:dracsChildBornCertReceiveChannel>string</drac:dracsChildBornCertReceiveChannel>                <!--Optional:-->                <drac:dracsCBSPostChannelInfo>                    <!--Optional:-->                    <drac:dracsPostbox>string</drac:dracsPostbox>                    <!--Optional:-->                    <drac:dracsPostalServiceBranchName>string</drac:dracsPostalServiceBranchName>                </drac:dracsCBSPostChannelInfo>            </drac:ChildBornCertReceive>            <drac:motherInfo>                <drac:familyName>string</drac:familyName>                <!--Optional:-->                <drac:patronymicName>string</drac:patronymicName>                <drac:givenName>string</drac:givenName>                <!--Optional:-->                <drac:RNOKPP>string</drac:RNOKPP>                <drac:citizenship>string</drac:citizenship>                <drac:gender>string</drac:gender>                <!--Optional:-->                <drac:citizenCountry>string</drac:citizenCountry>                <!--Optional:-->                <drac:UNZR>string</drac:UNZR>                <drac:identityDocument>                    <drac:IssueDate>2002-06-24+03:00</drac:IssueDate>                    <drac:IssuerID>string</drac:IssuerID>                    <drac:passportTypeID>100</drac:passportTypeID>                    <!--Optional:-->                    <drac:ExpiryDate>2016-02-20+02:00</drac:ExpiryDate>                    <drac:documentNumber>string</drac:documentNumber>                    <!--Optional:-->                    <drac:documentSerial>string</drac:documentSerial>                </drac:identityDocument>                <drac:birthDate>2019-08-19</drac:birthDate>                <!--Optional:-->                <drac:RegistrationAddress>                    <!--Optional:-->                    <drac:CityID>100</drac:CityID>                    <!--Optional:-->                    <drac:CityTypeID>100</drac:CityTypeID>                    <!--Optional:-->                    <drac:StreetName>string</drac:StreetName>                    <!--Optional:-->                    <drac:Region>string</drac:Region>                    <!--Optional:-->                    <drac:DistrictID>100</drac:DistrictID>                    <!--Optional:-->                    <drac:StreetID>100</drac:StreetID>                    <!--Optional:-->                    <drac:BuildingNumber>string</drac:BuildingNumber>                    <!--Optional:-->                    <drac:District>string</drac:District>                    <!--Optional:-->                    <drac:CountryID>100</drac:CountryID>                    <!--Optional:-->                    <drac:StreetTypeName>string</drac:StreetTypeName>                    <!--Optional:-->                    <drac:RegionID>string</drac:RegionID>                    <!--Optional:-->                    <drac:CityKOATUU>string</drac:CityKOATUU>                    <!--Optional:-->                    <drac:CityType>string</drac:CityType>                    <!--Optional:-->                    <drac:Apartment>string</drac:Apartment>                    <!--Optional:-->                    <drac:BuildingPart>string</drac:BuildingPart>                    <!--Optional:-->                    <drac:Country>string</drac:Country>                    <!--Optional:-->                    <drac:StreetTypeID>100</drac:StreetTypeID>                    <!--Optional:-->                    <drac:CityName>string</drac:CityName>                    <!--Optional:-->                    <drac:Postbox>string</drac:Postbox>                </drac:RegistrationAddress>                <!--Optional:-->                <drac:RNOKPPRefusal>string</drac:RNOKPPRefusal>            </drac:motherInfo>            <!--Optional:-->            <drac:fatherInfo>                <drac:familyName>string</drac:familyName>                <!--Optional:-->                <drac:patronymicName>string</drac:patronymicName>                <drac:givenName>string</drac:givenName>                <!--Optional:-->                <drac:RNOKPP>string</drac:RNOKPP>                <drac:citizenship>string</drac:citizenship>                <drac:gender>string</drac:gender>                <!--Optional:-->                <drac:citizenCountry>string</drac:citizenCountry>                <!--Optional:-->                <drac:UNZR>string</drac:UNZR>                <drac:identityDocument>                    <drac:IssueDate>2018-02-04+02:00</drac:IssueDate>                    <drac:IssuerID>string</drac:IssuerID>                    <drac:passportTypeID>100</drac:passportTypeID>                    <!--Optional:-->                    <drac:ExpiryDate>2002-11-16+02:00</drac:ExpiryDate>                    <drac:documentNumber>string</drac:documentNumber>                    <!--Optional:-->                    <drac:documentSerial>string</drac:documentSerial>                </drac:identityDocument>                <drac:birthDate>2000-09-14</drac:birthDate>                <!--Optional:-->                <drac:RegistrationAddress>                    <!--Optional:-->                    <drac:CityID>100</drac:CityID>                    <!--Optional:-->                    <drac:CityTypeID>100</drac:CityTypeID>                    <!--Optional:-->                    <drac:StreetName>string</drac:StreetName>                    <!--Optional:-->                    <drac:Region>string</drac:Region>                    <!--Optional:-->                    <drac:DistrictID>100</drac:DistrictID>                    <!--Optional:-->                    <drac:StreetID>100</drac:StreetID>                    <!--Optional:-->                    <drac:BuildingNumber>string</drac:BuildingNumber>                    <!--Optional:-->                    <drac:District>string</drac:District>                    <!--Optional:-->                    <drac:CountryID>100</drac:CountryID>                    <!--Optional:-->                    <drac:StreetTypeName>string</drac:StreetTypeName>                    <!--Optional:-->                    <drac:RegionID>string</drac:RegionID>                    <!--Optional:-->                    <drac:CityKOATUU>string</drac:CityKOATUU>                    <!--Optional:-->                    <drac:CityType>string</drac:CityType>                    <!--Optional:-->                    <drac:Apartment>string</drac:Apartment>                    <!--Optional:-->                    <drac:BuildingPart>string</drac:BuildingPart>                    <!--Optional:-->                    <drac:Country>string</drac:Country>                    <!--Optional:-->                    <drac:StreetTypeID>100</drac:StreetTypeID>                    <!--Optional:-->                    <drac:CityName>string</drac:CityName>                    <!--Optional:-->                    <drac:Postbox>string</drac:Postbox>                </drac:RegistrationAddress>                <!--Optional:-->                <drac:RNOKPPRefusal>string</drac:RNOKPPRefusal>            </drac:fatherInfo>            <!--Optional:-->            <drac:FatherReason>                <!--Optional:-->                <drac:marriageCert>                    <!--Optional:-->                    <drac:DocNumber>string</drac:DocNumber>                    <!--Optional:-->                    <drac:ComposeDate>2015-08-24</drac:ComposeDate>                    <!--Optional:-->                    <drac:ComposeOrg>string</drac:ComposeOrg>                    <!--Optional:-->                    <drac:RegionOrg>string</drac:RegionOrg>                </drac:marriageCert>            </drac:FatherReason>            <!--Optional:-->            <drac:childBornStipend>                <!--Optional:-->                <drac:CBSParentRecipient>string</drac:CBSParentRecipient>                <!--Optional:-->                <drac:CBSChannel>string</drac:CBSChannel>                <!--Optional:-->                <drac:CBSPostChannelInfo>                    <!--Optional:-->                    <drac:PostalServiceBranchName>string</drac:PostalServiceBranchName>                    <!--Optional:-->                    <drac:Postbox>string</drac:Postbox>                </drac:CBSPostChannelInfo>                <!--Optional:-->                <drac:CBSBankChannelInfo>                    <!--Optional:-->                    <drac:CBSBankMFO>string</drac:CBSBankMFO>                    <!--Optional:-->                    <drac:CBSBankAccount>string</drac:CBSBankAccount>                    <!--Optional:-->                    <drac:CBSBankEDRPOU>string</drac:CBSBankEDRPOU>                    <!--Optional:-->                    <drac:CBSBankName>string</drac:CBSBankName>                </drac:CBSBankChannelInfo>            </drac:childBornStipend>            <!--Optional:-->            <drac:LFCertificates>                <!--Optional:-->                <drac:LFCertChild>false</drac:LFCertChild>                <!--Optional:-->                <drac:LFChildNames>                    <drac:familyName>string</drac:familyName>                    <!--Optional:-->                    <drac:patronymicName>string</drac:patronymicName>                    <drac:givenName>string</drac:givenName>                </drac:LFChildNames>                <!--Optional:-->                <drac:LFCertParents>true</drac:LFCertParents>            </drac:LFCertificates>            <!--Optional:-->            <drac:largeFamilyInfo>                <!--Optional:-->                <drac:birthDate>2015-11-05</drac:birthDate>                <!--Optional:-->                <drac:certificateOfBirth>                    <drac:CBIssueDate>2017-10-20</drac:CBIssueDate>                    <drac:CBIssuer>string</drac:CBIssuer>                    <drac:documentNumber>string</drac:documentNumber>                    <drac:documentSerial>string</drac:documentSerial>                    <!--Optional:-->                    <drac:ARDate>2000-01-06</drac:ARDate>                    <!--Optional:-->                    <drac:ARNumber>string</drac:ARNumber>                    <!--Optional:-->                    <drac:ARIssuer>string</drac:ARIssuer>                </drac:certificateOfBirth>                <!--Optional:-->                <drac:otherChildInfo>                    <drac:familyName>string</drac:familyName>                    <!--Optional:-->                    <drac:patronymicName>string</drac:patronymicName>                    <drac:givenName>string</drac:givenName>                </drac:otherChildInfo>            </drac:largeFamilyInfo>            <!--Optional:-->            <drac:ApplicantType>string</drac:ApplicantType>            <!--Optional:-->            <drac:PortalRequestID>string</drac:PortalRequestID>            <!--Optional:-->            <drac:ApplicationJson>string</drac:ApplicationJson>        </drac:postCompositionRequest>    </s:Body> </s:Envelope>

Приклад відповіді на запит postCompositionRequest

У відповідь на запит PostCompositionRequest надсилається відповідь postCompositionRequestResult, яка містить в собі статус опрацювання запиту та його ідентифікатор опрацювання запитів інтеграції у системі ЕСОЗ.

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Header/> <SOAP-ENV:Body> <ns2:postCompositionRequestResult xmlns:ns2="http://wldd.io/emal/soapgw/dracz"> <ns2:processingID>1dec59a5-9f51-4ede-af02-9575fd725d9e</ns2:processingID> <ns2:faultCode>200</ns2:faultCode> </ns2:postCompositionRequestResult> </SOAP-ENV:Body> </SOAP-ENV:Envelope>

Процесинг

  1. Відбувається отримання PostCompositionRequest з допомогою cервісу Трембіти;

  2. Soapgw посилає в api цей запит і апі уже зберігає задачу;

  3. За відсутності непередбачуваних помилок при обробці запиту та проходженні валідації атрибутів запиту по типу даних - отримуємо 200 на postCompositionRequestResult та ІД джоби.

  4. За умови успішного створення джоби відбувається процесинг на API:

    1. Виконується валідація отриманих даних згідно із описаною вище схемою, за наявності невідповідностей (непередані дані або відсутні обовʼязкові атрибути запиту) процедура закінчує виконання із помилкою: "code":1226,"description":"field cannot be blank","details":{"msg":"назва поля в якому невідповідність ХХХХ-ХХХХ-ХХХХ-ХХХХ (номер МВН)\"}}}”. В задачі в task_queue логується перше поле, яке не пройшло перевірку.

    2. Виконується валідація, що інтегарційний статус має бути НЕ DONE (за composition_id шукаємо запис із статусом DONE в табиці integration_processing). У іншому випадку процедура закінчує роботу за помилкою INTEGRATION_DONE (1007) зі сторони API та 400 для користувача на soap;

    3. Виконується валідація, що МВ існує (шукаємо МВ в таблиці composition за атрибутом title та перевіряємо що статус FINAL та тип NEWBORN), у іншому випадку процедура закінчує виконання з помилкою COMPOSITION_NOT_FOUND_ERROR (1000) зі сторони API та 400 для користувача на soap;

    4. Створюємо задачу типу DRACS_NEWBORN_INTEGRATION та за наявності помилок логуємо їх в task_queue.state. Приклад: приклад невалідного запиту та запису по ньому в task_queue

    5. За відсутності помилок - створюємо запис про person в mpi. Процесинг статус задачі змінюється на DONE.

  5. Після успішного опрацювання задачі  відбувається мердж дитини (в таблиці integration_processing задача NEWBORN_POST_COMPOSITION набуває статусу DONE).

  6. Створюємо задачу типу DRACS_NEWBORN_INTEGRATION_RESPONSE.

  7. PostCompositionRequest стає resolved, створюється задача postCompositionResponse.

  8. Формується відповідь і з використанням SOAPGW  вона надсилається в ДРАЦС.

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