@@ -10,6 +10,191 @@ See also [EPD by example's Retrieve Document Set](https://github.com/ehealthsuis
1010
1111Generation rules for CH EMED EPR [ PML (Medication List)] ( https://fhir.ch/ig/ch-emed-epr/document_pml.html ) and [ PMLC (Medication Card)] ( https://fhir.ch/ig/ch-emed-epr/document_pmlc.html ) documents are described in the [ CH EMED EPR IG] ( https://fhir.ch/ig/ch-emed-epr/ ) .
1212
13+ ## Samples
14+
15+ ### EMED
16+
17+ #### Request
18+
19+ ` Header `
20+ ``` http
21+ POST https://test.ahdis.ch/eprik-cara/camel/pmp-int/mag-pmp-int/pmp/services/xds/iti43 HTTP/1.1
22+ host: test.ahdis.ch
23+ x-request-id: 9e267acd6864a09d5b00e782e3b49423
24+ x-real-ip: 188.154.194.120
25+ x-forwarded-host: test.ahdis.ch
26+ x-forwarded-port: 443
27+ x-forwarded-proto: https
28+ x-forwarded-scheme: https
29+ x-scheme: https
30+ content-length: 8920
31+ content-type: multipart/related; type="application/xop+xml"; boundary="uuid:fe38a46e-a89a-4810-856a-28f5b866b9d8"; start="<root.message@cxf.apache.org>"; start-info="application/soap+xml"
32+ accept: */*
33+ user-agent: Apache-CXF/3.6.2
34+ cache-control: no-cache
35+ pragma: no-cache
36+ ```
37+
38+ ` Body `
39+ ``` xml
40+ --uuid:fe38a46e-a89a-4810-856a-28f5b866b9d8
41+ Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml"
42+ Content-Transfer-Encoding: binary
43+ Content-ID: <root .message@cxf.apache.org>
44+
45+ <soap : Envelope xmlns : soap =" http://www.w3.org/2003/05/soap-envelope" >
46+ <soap : Header >
47+ <wsse : Security xmlns : wsse =" http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" >
48+ <saml2 : Assertion xmlns : saml2 =" urn:oasis:names:tc:SAML:2.0:assertion" xmlns : xsd =" http://www.w3.org/2001/XMLSchema" ID =" _ef4ef6e0-4d28-43cf-8b02-45855b6b5341" IssueInstant =" 2025-10-24T14:10:58.082024400Z" Version =" 2.0" >
49+ <saml2 : Issuer >http://ith-icoserve.com/eHealthSolutionsSTS</saml2 : Issuer >
50+ <ds : Signature xmlns : ds =" http://www.w3.org/2000/09/xmldsig#" >
51+ <ds : SignedInfo >
52+ <ds : CanonicalizationMethod Algorithm =" http://www.w3.org/2001/10/xml-exc-c14n#" />
53+ <ds : SignatureMethod Algorithm =" http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" />
54+ <ds : Reference URI =" #_ef4ef6e0-4d28-43cf-8b02-45855b6b5341" >
55+ <ds : Transforms >
56+ <ds : Transform Algorithm =" http://www.w3.org/2000/09/xmldsig#enveloped-signature" />
57+ <ds : Transform Algorithm =" http://www.w3.org/2001/10/xml-exc-c14n#" >
58+ <ec : InclusiveNamespaces xmlns : ec =" http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList =" xsd" />
59+ </ds : Transform >
60+ </ds : Transforms >
61+ <ds : DigestMethod Algorithm =" http://www.w3.org/2001/04/xmlenc#sha256" />
62+ <ds : DigestValue >U9hLZugp8YvFib3TUavtzZzYCRROaPgl5LkuYJ2ttJ8=</ds : DigestValue >
63+ </ds : Reference >
64+ </ds : SignedInfo >
65+ <ds : SignatureValue >[Signature removed for better readability]</ds : SignatureValue >
66+ <ds : KeyInfo >
67+ <ds : X509Data >
68+ <ds : X509Certificate >[Certificate removed for better readability]</ds : X509Certificate >
69+ </ds : X509Data >
70+ </ds : KeyInfo >
71+ </ds : Signature >
72+ <saml2 : Subject >
73+ <saml2 : NameID Format =" urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" NameQualifier =" urn:e-health-suisse:2015:epr-spid" >761337618116306629</saml2 : NameID >
74+ <saml2 : SubjectConfirmation Method =" urn:oasis:names:tc:SAML:2.0:cm:bearer" >
75+ <saml2 : SubjectConfirmationData InResponseTo =" ID_fcbfa1e0-7d47-49a2-8d21-f5bd98cd88a7" NotOnOrAfter =" 2025-10-24T14:14:41.829Z" Recipient =" https://ws-pmp-int.cara.ch/iua" />
76+ </saml2 : SubjectConfirmation >
77+ </saml2 : Subject >
78+ <saml2 : Conditions NotBefore =" 2025-10-24T14:09:40.829Z" NotOnOrAfter =" 2025-10-24T14:14:41.829Z" >
79+ <saml2 : AudienceRestriction >
80+ <saml2 : Audience >urn:e-health-suisse:token-audience:all-communities</saml2 : Audience >
81+ </saml2 : AudienceRestriction >
82+ </saml2 : Conditions >
83+ <saml2 : AuthnStatement AuthnInstant =" 2025-10-24T14:09:41.829Z" >
84+ <saml2 : AuthnContext >
85+ <saml2 : AuthnContextClassRef >urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml2 : AuthnContextClassRef >
86+ </saml2 : AuthnContext >
87+ </saml2 : AuthnStatement >
88+ <saml2 : AttributeStatement >
89+ <saml2 : Attribute Name =" urn:oasis:names:tc:xspa:1.0:subject:subject-id" >
90+ <saml2 : AttributeValue xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : type =" xsd:string" >MARIJE GOTTSPONER</saml2 : AttributeValue >
91+ </saml2 : Attribute >
92+ <saml2 : Attribute Name =" urn:oasis:names:tc:xacml:2.0:subject:role" >
93+ <saml2 : AttributeValue >
94+ <Role xmlns =" urn:hl7-org:v3" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" code =" PAT" codeSystem =" 2.16.756.5.30.1.127.3.10.6" codeSystemName =" eHealth Suisse EPR Actors" displayName =" Patient" xsi : type =" CE" />
95+ </saml2 : AttributeValue >
96+ </saml2 : Attribute >
97+ <saml2 : Attribute Name =" urn:oasis:names:tc:xspa:1.0:subject:organization-id" />
98+ <saml2 : Attribute Name =" urn:oasis:names:tc:xspa:1.0:subject:organization" />
99+ <saml2 : Attribute Name =" urn:oasis:names:tc:xspa:1.0:subject:purposeofuse" >
100+ <saml2 : AttributeValue >
101+ <PurposeOfUse xmlns =" urn:hl7-org:v3" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" code =" NORM" codeSystem =" 2.16.756.5.30.1.127.3.10.5" codeSystemName =" eHealth Suisse Verwendungszweck" displayName =" Normal Access" xsi : type =" CE" />
102+ </saml2 : AttributeValue >
103+ </saml2 : Attribute >
104+ <saml2 : Attribute Name =" urn:oasis:names:tc:xacml:2.0:resource:resource-id" >
105+ <saml2 : AttributeValue xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : type =" xsd:string" >761337618116306629^^^& 2.16.756.5.30.1.127.3.10.3& ISO</saml2 : AttributeValue >
106+ </saml2 : Attribute >
107+ <saml2 : Attribute Name =" urn:ihe:iti:xca:2010:homeCommunityId" NameFormat =" urn:oasis:names:tc:SAML:2.0:attrname-format:uri" >
108+ <saml2 : AttributeValue xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xsi : type =" xsd:anyURI" >urn:oid:2.16.756.5.30.1.191.1.0</saml2 : AttributeValue >
109+ </saml2 : Attribute >
110+ </saml2 : AttributeStatement >
111+ </saml2 : Assertion >
112+ </wsse : Security >
113+ <Action soap : mustUnderstand =" true" xmlns =" http://www.w3.org/2005/08/addressing" >urn:ihe:iti:2007:RetrieveDocumentSet</Action >
114+ <MessageID xmlns =" http://www.w3.org/2005/08/addressing" >urn:uuid:361adfb8-e9fd-43a3-b295-6fbd4d96394a</MessageID >
115+ <To xmlns =" http://www.w3.org/2005/08/addressing" >https://test.ahdis.ch/eprik-cara/camel/pmp-int/mag-pmp-int/pmp/services/xds/iti43</To >
116+ <ReplyTo xmlns =" http://www.w3.org/2005/08/addressing" >
117+ <Address >http://www.w3.org/2005/08/addressing/anonymous</Address >
118+ </ReplyTo >
119+ </soap : Header >
120+ <soap : Body >
121+ <xds : RetrieveDocumentSetRequest xmlns : rmd =" urn:ihe:iti:rmd:2017" 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 =" urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns : xds =" urn:ihe:iti:xds-b:2007" xmlns : rs =" urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" >
122+ <xds : DocumentRequest >
123+ <xds : RepositoryUniqueId >2.16.756.5.30.1.1625.3.1.2.2</xds : RepositoryUniqueId >
124+ <xds : DocumentUniqueId >urn:uuid:14553069-399b-4845-ba35-30612e14e115</xds : DocumentUniqueId >
125+ </xds : DocumentRequest >
126+ </xds : RetrieveDocumentSetRequest >
127+ </soap : Body >
128+ </soap : Envelope >
129+
130+ --uuid:fe38a46e-a89a-4810-856a-28f5b866b9d8--
131+ ```
132+
133+ #### Response
134+
135+ ` Header `
136+ ``` http
137+ 200
138+ Connection: Keep-Alive
139+ Content-Type: multipart/related; type="application/xop+xml"; boundary="uuid:257c3e80-0248-4d19-aeec-f81366d06e54"; start="<root.message@cxf.apache.org>"; start-info="application/soap+xml"
140+ Date: Fri, 24 Oct 2025 14:11:00 GMT
141+ Keep-Alive: timeout=5, max=99
142+ Server: Apache
143+ Transfer-Encoding: chunked
144+ ```
145+
146+ ` Body `
147+ ``` xml
148+ --uuid:257c3e80-0248-4d19-aeec-f81366d06e54
149+ Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml"
150+ Content-Transfer-Encoding: binary
151+ Content-ID: <root .message@cxf.apache.org>
152+
153+ <soap : Envelope xmlns : soap =" http://www.w3.org/2003/05/soap-envelope" >
154+ <soap : Header >
155+ <Action xmlns =" http://www.w3.org/2005/08/addressing" >urn:ihe:iti:2007:RetrieveDocumentSetResponse</Action >
156+ <MessageID xmlns =" http://www.w3.org/2005/08/addressing" >urn:uuid:913a5539-f67b-4c94-8d9d-803e68714cb4</MessageID >
157+ <To xmlns =" http://www.w3.org/2005/08/addressing" >http://www.w3.org/2005/08/addressing/anonymous</To >
158+ <RelatesTo xmlns =" http://www.w3.org/2005/08/addressing" >urn:uuid:361adfb8-e9fd-43a3-b295-6fbd4d96394a</RelatesTo >
159+ </soap : Header >
160+ <soap : Body >
161+ <xds : RetrieveDocumentSetResponse xmlns : rmd =" urn:ihe:iti:rmd:2017" 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 =" urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns : xds =" urn:ihe:iti:xds-b:2007" xmlns : rs =" urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" >
162+ <rs : RegistryResponse status =" urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success" />
163+ <xds : DocumentResponse >
164+ <xds : RepositoryUniqueId >2.16.756.5.30.1.1625.3.1.2.2</xds : RepositoryUniqueId >
165+ <xds : DocumentUniqueId >urn:uuid:14553069-399b-4845-ba35-30612e14e115</xds : DocumentUniqueId >
166+ <xds : mimeType >application/json+fhir</xds : mimeType >
167+ <xds : Document >
168+ <xop : Include xmlns : xop =" http://www.w3.org/2004/08/xop/include" href =" cid:a3062b13-58e7-4516-872e-fa67ec6a86ad-91@urn%3Aihe%3Aiti%3Axds-b%3A2007" />
169+ </xds : Document >
170+ </xds : DocumentResponse >
171+ </xds : RetrieveDocumentSetResponse >
172+ </soap : Body >
173+ </soap : Envelope >
174+
175+ --uuid:257c3e80-0248-4d19-aeec-f81366d06e54
176+ Content-Type: application/json+fhir
177+ Content-Transfer-Encoding: binary
178+ Content-ID: <a3062b13-58e7-4516-872e-fa67ec6a86ad-91 @urn:ihe:iti:xds-b:2007>
179+
180+ {
181+ "resourceType": "Bundle",
182+ "meta": {
183+ "profile": [
184+ "http://fhir.ch/ig/ch-emed-epr/StructureDefinition/ch-emed-epr-document-medicationcard"
185+ ]
186+ },
187+ "identifier": {
188+ "system": "urn:ietf:rfc:3986",
189+ "value": "urn:uuid:14553069-399b-4845-ba35-30612e14e115"
190+ },
191+ "type": "document",
192+ "timestamp": "2025-10-24T16:10:59.765+02:00",
193+ "entry": [Content removed for better readability]
194+ }
195+ --uuid:257c3e80-0248-4d19-aeec-f81366d06e54--
196+ ```
197+
13198## Error codes
14199
15200All of these can be errors or warnings.
0 commit comments