A2 Servizio per il recupero di un documento

A2.1 Messaggio di richiesta

Di seguito si mostra un esempio di messaggio di richiesta di recupero di un documento, inoltrato dall’INI alla RCD.

<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope">
    <S:Header>
        <To xmlns="http://www.w3.org/2005/08/addressing">
http://localhost:8084/XDSDocumentRepositoryRetrieve/RetrieveDocumentSet</To>
        <Action xmlns="http://www.w3.org/2005/08/addressing">urn:ihe:iti:2007:RetrieveDocumentSet</Action>
        <ReplyTo xmlns="http://www.w3.org/2005/08/addressing">
            <Address>http://www.w3.org/2005/08/addressing/anonymous</Address>
        </ReplyTo>
        <FaultTo xmlns="http://www.w3.org/2005/08/addressing">
            <Address>http://www.w3.org/2005/08/addressing/anonymous</Address>
        </FaultTo>
        <MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:40f7ff2e-1029-41e1-88b9-48d7aeb0a713</MessageID>
        <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
            <saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ID="_1f65ae65f1beae602b47baa99fc4d66b" IssueInstant="2016-02-18T14:25:14.882Z" Version="2.0" xsi:schemaLocation="urn:oasis:names:tc:SAML:2.0:assertion saml-schema-assertion-2.0.xsd">
                <saml2:Issuer>ANA</saml2:Issuer>
                <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
                    <ds:SignedInfo>
                        <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                        <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
                        <ds:Reference URI="#_1f65ae65f1beae602b47baa99fc4d66b">
                            <ds:Transforms>
                                <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
                                <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                            </ds:Transforms>
                            <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                            <ds:DigestValue>4Izk2mE2rxBA2xKk+DxPRYzra5s=</ds:DigestValue>
                        </ds:Reference>
                    </ds:SignedInfo>
                    <ds:SignatureValue>…………………</ds:SignatureValue>
                    <ds:KeyInfo>
                        <ds:X509Data>
                            <ds:X509Certificate>……………………</ds:X509Certificate>
                        </ds:X509Data>
                    </ds:KeyInfo>
                </ds:Signature>
                <saml2:Subject>
                    <saml2:NameID>RSSMRA75C03F839K</saml2:NameID>
                </saml2:Subject>
                <saml2:Conditions NotBefore="2016-02-18T14:23:14.088Z" NotOnOrAfter="2016-08-24T02:23:14.088Z"/>
                <saml2:AttributeStatement>
                    <saml2:Attribute Name="CF_List">
                        <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-istance" xsi:type="ident:CFtype">
                            <ident:CF xmlns:ident="http://www.fascicolosanitario.gov.it/identificazione" CurrentStatus="true">RSSMRA75C03F839K</ident:CF>
                        </saml2:AttributeValue>
                        <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-istance" xsi:type="ident:CFtype">
                            <ident:CF xmlns:ident="http://www.fascicolosanitario.gov.it/identificazione" CurrentStatus="false" Validity="2011-09-10T07:25:00.000Z">SSSDLS93B01F257J</ident:CF>
                        </saml2:AttributeValue>
                    </saml2:Attribute>
         </saml2:AttributeStatement>
            </saml2:Assertion>
            <saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ID="_10bfca1d4d7f300a59b6e95d0f45d5bc" IssueInstant="2016-02-18T14:25:14.953Z" Version="2.0" xsi:schemaLocation="urn:oasis:names:tc:SAML:2.0:assertion saml-schema-assertion-2.0.xsd">
                <saml2:Issuer>120</saml2:Issuer>
                <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
                    <ds:SignedInfo>
                        <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
                        <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
                        <ds:Reference URI="#_10bfca1d4d7f300a59b6e95d0f45d5bc">
                            <ds:Transforms>
                                <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
                                <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#">
                                    <ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="xs"/>
                                </ds:Transform>
                            </ds:Transforms>
                            <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
                            <ds:DigestValue>R/IKALJeonJcosS5FlHqytEWtyo=</ds:DigestValue>
                        </ds:Reference>
                    </ds:SignedInfo>
                    <ds:SignatureValue>………</ds:SignatureValue>
                    <ds:KeyInfo>
                        <ds:X509Data>
                            <ds:X509Certificate>……………</ds:X509Certificate>
                        </ds:X509Data>
                    </ds:KeyInfo>
                </ds:Signature>
                <saml2:Subject>
                    <saml2:NameID>VRDMRC67T20I257E^^^&amp;2.16.840.1.113883.2.9.4.3.2&amp;ISO</saml2:NameID>
                </saml2:Subject>
                <saml2:Conditions NotBefore="2016-02-18T14:25:14.951Z" NotOnOrAfter="2016-08-24T02:25:14.951Z"/>
                <saml2:AuthnStatement AuthnInstant="2016-02-18T14:25:14.952Z">
                    <saml2:AuthnContext>
                        <saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:X509</saml2:AuthnContextClassRef>
                    </saml2:AuthnContext>
                </saml2:AuthnStatement>
                <saml2:AttributeStatement>
                    <saml2:Attribute Name="urn:oasis:names:tc:xacml:2.0:subject:role" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string">AAS</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:environment:locality" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string">12037</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:subject:purposeofuse" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string">TREATMENT</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:resource:hl7:type" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string">('60591-5^^2.16.840.1.113883.6.1')</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:subject:organization-id" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string">120</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="urn:oasis:names:tc:xacml:1.0:subject:subject-id" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string">VRDMRC67T20I257E^^^&amp;2.16.840.1.113883.2.9.4.3.2&amp;ISO</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:subject:organization" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string">regione Lazio</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="urn:oasis:names:tc:xacml:1.0:resource:resource-id" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string">RSSMRA75C03F839K^^^&amp;2.16.840.1.113883.2.9.4.3.2&amp;ISO</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="urn:oasis:names:tc:xspa:1.0:resource:patient:consent" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string">true</saml2:AttributeValue>
                    </saml2:Attribute>
                    <saml2:Attribute Name="urn:oasis:names:tc:xacml:1.0:action:action-id" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri">
                        <saml2:AttributeValue xsi:type="xs:string">READ</saml2:AttributeValue>
                    </saml2:Attribute>
                </saml2:AttributeStatement>
            </saml2:Assertion>
        </wsse:Security>
    </S:Header>
    <S:Body>

        <RetrieveDocumentSetRequest xmlns="urn:ihe:iti:xds-b:2007" xmlns:ns2="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:ns3="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:ns4="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:ns5="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0">
            <DocumentRequest>
                <RepositoryUniqueId>2.16.840.1.113883.2.9.2.80.4.5.113883</RepositoryUniqueId>
                <DocumentUniqueId>2.16.840.1.113883.2.9.2.80.4.4^012345</DocumentUniqueId>
            </DocumentRequest>
        </RetrieveDocumentSetRequest>
    </S:Body>
</S:Envelope>

 

A2.2 Messaggio di risposta con successo
 

Di seguito si mostra un esempio di messaggio di risposta con un documento.

<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
    <S:Header>
        <To xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/anonymous</To>
        <Action xmlns="http://www.w3.org/2005/08/addressing">urn:ihe:iti:2007:RetrieveDocumentSetResponse</Action>
        <MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:f1b195eb-f377-4b2b-81ae-a25d587b9075</MessageID>
        <RelatesTo xmlns="http://www.w3.org/2005/08/addressing">uuid:44511422-c121-4e0b-9e6c-fdf892319012</RelatesTo>
    </S:Header>
    <S:Body>
        <ihe:RetrieveDocumentSetResponse xmlns:ihe="urn:ihe:iti:xds-b:2007" xmlns:lcm="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0">
            <rs:RegistryResponse status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success"/>
            <ihe:DocumentResponse>
                <ihe:HomeCommunityId>urn:oid:2.16.840.1.113883.2.9.2.80</ihe:HomeCommunityId>
                <ihe:RepositoryUniqueId>2.16.840.1.113883.2.9.2.80.4.5.113883</ihe:RepositoryUniqueId>
                <ihe:DocumentUniqueId>2.16.840.1.113883.2.9.2.80.4.4^012345</ihe:DocumentUniqueId>
                <ihe:mimeType>text/xml</ihe:mimeType>
                <ihe:Document>[Documento codificato in formato BASE64]</ihe:Document>
            </ihe:DocumentResponse>
        </ihe:RetrieveDocumentSetResponse>
    </S:Body>
</S:Envelope>

 

A2.3 Messaggio di risposta con fallimento

Di seguito si mostra un esempio di messaggio di errore relativo ad una richiesta di recupero documento (l’errore è generato perché l’identificativo del repository non è riconosiuto).

<S:Envelope xmlns:S="http://www.w3.org/2003/05/soap-envelope" xmlns:env="http://www.w3.org/2003/05/soap-envelope">
    <S:Header>
        <To xmlns="http://www.w3.org/2005/08/addressing">http://www.w3.org/2005/08/addressing/anonymous</To>
        <Action xmlns="http://www.w3.org/2005/08/addressing">urn:ihe:iti:2007:RetrieveDocumentSetResponse</Action>
        <MessageID xmlns="http://www.w3.org/2005/08/addressing">uuid:39e6ae4f-3c4f-423f-aafe-e3557d6c6e10</MessageID>
        <RelatesTo xmlns="http://www.w3.org/2005/08/addressing">uuid:b74d9014-baca-42ef-93be-69e520d7e16c</RelatesTo>
    </S:Header>
    <S:Body>
        <ihe:RetrieveDocumentSetResponse xmlns:ihe="urn:ihe:iti:xds-b:2007" xmlns:lcm="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:query="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:rim="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:rs="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0">
            <rs:RegistryResponse status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Failure">
                <rs:RegistryErrorList>
                    <rs:RegistryError codeContext="Do not understand documentUniqueId: 2.16.840.1.113883.2.9.2.80.222.4^012345" errorCode="XDSDocumentUniqueIdError" severity="urn:oasis:names:tc:ebxml-regrep:ErrorSeverityType:Error"/>
                </rs:RegistryErrorList>
            </rs:RegistryResponse>
        </ihe:RetrieveDocumentSetResponse>
    </S:Body>
</S:Envelope>

 

 

Ultimo aggiornamento: 06/02/2018