Différences entre les versions de « Transaction examples »
(Replace ITI-93 with newer ITI-104) |
|||
Ligne 1 : | Ligne 1 : | ||
This page lists examples of transactions using the [[Mobile Access Gateway]] to access the EPD Playground. | This page lists examples of transactions using the [[Mobile Access Gateway]] to access the EPD Playground. You can also find transaction examples in the [https://fhir.ch/ig/ch-epr-fhir/index.html CH EPR FHIR Implementation Guide]. | ||
=== Create / Register Patient === | === Create / Register Patient === |
Version du 25 octobre 2024 à 15:27
This page lists examples of transactions using the Mobile Access Gateway to access the EPD Playground. You can also find transaction examples in the CH EPR FHIR Implementation Guide.
Create / Register Patient
Profile | Patient Master Identity Registry | (PMIR) |
Transaction | Patient Identity Feed FHIR | [ITI-104] |
SOAP Transaction | Patient Identity Feed HL7 V3 | [ITI-44] |
The following example creates a patient ALAN ALPHA (which, by the way, also exists in the gazelle reference environment). Please use own example patient and identifiers when experimenting with the playground.
PUT https://test.ahdis.ch/mag-bfh/fhir/Patient/?identifier=urn:oid:2.16.756.5.30.1.178.1.1%7CPATIENT1 { "resourceType": "Patient", "identifier": [ { "type": { "coding": [ { "system": "http://terminology.hl7.org/CodeSystem/v2-0203", "code": "MR" } ] }, "system": "urn:oid:2.16.756.5.30.1.178.1.1", "value": "PATIENT1", // this is the local ID, please use own value "assigner": { "display": "Klinik H\u00f6heweg" } }, { "system": "urn:oid:2.16.756.5.30.1.127.3.10.3", "value": "DEMO" // this is the EPR SPID, please use own value } ], "name": [ { "family": "ALPHA", "given": [ "ALAN" ] } ], "gender": "male", "birthDate": "1938-02-24", "address": [ { "line": "1_PINETREE", "city": "WEBSTER", "state": "MD", "postalCode": "63119" } ], "managingOrganization": { "identifier": { "system": "urn:oid:2.51.1.3", "value": "7640166732006" // this is the GLP of the responsible health care provider, in this case Dr. med. Marianne Loser. // see https://epdplayground.ch/index.php?title=Demo_Data } } }
- The identifier values in the PUT url must match with your local id given in Patient.identifier
Search patient
Notice: the newest PIXm specifications don't allow anymore to query all patient id's at once. A "target system" has to be given in the query.
Search MPI Identifier using the EPR-SPID (PIXm)
- OID of the EPD Playground's MPI: 1.1.1.99.1
- OID of the EPR-SPID: 2.16.756.5.30.1.127.3.10.3
Which should get you the following response body:
{ "resourceType": "Parameters", "parameter": [ { "name": "targetIdentifier", "valueIdentifier": { "system": "urn:oid:1.1.1.99.1", "value": "0f5a8034-3c8a-4796-bd39-d3ea877a4155" } } ] }
Search local id using the EPR-SPID (PIXm)
- OID of the Klinik Höheweg: 2.16.756.5.30.1.178.1.1
- OID of the EPR-SPID: 2.16.756.5.30.1.127.3.10.3
Which should get you the following response body:
{ "resourceType": "Parameters", "parameter": [ { "name": "targetIdentifier", "valueIdentifier": { "system": "urn:oid:2.16.756.5.30.1.178.1.1", "value": "PATIENT1" } } ] }
Search patient by any identifier (PDQm)
When known, a patient can be searched by any identifier, like the EPR-SPID, the communitys MPI or a local id (e.g. from a primary system):
- EPR-SPID:
GET https://test.ahdis.ch/mag-bfh/fhir/Patient?identifier=2.16.756.5.30.1.127.3.10.3|DEMO
- MPI:
GET https://test.ahdis.ch/mag-bfh/fhir/Patient?identifier=1.1.1.99.1|0f5a8034-3c8a-4796-bd39-d3ea877a4155
- local id:
GET https://test.ahdis.ch/mag-bfh/fhir/Patient?identifier=2.16.756.5.30.1.178.1.1|PATIENT1
This returns a FHIR Bundle:
{ "resourceType": "Bundle", "id": "47b0e100-5475-45e3-9dd2-0ae422bdbed9", "meta": { "lastUpdated": "2021-03-25T10:28:44.250+00:00" }, "type": "searchset", "total": 1, "link": [ { "relation": "self", "url": "https://test.ahdis.ch/mag-bfh/fhir/Patient?identifier=2.16.756.5.30.1.127.3.10.3%7CDEMO" } ], "entry": [ { "fullUrl": "https://test.ahdis.ch/mag-bfh/fhir/Patient/1.1.1.99.1-0f5a8034-3c8a-4796-bd39-d3ea877a4155", "resource": { "resourceType": "Patient", "id": "1.1.1.99.1-0f5a8034-3c8a-4796-bd39-d3ea877a4155", "identifier": [ { "system": "urn:oid:1.1.1.99.1", "value": "0f5a8034-3c8a-4796-bd39-d3ea877a4155" } ], "active": true, "name": [ { "family": "ALPHA", "given": [ "ALAN" ] } ], "gender": "male", "birthDate": "1938-02-24", "address": [ { "city": "WEBSTER", "state": "MD", "postalCode": "63119" } ] } } ] }
Upload a document
Profile | Mobile Access to Health Documents | (MHD) |
Transaction | Provide Document Bundle | [ITI-65] |
SOAP Transaction | Provide and Register Document Set | [ITI-41] |
The following example creates a document for the patient ALAN ALPHA:
POST https://test.ahdis.ch/mag-bfh/fhir
{ "id": "2-7-BundleProvideDocument", "resourceType": "Bundle", "meta": { "profile": [ "http://ihe.net/fhir/StructureDefinition/IHE_MHD_Provide_Minimal_DocumentBundle" ] }, "type": "transaction", "entry": [ { "fullUrl": "urn:uuid:d8d1fe44-07e9-4a84-985f-fde97d77d54b", "resource": { "resourceType": "Binary", "contentType": "text/xml", "data": "<Base64 encoded file content>" }, "request": { "method": "POST", "url": "urn:uuid:d8d1fe44-07e9-4a84-985f-fde97d77d54b" } }, { "fullUrl": "urn:uuid:68a928c0-df48-4743-a291-bfb0609bbddc", "resource": { "resourceType": "DocumentManifest", "masterIdentifier": { "value": "urn:oid:1.3.6.1.4.1.12559.11.13.2.6.2955" }, "identifier": [ { "system": "urn:ietf:rfc:3986", "value": "urn:uuid:8c3e40b2-3cf9-4980-b4fb-cc84ba8a181a" } ], "status": "current", "type": { "coding": [ { "system": "http://snomed.info/sct", "code": "71388002", "display": "Procedure (procedure)" } ] }, "subject": { "reference": "https://test.ahdis.ch/mag-bfh/fhir/Patient/1.1.1.99.1-0f5a8034-3c8a-4796-bd39-d3ea877a4155" }, "content": [ { "reference": "urn:uuid:50383ae5-49e5-4dea-b0e6-660cb9e7b91f" } ], "created": "2020-06-29T12:01:30+00:00", "source": "urn:oid:1.3.6.1.4.1.12559.11.13.2.5", "description": "Hello World example neu" }, "request": { "method": "POST", "url": "urn:uuid:68a928c0-df48-4743-a291-bfb0609bbddc" } }, { "fullUrl": "urn:uuid:50383ae5-49e5-4dea-b0e6-660cb9e7b91f", "resource": { "resourceType": "DocumentReference", "contained": [ { "resourceType": "Patient", "id": "1", "identifier": [ { "use": "official", "system": "1.1.1.99.1", "value": "0f5a8034-3c8a-4796-bd39-d3ea877a4155" } ] } ], "masterIdentifier": { "value": "urn:oid:1.3.6.1.4.1.12559.11.13.2.1.2956" }, "identifier": [ { "use": "official", "system": "urn:ietf:rfc:3986", "value": "urn:uuid:50383ae5-49e5-4dea-b0e6-660cb9e7b91f" } ], "status": "current", "type": { "coding": [ { "system": "http://snomed.info/sct", "code": "721912009", "display": "Medication summary document (record artifact)" } ] }, "category": [ { "coding": [ { "system": "http://snomed.info/sct", "code": "422735006", "display": "Summary clinical document (record artifact)" } ] } ], "subject": { "reference": "https://test.ahdis.ch/mag-bfh/fhir/Patient/1.1.1.99.1-0f5a8034-3c8a-4796-bd39-d3ea877a4155" }, "source": "urn:oid:1.3.6.1.4.1.12559.11.13.2.5", "date": "2020-06-29T11:58:00.000+00:00", "description": "2-7-MedicationCard", "securityLabel": [ { "coding": [ { "system": "http://snomed.info/sct", "code": "17621005", "display": "Normal (qualifier value)" } ] } ], "content": [ { "attachment": { "contentType": "text/xml", "language": "de-CH", "url": "urn:uuid:d8d1fe44-07e9-4a84-985f-fde97d77d54b", "size": 309219 }, "format": { "system": "urn:oid:1.3.6.1.4.1.19376.1.2.3", "code": "urn:ihe:pharm:pml:2013", "display": "Community Medication List" } } ], "context": { "facilityType": { "coding": [ { "system": "http://snomed.info/sct", "code": "264358009", "display": "General practice premises (environment)" } ] }, "practiceSetting": { "coding": [ { "system": "http://snomed.info/sct", "code": "394802001", "display": "General medicine (qualifier value)" } ] }, "sourcePatientInfo": { "reference": "#1" } } }, "request": { "method": "POST", "url": "urn:uuid:5604f114-bf96-4c12-8dac-25715a05cf3f" } } ] }
Update a document
You can not directly update a document. You will to replace it, by uploading a new document with a reference to the other document it replaces. The reference points to the Resource ID of the document to replace (keep in mind here, this is not the temporary ID you assigned to it in the ITI-65 Provide Document Bundle, but the ID assigned by the server. So the Document Bundle is the same as in Upload a Document, with the difference of the additional relatesTo reference in the DocumentReference resource. The EPD Playground then sets the status of the replaced DocumentResource to superseded, so it won't show up in searches for current documents anymore.
POST https://test.ahdis.ch/mag-bfh/fhir
{ "id": "2-7-BundleProvideDocument", "resourceType": "Bundle", "meta": { "profile": [ "http://ihe.net/fhir/StructureDefinition/IHE_MHD_Provide_Minimal_DocumentBundle" ] }, "type": "transaction", "entry": [ { "fullUrl": "urn:uuid:d8d1fe44-07e9-4a84-985f-fde97d77d54b", "resource": { "resourceType": "Binary", ... }, "request": { "method": "POST", "url": "urn:uuid:d8d1fe44-07e9-4a84-985f-fde97d77d54b" } }, { "fullUrl": "urn:uuid:68a928c0-df48-4743-a291-bfb0609bbddc", "resource": { "resourceType": "List", ... }, "request": { "method": "POST", "url": "urn:uuid:68a928c0-df48-4743-a291-bfb0609bbddc" } }, { "fullUrl": "urn:uuid:50383ae5-49e5-4dea-b0e6-660cb9e7b91f", "resource": { "resourceType": "DocumentReference", ... "relatesTo": [ { "code": "replaces", "target": { "reference": "5d7b180a-1407-48e6-99c2-141a9fa303b7" // this is the resource ID of the document reference to replace } } ] }, "request": { "method": "POST", "url": "urn:uuid:5604f114-bf96-4c12-8dac-25715a05cf3f" } } ] }
Search and retrieve a document
Search for DocumentReferences
A FHIR search for DocumentReferences returns a Bundle of DocumentReference resources. Each DocumentReference represents one available document and contains the link for retrieving the document (see below).
Search for SubmissionSets
A FHIR search for List returns a Bundle of List resources. Each List resource represents a submission set, which are documents for a patient that were uploaded together. The List resources refer to the DocumentReference resources, that then contain the link to the actual document.
Retrieve a document
In the DocumentReference resource, under content[0].attachment.url
, you find the link to the actual document.
{ "resourceType": "DocumentReference", ... "content": [ { "attachment": { "contentType": "text/xml", "language": "de-CH", "url": "http://test.ahdis.ch/mag-bfh/camel/xdsretrieve?uniqueId=92100cf9-e6e8-4bf8-a61c-2ee66e69eb2c&repositoryUniqueId=1.1.1.2.31", "size": 80461, "hash": "ZGU4YzRmNDM4ZjAzNmRmNDM0MDUyZWRjYjIzMTNjNDUzOTMyNzg1MQ==", "creation": "2020-06-29T11:58:00+00:00" }, "format": { "system": "urn:oid:1.3.6.1.4.1.19376.1.2.3", "code": "urn:ihe:pharm:pml:2013", "display": "Community Medication List" } } ], ... }
Using this link, you can fetch the document with a GET request: