A8.1 Messaggio di richiesta
Di seguito si mostra un esempio di messaggio di richiesta per il servizio di richiesta stato consensi.
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/" xmlns:typ="http://www.fascicolosanitario.gov.it/schema/typeSchemaCommunicationConsent">
<S:Header>
<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:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ID="_9f0e7f1c63533be16e6191deb6b6c622" IssueInstant="2016-02-22T10:54:43.029Z" Version="2.0" xsi:schemaLocation="urn:oasis:names:tc:SAML:2.0:assertion saml-schema-assertion-2.0.xsd">
<saml2:Issuer>050</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="#_9f0e7f1c63533be16e6191deb6b6c622">
<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>DWW6yXTLtMTfUvZ1O30ZvOgZVXE=</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^^^&2.16.840.1.113883.2.9.4.3.2&ISO</saml2:NameID>
</saml2:Subject>
<saml2:Conditions NotBefore="2016-02-22T10:54:43.027Z" NotOnOrAfter="2016-02-22T12:54:43.027Z"/>
<saml2:AuthnStatement AuthnInstant="2016-02-22T10:54:43.028Z">
<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">APR</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">050037</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">CONSENT</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">050</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^^^&2.16.840.1.113883.2.9.4.3.2&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 Veneto</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^^^&2.16.840.1.113883.2.9.4.3.2&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>
<ConsentQueryRequest>
<PatientId>RSSMRA75C03F839K^^^&2.16.840.1.113883.2.9.4.3.2&ISO</PatientId>
</ConsentQueryRequest>
</S:Body>
</S:Envelope>
A8.2 Messaggio di risposta con successo
Di seguito si mostra un esempio di messaggio di risposta relativo al servizio di richiesta di stato consensi.
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header/>
<S:Body>
<ConsentQueryResponse>
<Status>Success</Status>
<PatientId>RSSMRA75C03F839K^^^&2.16.840.1.113883.2.9.4.3.2&ISO</PatientId>
<ConsentList>
<Consent date="2017-02-18T09:30:10Z" name="C1">
<value>true</value>
<note>il paziente ha fornito il consenso</note>
</Consent>
<Consent date="2017-02-18T09:30:10Z" name="C2">
<value>false</value>
<note>il paziente non ha fornito il consenso</note>
</Consent>
<Consent date="" name="C3">
<value>false</value>
<note>il paziente non ha fornito il consenso</note>
</Consent>
</ConsentList>
<DisclosuresIdPast>120^0001</DisclosuresIdPast>
<DisclosuresIdCurrent>120^0003</DisclosuresIdCurrent>
</ConsentQueryResponse>
</S:Body>
</S:Envelope>
A8.3 Messaggio di risposta con fallimento
Di seguito si mostra un esempio di messaggio di errore relativo al servizio di richiesta di stato consensi.
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Header/>
<S:Body>
<ConsentQueryResponse>
<Status>Failure</Status>
<Error codeContext="Wrong attribute value of purpose of use for consents services" errorCode="CON1"/>
</ConsentQueryResponse>
</S:Body>
</S:Envelope>