Page History
...
Det er op til anvenderen/udvikleren selv at vælge platform og frameworks, der passer til resten af dennes løsning. Fra et udvikler perspektiv kan man enten vælge selv at generere stubkode udfra de standardiserede WSDL filer eller at anvende et tredjepartsprodukt. Her gives et forslag til, hvordan det kan gribes an med tredjepartsproduktet IPF Open eHealth Integration Platform, som forudsætter man arbejder på en java platform. Man behøver ikke at basere alting på Camel, men kan med fordel nøjes med at inkludere biblioteket IPF Commons IHE XDS i sin kodebase. Her findes både stubbe og en masse anvendelige utilities. Andre platforme kan have tilsvarende værktøjer og muligheder.
Eksempelkoden stammer oprindeligt (er tilrettet for simplificering) fra DROS integrationstest og kan findes her: https://svn.nspop.dk/svnsrc/components/dros/trunk/
ITI snitfladerne kaldes som SOAP web services, og er i det såkaldte XML basererede "RIM format", der er specificeret af IHE XDS standarden. Open eHealth frameworket kan blandt andet mappe fra RIM formatet til en en "OpeneHealth core model", som er java klasser. Og gør det at udvikle ITI kald lettere at arbejde med.
...
Alle brugerhistorier indeholder eksempler på succesfulde requests og responses.
Derudover skal den anvendende organisation være whitelistet til kald til DROS. Dette gøres ved at oprette en supportsag via https://www.nspop.dk/category/sup - husk at vedhæfte den offentlige del af det certifikat, der skal anvendes eller angiv CVR eller certifkatets uuid i sagen.
Der kan være flere instanser af DROS kørende. Er dette tilfælde, vil der være et krav til hvilken dokument type, man kalder den enkelte med. Det vil fremgå af den returnerede fejlbesked, hvilke type koder, man kan anvende for den kaldte DROS.
Fejl i autentificeringen (herunder whitelisting) rapporteres tilbage til brugeren som en SOAP Fault.
Understøttelse af brugerhistorie: Opret Stable Dokument
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
// Indlæs dokumentet, som skal registreres String documentPayload = getAppointmentXmlDocument(); // Opret documentEntry - boks 2 (core model) i transformeringsfiguren DocumentEntry documentEntry = createDocumentEntry(); // Opret kald/request - boks 2 og 3 (core model og RIM format) i transformeringsfiguren ProvideAndRegisterDocumentSetRequestType provideAndRegisterDocumentSetRequest = buildProvideAndRegisterDocumentSetRequestAftale(documentEntry, documentPayload); // Udfør kald - ITI kaldet mellem boks 3 (RIM format) og DROS i transformeringsfiguren RegistryResponseType registryResponse = iti41PortType.documentRepositoryProvideAndRegisterDocumentSetB(provideAndRegisterDocumentSetRequest); // Aflæs kaldets svar - boks 3 og 2 (RIM format og core model) i transformeringsfiguren handleResponse(registryResponse); |
Sammenligner man ovenståede kodelinier med med transformeringsfiguren ovenfor så svarer kodelinie:
- 5 til boks 2 (core model)
- 8 til boks 2 og 3 (core model og RIM format)
- svarer til boks 2 og 3 (core model og RIM format) i transformeringsfiguren
- 11 til ITI kaldet mellem boks 3 (RIM format) og DROS
- svarer til ITI kaldet mellem boks 3 (RIM format) og DROS i transformeringsfiguren
- 14 til boks 3 og 2 (RIM format og core model)
- svarer til boks 3 og 2 (RIM format og core model) i transformeringsfiguren
En del af felterne i documentEntry er felter, som kan findes i selve header delen af XML dokumentet. Derfor kan det at lave en documentEntry gøres på 2 måder: Hvis man selv har skabt XML dokumentetEn del af felterne i documentEntry er felter, som kan findes i selve header delen af XML dokumentet. Derfor kan det at lave en documentEntry gøres på 2 måder: Hvis man selv har skabt XML dokumentet, så har man disse felters værdi og kan sætte dem direkte. Er XML dokumentet skabt på forhånd, kan man deserialisere det, og hente relevante informationer ud.
...
- Den danske metadata profil: https://svn.medcom.dk/svn/draftsreleases/Standarder/IHE/DK_profil_metadata/Metadata-v096.pdf
- XDS metadata value set: http://svn.medcom.dk/svn/drafts/Standarder/IHE/OID/DK-IHE_Metadata-Common_Code_systems-Value_sets.xlsx
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
---------------------------- ID: 8 Response-Code: 200 Encoding: ISO-8859-1 Content-Type: multipart/related; type="application/xop+xml"; boundary="uuid:72910188-7f13-44f9-8804-ea150846fa23"; start="<root.message@cxf.apache.org>"; start-info="text/xml" Headers: {connection=[keep-alive], content-type=[multipart/related; type="application/xop+xml"; boundary="uuid:72910188-7f13-44f9-8804-ea150846fa23"; start="<root.message@cxf.apache.org>"; start-info="text/xml"], Date=[Wed, 24 Mar 2021 11:57:53 GMT], Server=[WildFly/8], transfer-encoding=[chunked], X-Powered-By=[Undertow/1]} Payload: --uuid:72910188-7f13-44f9-8804-ea150846fa23 Content-Type: application/xop+xml; charset=UTF-8; type="text/xml" Content-Transfer-Encoding: binary Content-ID: <root.message@cxf.apache.org> <?xml version="1.0" encoding="UTF-8"?> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Body> <ns3:RegistryResponse xmlns:ns6="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:ns5="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:ns4="urn:ihe:iti:xds-b:2007" xmlns:ns3="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:ns2="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success"/> </soap:Body> </soap:Envelope> --uuid:72910188-7f13-44f9-8804-ea150846fa23-- -------------------------------------- |
Understøttelse af brugerhistorie: Opdater dokument metadata
Til at rette et dokument skal servicen ITI-57 Update Document Set anvendes. Man kan på NSP kun opdatere metadata for et stable dokument, og ikke et on-demand dokument.
Det er anvenderens opgave at specificere, hvilket dokument der skal opdateres ved at matche logcialId, uniqueId og objecttype (stable). Det fulde sæt af metadata skal sendes med i requestet og ikke kun, som ønskes ændret.
Helt overordnet vil et kald ITI-57 kunne laves med:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
// Skaf documententry detaljer, som skal opdateres
DocumentEntry documentEntryToUpdate = getDocumentEntryToUpdate();
// Tildel ny entryuuid
documentEntryToUpdate.setEntryUuid(generateUUID());
// Opdater version
documentEntryToUpdate.setVersion(new Version("2"));
// Opdater det metadata som skal justeres. F.eks. practice setting
documentEntryToUpdate.setPracticeSettingCode(practiceSettingCode);
// Opret kald/ request
SubmitObjectsRequest submitObjectsRequest = createUpdateDocumentMetadataRequest(documentEntryToUpdate);
// Udfør kald
RegistryResponseType registryResponse = iti57PortType.documentRegistryUpdateDocumentSet(submitObjectsRequest);
// Aflæs kaldets svar
handleResponse(registryResponse); |
At lave SubmitObjectsRequest kan gøres på følgende måde:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
public SubmitObjectsRequest createUpdateRequest(DocumentEntry documentEntryToUpdate) {
RegisterDocumentSet request = new RegisterDocumentSet();
String oldVersion = "1";
// Opret SubmissionSet
SubmissionSet submissionSet = createSubmissionSetForDocumentEntry(generateUUID(), documentEntryToUpdate, generateUUID());
request.setSubmissionSet(submissionSet);
// Opret association mellem SubmissionSet og DocumentEntry der skal opdateres
Association association = createHasMemberAssociationWithPropagation(submissionSet, documentEntryToUpdate, oldVersion);
request.getAssociations().add(association);
// Sæt de nye metadata
request.getDocumentEntries().add(documentEntryToUpdate);
// Transformer request - dette laver core model om til RIM format
RegisterDocumentSetTransformer requestTransformer = new RegisterDocumentSetTransformer(ebXMLFactory);
EbXMLSubmitObjectsRequest30 ebxmlRequest = (EbXMLSubmitObjectsRequest30) requestTransformer.toEbXML(registerDocumentSet);
SubmitObjectsRequest submitObjectsRequest = ebxmlRequest.getInternal();
return submitObjectsRequest;
} |
At oprette SubmissionSet kan gøres som:
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
private SubmissionSet createSubmissionSetForDocumentEntry(String id, DocumentEntry documentEntry, String uniqueId) {
SubmissionSet submissionSet = new SubmissionSet();
submissionSet.setEntryUuid(id);
submissionSet.setLogicalUuid(id);
submissionSet.setUniqueId(uniqueId);
submissionSet.setPatientId(documentEntry.getPatientId());
submissionSet.setSourceId(documentEntry.getRepositoryUniqueId());
submissionSet.setContentTypeCode(documentEntry.getTypeCode());
submissionSet.setSubmissionTime(new DateTime());
return submissionSet;
} |
Og at oprette en association kan gøres som følgende.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
public Association createHasMemberAssociationWithPropagation(SubmissionSet submissionSet, DocumentEntry documentEntry, String oldVersion) {
Association association = createAssociation(submissionSet, documentEntry);
association.setPreviousVersion(oldVersion);
association.setAssociationPropagation(true);
return association;
}
public Association createAssociation(SubmissionSet submissionSet, DocumentEntry documentEntry) {
// Opret association mellem SubmissionSet og DocumentEntry
Association association = new Association();
association.setAssociationType(AssociationType.HAS_MEMBER);
association.setEntryUuid(generateUUID());
association.setSourceUuid(submissionSet.getEntryUuid());
association.setTargetUuid(documentEntry.getEntryUuid());
association.setAvailabilityStatus(AvailabilityStatus.APPROVED);
association.setLabel(AssociationLabel.ORIGINAL);
return association;
} |
I requestet nedenfor ses opdatering af metadata for et dokument.
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
---------------------------
ID: 12
Address: https://drosurl/dros/iti57
Encoding: UTF-8
Http-Method: POST
Content-Type: application/soap+xml
Headers: {Accept=[*/*]}
Payload:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:medcom="http://www.medcom.dk/dgws/2006/04/dgws-1.0.xsd" xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:sosi="http://www.sosi.dk/sosi/2006/04/sosi-1.0.xsd" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wst="http://schemas.xmlsoap.org/ws/2005/02/trust" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" id="Envelope">
<soapenv:Header>
.... fjernet for overskueligehed...
</soapenv:Header>
<soapenv:Body>
<ns4:SubmitObjectsRequest xmlns:ns4="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" xmlns:ns2="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:ns3="urn:ihe:iti:xds-b:2007" xmlns:ns5="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0">
<RegistryObjectList>
<ExtrinsicObject id="urn:uuid:cb18a01d-b5dc-4880-ae5a-09e2378f3ec8" lid="urn:uuid:8f5f66c8-321d-4fa4-b4af-890018e7719e" mimeType="text/xml" objectType="urn:uuid:7edca82f-054d-47f2-a032-9b2a5b5186c1" status="urn:oasis:names:tc:ebxml-regrep:StatusType:Approved">
<Slot name="creationTime">
<ValueList>
<Value>20240123105924</Value>
</ValueList>
</Slot>
<Slot name="languageCode">
<ValueList>
<Value>da-DK</Value>
</ValueList>
</Slot>
<Slot name="serviceStartTime">
<ValueList>
<Value>20240123105924</Value>
</ValueList>
</Slot>
<Slot name="serviceStopTime">
<ValueList>
<Value>20240123105924</Value>
</ValueList>
</Slot>
<Slot name="repositoryUniqueId">
<ValueList>
<Value>5135212154965747596.2217458485955375452.1706003967039</Value>
</ValueList>
</Slot>
<Slot name="sourcePatientId">
<ValueList>
<Value>ABCDE^^^&1.2.208.176.1.2&ISO</Value>
</ValueList>
</Slot>
<Slot name="sourcePatientInfo">
<ValueList>
<Value>PID-5|Berggren^Nancy^Ann</Value>
<Value>PID-7|19481225</Value>
<Value>PID-8|F</Value>
</ValueList>
</Slot>
<Name>
<LocalizedString charset="UTF-8" value="Dato og tidspunkt for møde mellem patient og sundhedsperson" xml:lang="en-US"/>
</Name>
<VersionInfo versionName="2"/>
<Classification classificationScheme="urn:uuid:93606bcf-9494-43ec-9b4e-a7748d1a838d" classifiedObject="urn:uuid:cb18a01d-b5dc-4880-ae5a-09e2378f3ec8" id="urn:uuid:79698964-1396-4f08-a628-ecf428ba5c41" nodeRepresentation="">
<Slot name="authorInstitution">
<ValueList>
<Value>DROS Testafdeling^^^^^&1.2.208.176.1.1&ISO^^^^12345679999</Value>
</ValueList>
</Slot>
</Classification>
<Classification classificationScheme="urn:uuid:41a5887f-8865-4c09-adf7-e362475b143a" classifiedObject="urn:uuid:cb18a01d-b5dc-4880-ae5a-09e2378f3ec8" id="urn:uuid:34424719-be1e-44de-9254-5a7bbc0839dd" nodeRepresentation="001">
<Slot name="codingScheme">
<ValueList>
<Value>1.2.208.184.100.9</Value>
</ValueList>
</Slot>
<Name>
<LocalizedString charset="UTF-8" value="Klinisk rapport" xml:lang="en-US"/>
</Name>
</Classification>
<Classification classificationScheme="urn:uuid:a09d5840-386c-46f2-b5ad-9c3699a4309d" classifiedObject="urn:uuid:cb18a01d-b5dc-4880-ae5a-09e2378f3ec8" id="urn:uuid:a5a09b50-7dcd-4482-9af9-636cab0dfcd5" nodeRepresentation="urn:ad:dk:medcom:appointmentsummary:full">
<Slot name="codingScheme">
<ValueList>
<Value>1.2.208.184.100.10</Value>
</ValueList>
</Slot>
<Name>
<LocalizedString charset="UTF-8" value="DK Appointment Summary Document schema" xml:lang="en-US"/>
</Name>
</Classification>
<Classification classificationScheme="urn:uuid:f33fb8ac-18af-42cc-ae0e-ed0b0bdb91e1" classifiedObject="urn:uuid:cb18a01d-b5dc-4880-ae5a-09e2378f3ec8" id="urn:uuid:d16b7aba-52cd-4e58-b9ea-e4df5f3b0a92" nodeRepresentation="22232009">
<Slot name="codingScheme">
<ValueList>
<Value>2.16.840.1.113883.6.96</Value>
</ValueList>
</Slot>
<Name>
<LocalizedString charset="UTF-8" value="hospital" xml:lang="en-US"/>
</Name>
</Classification>
<Classification classificationScheme="urn:uuid:cccf5598-8b07-4b77-a05e-ae952c785ead" classifiedObject="urn:uuid:cb18a01d-b5dc-4880-ae5a-09e2378f3ec8" id="urn:uuid:fc652668-9956-4ee0-a8fe-845a9cf3aade" nodeRepresentation="394821009">
<Slot name="codingScheme">
<ValueList>
<Value>2.16.840.1.113883.6.96</Value>
</ValueList>
</Slot>
<Name>
<LocalizedString charset="UTF-8" value="arbejdsmedicin" xml:lang="en-US"/>
</Name>
</Classification>
<Classification classificationScheme="urn:uuid:f0306f51-975f-434e-a61c-c59651d33983" classifiedObject="urn:uuid:cb18a01d-b5dc-4880-ae5a-09e2378f3ec8" id="urn:uuid:d712c782-4c93-45a0-9c1b-1e95bf90d90b" nodeRepresentation="39289-4">
<Slot name="codingScheme">
<ValueList>
<Value>2.16.840.1.113883.6.1</Value>
</ValueList>
</Slot>
<Name>
<LocalizedString charset="UTF-8" value="Follow-up (referred to) provider &or specialist, appointment date" xml:lang="en-US"/>
</Name>
</Classification>
<Classification classificationScheme="urn:uuid:f4f85eac-e6cb-4883-b524-f2705394840f" classifiedObject="urn:uuid:cb18a01d-b5dc-4880-ae5a-09e2378f3ec8" id="urn:uuid:67fea015-d05e-4133-866f-d3b298b50999" nodeRepresentation="N">
<Slot name="codingScheme">
<ValueList>
<Value>2.16.840.1.113883.5.25</Value>
</ValueList>
</Slot>
<Name>
<LocalizedString charset="UTF-8" value="N" xml:lang="en-US"/>
</Name>
</Classification>
<ExternalIdentifier id="urn:uuid:a86b9d82-b2a2-4925-bed5-e117955d2712" identificationScheme="urn:uuid:58a6f841-87b3-4a3e-92fd-a8ffeff98427" registryObject="urn:uuid:cb18a01d-b5dc-4880-ae5a-09e2378f3ec8" value="ABCDE^^^&1.2.208.176.1.2&ISO">
<Name>
<LocalizedString value="XDSDocumentEntry.patientId"/>
</Name>
</ExternalIdentifier>
<ExternalIdentifier id="urn:uuid:4f05d086-f63e-4575-9f19-bac250ee52a3" identificationScheme="urn:uuid:2e82c1f6-a085-4c72-9da3-8640a32e42ab" registryObject="urn:uuid:cb18a01d-b5dc-4880-ae5a-09e2378f3ec8" value="6264145156628305494.3484194301893954463.1706003964982">
<Name>
<LocalizedString value="XDSDocumentEntry.uniqueId"/>
</Name>
</ExternalIdentifier>
</ExtrinsicObject>
<RegistryPackage id="5044f4e8-3954-4c1f-a3f8-4f3f57136e41" lid="5044f4e8-3954-4c1f-a3f8-4f3f57136e41">
<Slot name="submissionTime">
<ValueList>
<Value>20240123095927</Value>
</ValueList>
</Slot>
<Classification classificationScheme="urn:uuid:aa543740-bdda-424e-8c96-df4873be8500" classifiedObject="5044f4e8-3954-4c1f-a3f8-4f3f57136e41" id="urn:uuid:e9431404-c820-4377-9a3c-9114a51b1849" nodeRepresentation="39289-4">
<Slot name="codingScheme">
<ValueList>
<Value>2.16.840.1.113883.6.1</Value>
</ValueList>
</Slot>
<Name>
<LocalizedString charset="UTF-8" value="Follow-up (referred to) provider &or specialist, appointment date" xml:lang="en-US"/>
</Name>
</Classification>
<ExternalIdentifier id="urn:uuid:0ef8a571-6a8f-467d-b3ce-5172fb87acfe" identificationScheme="urn:uuid:6b5aea1a-874d-4603-a4bc-96a0a7b38446" registryObject="5044f4e8-3954-4c1f-a3f8-4f3f57136e41" value="ABCDE^^^&1.2.208.176.1.2&ISO">
<Name>
<LocalizedString value="XDSSubmissionSet.patientId"/>
</Name>
</ExternalIdentifier>
<ExternalIdentifier id="urn:uuid:8b73ff55-1bfc-4797-8601-076976f5bb8f" identificationScheme="urn:uuid:96fdda7c-d067-4183-912e-bf5ee74998a8" registryObject="5044f4e8-3954-4c1f-a3f8-4f3f57136e41" value="20f04de2-d029-4490-a938-2f570e75f788">
<Name>
<LocalizedString value="XDSSubmissionSet.uniqueId"/>
</Name>
</ExternalIdentifier>
<ExternalIdentifier id="urn:uuid:072feba4-6503-4e52-8794-c544da7c09c3" identificationScheme="urn:uuid:554ac39e-e3fe-47fe-b233-965d2a147832" registryObject="5044f4e8-3954-4c1f-a3f8-4f3f57136e41" value="5135212154965747596.2217458485955375452.1706003967039">
<Name>
<LocalizedString value="XDSSubmissionSet.sourceId"/>
</Name>
</ExternalIdentifier>
</RegistryPackage>
<Classification classificationNode="urn:uuid:a54d6aa5-d40d-43f9-88c5-b4633d873bdd" classifiedObject="5044f4e8-3954-4c1f-a3f8-4f3f57136e41" id="urn:uuid:2e3d7f69-e472-4c09-9aee-60c8916f2175"/>
<Association associationType="urn:oasis:names:tc:ebxml-regrep:AssociationType:HasMember" id="057f82dc-2df2-4604-8452-dd82ca01e364" sourceObject="5044f4e8-3954-4c1f-a3f8-4f3f57136e41" status="urn:oasis:names:tc:ebxml-regrep:StatusType:Approved" targetObject="urn:uuid:cb18a01d-b5dc-4880-ae5a-09e2378f3ec8">
<Slot name="SubmissionSetStatus">
<ValueList>
<Value>Original</Value>
</ValueList>
</Slot>
<Slot name="PreviousVersion">
<ValueList>
<Value>1</Value>
</ValueList>
</Slot>
<Slot name="AssociationPropagation">
<ValueList>
<Value>yes</Value>
</ValueList>
</Slot>
</Association>
</RegistryObjectList>
</ns4:SubmitObjectsRequest>
</soapenv:Body>
</soapenv:Envelope>
-------------------------------------- |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
----------------------------
ID: 12
Response-Code: 200
Encoding: UTF-8
Content-Type: text/xml;charset=UTF-8
Headers: {connection=[keep-alive], content-type=[text/xml;charset=UTF-8], Date=[Wed, 24 Mar 2021 12:16:48 GMT], Server=[WildFly/8], transfer-encoding=[chunked], X-Powered-By=[Undertow/1]}
Payload:
<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<ns3:RegistryResponse xmlns:ns6="urn:oasis:names:tc:ebxml-regrep:xsd:query:3.0" xmlns:ns5="urn:oasis:names:tc:ebxml-regrep:xsd:lcm:3.0" xmlns:ns4="urn:ihe:iti:xds-b:2007" xmlns:ns3="urn:oasis:names:tc:ebxml-regrep:xsd:rs:3.0" xmlns:ns2="urn:oasis:names:tc:ebxml-regrep:xsd:rim:3.0" status="urn:oasis:names:tc:ebxml-regrep:ResponseStatusType:Success"/>
</soap:Body>
</soap:Envelope>
--------------------------------------
|
Understøttelse af brugerhistorie: Slet Dokument
...