Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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". Til at realisere disse kald kan tredieparts bibliotekerne fra IPF Open eHealth Integration Platform anvendes. Disse , 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.

Helt overordnet kan det at lave et ITI kald deles op i følgende trin

  1. Opret kald i OpeneHealth code core model
    1. For iti41 kald indebærer det blandt andet opret/indlæs af dokument samt opret af metadata til documententry
    2. For iti42, 57 og 61 indebærer det oprettelse af metadata
  2. Udfør kald - det transformeres til RIM formatet format på vej ud, og tilbage til core model ved returnering automatisk vha. openeHealth frameworket
  3. Aflæs kaldets svar og håndter eventuelle fejl returneret

...

Dette kan illustreres ved følgende tranformeringsdiagram, hvor man ser core modellen blive transformateret til RIM formatet, og efterfølgende et ITI kald udført. Resultatet af ITI kaldet kommer tilbage i RIM format, og transformeres til core modellen:

...

Og her tilsvarende RIM format, som openeHealth automatisk oversætter det til:

Code Block
languagexml
linenumberstrue
<ns2:Classification classificationScheme="urn:uuid:f4f85eac-e6cb-4883-b524-f2705394840f" classifiedObject="urn:uuid:69d3b9f3-7919-40e0-8731-32fb339216c2" nodeRepresentation="N" id="urn:uuid:9068bc2b-1717-4337-abfb-027f303b20c6">
  <ns2:Slot name="codingScheme">
    <ns2:ValueList>
      <ns2:Value>2.16.840.1.113883.5.25</ns2:Value>
    </ns2:ValueList>
  </ns2:Slot>
  <ns2:Name>
    <ns2:LocalizedString xml:lang="en-US" charset="UTF-8" value="N"/>
  </ns2:Name>
</ns2:Classification>

<ns2:ExternalIdentifier registryObject="urn:uuid:69d3b9f3-7919-40e0-8731-32fb339216c2" identificationScheme="urn:uuid:58a6f841-87b3-4a3e-92fd-a8ffeff98427" value="2512489996^^^&1.2.208.176.1.2&ISO" id="urn:uuid:6dc240d8-d871-4df1-b8c6-3414f1415022">
  <ns2:Name>
    <ns2:LocalizedString value="XDSDocumentEntry.patientId"/>
  </ns2:Name>
</ns2:ExternalIdentifier> 

...

I afsnittene nedenfor, som omhandler understøttelse af bruger historierne "opret stable dokument", "ret stable dokument" og "slet dokument"  er der vist psodokodepseudocode, som illustrerer, hvordan man kan implementere kaldene vha. ovennævnte metode. Afsnittene hænger sådan sammen, at for den givne brugerhistorie kan man se koden (OpeneHealth core model), som skaber kaldet, og hvilke request og response (rim format) det medfører. Som skrevet er der tale om psodokodepseudocode, for at illustrere principperne, og ikke fuldt implementeret logik, som kan kopieres, som det er.

...

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
languagejava
titleEksempel på ITI-41 kald
linenumberstrue
// Indlæs dokumentet, som skal registreres
String documentPayload = getAppointmentXmlDocument();

// Opret documentEntry
DocumentEntry documentEntry = createDocumentEntry -   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
handleResponse(registryResponse);

Sammenligner man ovenståede kodelinier med med transformeringsfiguren ovenfor så svarer kodelinie:

...

   -   boks 3 og 2 (RIM format og core model) i transformeringsfiguren 
handleResponse(registryResponse);


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 dokumentet, så har man disse felters værdi og kan sætte dem direkte. Er XML dokumentet skabt på forhånd, kan man unparse detdeserialisere det, og hente relevante informationer ud.

...

Det følgende eksempel viser, hvordan man kan sætte værdierne i documententry. Se "den danske metadta profil" for specifikke detaljer.

Code Block
languagejava
titleEksempel på oprettelse af documententry
linenumberstrue
collapsetrue
public DocumentEntry createDocumentEntry() {

 	    sourcePatientInfo.setName(new XpnName("Berggren", "Nancy", "Ann", null, null, null));
 	 sourcePatientInfo.setGender("F");
 	 sourcePatientInfo.setDateOfBirth("19481225");

	return createDocumentEntry(new Code("2512489996", new LocalizedString("CPR"), "1.2.208.176.1.2"),    // OID for CPR registret (se XDS metadata value set)
 			new Code("12345679999", new LocalizedString("DROS Testafdeling"), "1.2.208.176.1.1"),    // OID for SOR (XDS metadata value set)
  			"20220221113011", "20220221113011", "20220221113011", // datoer skal angives i UTC tid
			new Code("001", new LocalizedString("Klinisk rapport"), "1.2.208.184.100.9"), 
			new Code("N", new LocalizedString("N"), "2.16.840.1.113883.5.25"), 
			null, 
			new Code("urn:ad:dk:medcom:appointmentsummary:full", new LocalizedString("DK Appointment Summary Document schema"), "1.2.208.184.100.10"), 
			new Code("22232009", new LocalizedString("hospital"), "2.16.840.1.113883.6.96"), 
			"da-DK", 
			"text/xml", 
			"Dato og tidspunkt for møde mellem patient og sundhedsperson", 
			new Code("39289-4", new LocalizedString("Follow-up (referred to) provider &or specialist, appointment date"), "2.16.840.1.113883.6.1"), 
			new Code("408443003", new LocalizedString("almen medicin"), "2.16.840.1.113883.6.96"), 
 			sourcePatientInfo,
 			"urn:uuid:69d3b9f3-7919-40e0-8731-32fb339216c2", // dette er det entryuuid, som skal anvendes i forbindelse med evt. ret og slet dokument
			"8438472030670286734.7450729509229840524.1645439411709",
			"8438472030670286734.7450729509229840524.1645439411709");
}


public DocumentEntry createDocumentEntry(Code patientId, Code organisation, String creationTime, String serviceStartTime, String serviceStopTime, Code classCode, Code confidentialityCode, List<Code> eventCodes, Code formatCode, Code healthcareFacilityTypeCode, 
		 String languageCode, String mimeType, String title, Code typeCode, Code practiceSettingCode, String documentEntryUuid, String uniqueId, String logicalId) {
	
	// Opret DocumentEntry for CDA dokumentet
	DocumentEntry documentEntry = new DocumentEntry();
	documentEntry.setEntryUuid(documentEntryUuid); //
	documentEntry.setUniqueId(uniqueId);
	documentEntry.setLogicalUuid(logicalId);

	// Patient Identification
	Identifiable patientIdentifiable = null;
	if (patientId != null) {
		AssigningAuthority patientIdAssigningAuthority = new AssigningAuthority(patientId.getSchemeName());
		patientIdentifiable = new Identifiable(patientId.getCode(), patientIdAssigningAuthority);
	}
	documentEntry.setPatientId(patientIdentifiable);
	documentEntry.setSourcePatientId(patientIdentifiable);


	// Opret author (Organisation)
	AssigningAuthority organisationAssigningAuthority = new AssigningAuthority(organisation.getSchemeName());
	Author author = new Author();
	if (organisation != null && organisation.getCode() != null) {
		String orgDisplayname = (organisation.getDisplayName() != null ? organisation.getDisplayName().getValue() : "");
		Organization authorOrganisation = new Organization(orgDisplayname, organisation.getCode(), organisationAssigningAuthority);
		author.getAuthorInstitution().add(authorOrganisation);
	}
	documentEntry.setAuthor(author);

	// Availability Status (enumeration: APPROVED, SUBMITTED, DEPRECATED)
	documentEntry.setAvailabilityStatus(AvailabilityStatus.APPROVED);

	// Datoer - skal angives i UTC tid
	if (creationTime != null) {
		documentEntry.setCreationTime(creationTime);
	}
	if (serviceStartTime != null) {
		documentEntry.setServiceStartTime(serviceStartTime);
	}
	if (serviceStopTime != null) {
		documentEntry.setServiceStopTime(serviceStopTime);
	}

	if (classCode != null) {
		documentEntry.setClassCode(classCode);
	}
	if (confidentialityCode != null) {
		documentEntry.getConfidentialityCodes().add(confidentialityCode);
	}

	List<Code> eventCodesEntry = documentEntry.getEventCodeList();
	if (eventCodes != null) {
		for (Code eventCode : eventCodes) {
			eventCodesEntry.add(eventCode);
		}
	}
	if (formatCode != null) {
		documentEntry.setFormatCode(formatCode);
	}
	if (healthcareFacilityTypeCode != null) {
		documentEntry.setHealthcareFacilityTypeCode(healthcareFacilityTypeCode);
	}
	if (languageCode != null) {
		documentEntry.setLanguageCode(languageCode);
	}
	if (mimeType != null) {
		documentEntry.setMimeType(mimeType);
	}
	documentEntry.setType(DocumentEntryType.STABLE);
	if (title != null) {
		documentEntry.setTitle(new LocalizedString(title));
	}
	if (typeCode != null) {
		documentEntry.setTypeCode(typeCode);
	}
	if (practiceSettingCode != null) {
		documentEntry.setPracticeSettingCode(practiceSettingCode);
	}
	return documentEntry;
}

...

Code Block
languagejava
linenumberstrue
public void handleResponse(RegistryResponseType registryResponse) {

 	// Transformer response - dette laver RIM format til core model
	ResponseTransformer responseTransformer = new ResponseTransformer(ebXMLFactory);
	Response response = responseTransformer.fromEbXML(new EbXMLRegistryResponse30(registryResponse));

	if (response.getStatus().equals(Status.SUCCESS.getOpcode30())	) {
		// Kaldet gik godt
	} else
	if (response.getStatus().equals(Status.PARTIAL_SUCCESS) || response.getStatus().equals(Status.FAILURE)) {
		// Der er warning eller fejl i kaldet, håndter dem
		for (RegistryErrorErrorInfo error : response.getRegistryErrorList().getRegistryErrorgetErrors()) {
		}
	} 
}


I requestet nedenfor ses selve dokumentet (som MTOM attachment) samt de specificerede metadata (den del af requestet, der er i tag SubmitObjectsRequest).

Code Block
titleOpret Stable Dokument Request
linenumberstrue
collapsetrue
---------------------------
ID: 4
Address: https://dros-url/dros/iti41
Encoding: UTF-8
Http-Method: POST
Content-Type: multipart/related; type="application/xop+xml"; boundary="uuid:2f4c8aeb-3158-4730-acaf-d113802064c9"; start="<root.message@cxf.apache.org>"; start-info="application/soap+xml"
Headers: {Accept=[*/*]}
Payload: --uuid:2f4c8aeb-3158-4730-acaf-d113802064c9
Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+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:Header>
     .. soap headers fjernet for overskueligehed...
  </soap:Header>   
   <soap:Body>
    <ns4:ProvideAndRegisterDocumentSetRequest 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">
      <ns5:SubmitObjectsRequest>
        <ns2:RegistryObjectList>
          <ns2:ExtrinsicObject mimeType="text/xml" lid="8438472030670286734.7450729509229840524.1645439411709" objectType="urn:uuid:7edca82f-054d-47f2-a032-9b2a5b5186c1" status="urn:oasis:names:tc:ebxml-regrep:StatusType:Approved" id="urn:uuid:cfe0c274-170c-457e-8db4-978ef88cbc67">
            <ns2:Slot name="creationTime">
              <ns2:ValueList>
                <ns2:Value>20220221113011</ns2:Value>
              </ns2:ValueList>
            </ns2:Slot>
            <ns2:Slot name="languageCode">
              <ns2:ValueList>
                <ns2:Value>da-DK</ns2:Value>
              </ns2:ValueList>
            </ns2:Slot>
            <ns2:Slot name="serviceStartTime">
              <ns2:ValueList>
                <ns2:Value>20220221113011</ns2:Value>
              </ns2:ValueList>
            </ns2:Slot>
            <ns2:Slot name="serviceStopTime">
              <ns2:ValueList>
                <ns2:Value>20220221113011</ns2:Value>
              </ns2:ValueList>
            </ns2:Slot>
            <ns2:Slot name="sourcePatientId">
              <ns2:ValueList>
                <ns2:Value>ABCDE^^^Value>2512489996^^^&1.2.208.176.1.2&ISO</ns2:Value>
              </ns2:ValueList>
            </ns2:Slot>
            <ns2:Slot name="sourcePatientInfo">
              <ns2:ValueList>
                <ns2:Value>PID-5|Berggren^Nancy^Ann</ns2:Value>
                <ns2:Value>PID-7|19481225</ns2:Value>
                <ns2:Value>PID-8|F</ns2:Value>
              </ns2:ValueList>
            </ns2:Slot>
             <ns2:Name>
              <ns2:LocalizedString xml:lang="en-US" charset="UTF-8" value="Dato og tidspunkt for møde mellem patient og sundhedsperson"/>
            </ns2:Name>
            <ns2:Classification classificationScheme="urn:uuid:93606bcf-9494-43ec-9b4e-a7748d1a838d" classifiedObject="urn:uuid:cfe0c274-170c-457e-8db4-978ef88cbc67" nodeRepresentation="" id="urn:uuid:5d10bc50-f8fc-4209-9b5b-9ae7e3ec9c16">
              <ns2:Slot name="authorInstitution">
                <ns2:ValueList>
                  <ns2:Value>DROS Testafdeling^^^^^&1.2.208.176.1.1&ISO^^^^12345679999</ns2:Value>
                </ns2:ValueList>
              </ns2:Slot>
            </ns2:Classification>
            <ns2:Classification classificationScheme="urn:uuid:41a5887f-8865-4c09-adf7-e362475b143a" classifiedObject="urn:uuid:cfe0c274-170c-457e-8db4-978ef88cbc67" nodeRepresentation="001" id="urn:uuid:fc8d7a57-1ca4-492d-ab01-69306d007f09">
              <ns2:Slot name="codingScheme">
                <ns2:ValueList>
                  <ns2:Value>1.2.208.184.100.9</ns2:Value>
                </ns2:ValueList>
              </ns2:Slot>
              <ns2:Name>
                <ns2:LocalizedString xml:lang="en-US" charset="UTF-8" value="Klinisk rapport"/>
              </ns2:Name>
            </ns2:Classification>
            <ns2:Classification classificationScheme="urn:uuid:a09d5840-386c-46f2-b5ad-9c3699a4309d" classifiedObject="urn:uuid:cfe0c274-170c-457e-8db4-978ef88cbc67" nodeRepresentation="urn:ad:dk:medcom:appointmentsummary:full" id="urn:uuid:1ad9b3b9-163a-401d-9bb8-087b14fad7ab">
              <ns2:Slot name="codingScheme">
                <ns2:ValueList>
                  <ns2:Value>1.2.208.184.100.10</ns2:Value>
                </ns2:ValueList>
              </ns2:Slot>
              <ns2:Name>
                <ns2:LocalizedString xml:lang="en-US" charset="UTF-8" value="DK Appointment Summary Document schema"/>
              </ns2:Name>
            </ns2:Classification>
            <ns2:Classification classificationScheme="urn:uuid:f33fb8ac-18af-42cc-ae0e-ed0b0bdb91e1" classifiedObject="urn:uuid:cfe0c274-170c-457e-8db4-978ef88cbc67" nodeRepresentation="22232009" id="urn:uuid:9e659080-2238-43b7-bc6d-6705596e9451">
              <ns2:Slot name="codingScheme">
                <ns2:ValueList>
                  <ns2:Value>2.16.840.1.113883.6.96</ns2:Value>
                </ns2:ValueList>
              </ns2:Slot>
              <ns2:Name>
                <ns2:LocalizedString xml:lang="en-US" charset="UTF-8" value="hospital"/>
              </ns2:Name>
            </ns2:Classification>
            <ns2:Classification classificationScheme="urn:uuid:cccf5598-8b07-4b77-a05e-ae952c785ead" classifiedObject="urn:uuid:cfe0c274-170c-457e-8db4-978ef88cbc67" nodeRepresentation="408443003" id="urn:uuid:4c1de4ab-f396-4d40-aa0f-5cd48e9fbf46">
              <ns2:Slot name="codingScheme">
                <ns2:ValueList>
                  <ns2:Value>2.16.840.1.113883.6.96</ns2:Value>
                </ns2:ValueList>
              </ns2:Slot>
              <ns2:Name>
                <ns2:LocalizedString xml:lang="en-US" charset="UTF-8" value="almen medicin"/>
              </ns2:Name>
            </ns2:Classification>
            <ns2:Classification classificationScheme="urn:uuid:f0306f51-975f-434e-a61c-c59651d33983" classifiedObject="urn:uuid:cfe0c274-170c-457e-8db4-978ef88cbc67" nodeRepresentation="39289-4" id="urn:uuid:e80eacf0-9047-47de-9d7a-7b37ae7fb749">
              <ns2:Slot name="codingScheme">
                <ns2:ValueList>
                  <ns2:Value>2.16.840.1.113883.6.1</ns2:Value>
                </ns2:ValueList>
              </ns2:Slot>
              <ns2:Name>
                <ns2:LocalizedString xml:lang="en-US" charset="UTF-8" value="Follow-up (referred to) provider &or specialist, appointment date"/>
              </ns2:Name>
            </ns2:Classification>
            <ns2:Classification classificationScheme="urn:uuid:f4f85eac-e6cb-4883-b524-f2705394840f" classifiedObject="urn:uuid:cfe0c274-170c-457e-8db4-978ef88cbc67" nodeRepresentation="N" id="urn:uuid:4274843e-3550-4234-877b-9b70ed5ec1ef">
              <ns2:Slot name="codingScheme">
                <ns2:ValueList>
                  <ns2:Value>2.16.840.1.113883.5.25</ns2:Value>
                </ns2:ValueList>
              </ns2:Slot>
              <ns2:Name>
                <ns2:LocalizedString xml:lang="en-US" charset="UTF-8" value="N"/>
              </ns2:Name>
            </ns2:Classification>
            <ns2:ExternalIdentifier registryObject="urn:uuid:cfe0c274-170c-457e-8db4-978ef88cbc67" identificationScheme="urn:uuid:58a6f841-87b3-4a3e-92fd-a8ffeff98427" value="ABCDE^^^&1.2.208.176.1.2&ISO" id="urn:uuid:90e4671c-fed6-4b01-9b23-efbdad59a90a">
              <ns2:Name>
                <ns2:LocalizedString value="XDSDocumentEntry.patientId"/>
              </ns2:Name>
            </ns2:ExternalIdentifier>
            <ns2:ExternalIdentifier registryObject="urn:uuid:cfe0c274-170c-457e-8db4-978ef88cbc67" identificationScheme="urn:uuid:2e82c1f6-a085-4c72-9da3-8640a32e42ab" value="8438472030670286734.7450729509229840524.1645439411709" id="urn:uuid:6d5fe954-401e-4e44-b9a7-ea69713d55fb">
              <ns2:Name>
                <ns2:LocalizedString value="XDSDocumentEntry.uniqueId"/>
              </ns2:Name>
            </ns2:ExternalIdentifier>
          </ns2:ExtrinsicObject>
          <ns2:RegistryPackage status="urn:oasis:names:tc:ebxml-regrep:StatusType:Approved" id="6610087827968212831.3203050515460410630.1645439455555">
            <ns2:Slot name="submissionTime">
              <ns2:ValueList>
                <ns2:Value>20220221113011</ns2:Value>
              </ns2:ValueList>
            </ns2:Slot>
            <ns2:Classification classificationScheme="urn:uuid:aa543740-bdda-424e-8c96-df4873be8500" classifiedObject="6610087827968212831.3203050515460410630.1645439455555" nodeRepresentation="39289-4" id="urn:uuid:5901c10c-427c-4e9f-bd02-f722bbe682cc">
              <ns2:Slot name="codingScheme">
                <ns2:ValueList>
                  <ns2:Value>2.16.840.1.113883.6.1</ns2:Value>
                </ns2:ValueList>
              </ns2:Slot>
              <ns2:Name>
                <ns2:LocalizedString xml:lang="en-US" charset="UTF-8" value="Follow-up (referred to) provider &or specialist, appointment date"/>
              </ns2:Name>
            </ns2:Classification>
            <ns2:ExternalIdentifier registryObject="6610087827968212831.3203050515460410630.1645439455555" identificationScheme="urn:uuid:6b5aea1a-874d-4603-a4bc-96a0a7b38446" value="ABCDE^^^2512489996^^^&1.2.208.176.1.2&ISO" id="urn:uuid:455d6c19-04a8-4abc-86a7-b4610879f9bb">
              <ns2:Name>
                <ns2:LocalizedString value="XDSSubmissionSet.patientId"/>
              </ns2:Name>
            </ns2:ExternalIdentifier>
            <ns2:ExternalIdentifier registryObject="6610087827968212831.3203050515460410630.1645439455555" identificationScheme="urn:uuid:96fdda7c-d067-4183-912e-bf5ee74998a8" value="6610087827968212831.3203050515460410630.1645439455555" id="urn:uuid:d86cc2f3-726d-4e67-8d5b-65ddcb244607">
              <ns2:Name>
                <ns2:LocalizedString value="XDSSubmissionSet.uniqueId"/>
              </ns2:Name>
            </ns2:ExternalIdentifier>
            <ns2:ExternalIdentifier registryObject="6610087827968212831.3203050515460410630.1645439455555" identificationScheme="urn:uuid:554ac39e-e3fe-47fe-b233-965d2a147832" value="6610087827968212831.3203050515460410630.1645439455555" id="urn:uuid:995d3638-f9b9-4cf7-99da-396b2c15b82c">
              <ns2:Name>
                <ns2:LocalizedString value="XDSSubmissionSet.sourceId"/>
              </ns2:Name>
            </ns2:ExternalIdentifier>
          </ns2:RegistryPackage>
          <ns2:Classification classifiedObject="6610087827968212831.3203050515460410630.1645439455555" classificationNode="urn:uuid:a54d6aa5-d40d-43f9-88c5-b4633d873bdd" id="urn:uuid:71497627-476c-492c-8dac-b1532e4fcdb0"/>
          <ns2:Association associationType="urn:oasis:names:tc:ebxml-regrep:AssociationType:HasMember" sourceObject="6610087827968212831.3203050515460410630.1645439455555" targetObject="urn:uuid:cfe0c274-170c-457e-8db4-978ef88cbc67" status="urn:oasis:names:tc:ebxml-regrep:StatusType:Approved" id="d5d9f096-a2d2-4029-86cc-6a19e3af30e4">
            <ns2:Slot name="SubmissionSetStatus">
              <ns2:ValueList>
                <ns2:Value>Original</ns2:Value>
              </ns2:ValueList>
            </ns2:Slot>
          </ns2:Association>
        </ns2:RegistryObjectList>
      </ns5:SubmitObjectsRequest>
      <ns4:Document id="urn:uuid:cfe0c274-170c-457e-8db4-978ef88cbc67">
        <xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:5cc72a7d-d08c-4a24-aecb-ada368be561d-1@urn%3Aihe%3Aiti%3Axds-b%3A2007"/>
      </ns4:Document>
    </ns4:ProvideAndRegisterDocumentSetRequest>
  </soap:Body>
</soap:Envelope>

--uuid:2f4c8aeb-3158-4730-acaf-d113802064c9
Content-Type: text/xml
Content-Transfer-Encoding: binary
Content-ID: <5cc72a7d-d08c-4a24-aecb-ada368be561d-1@urn:ihe:iti:xds-b:2007>  

<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" classCode="DOCCLIN" moodCode="EVN" xsi:schemaLocation="urn:hl7-org:v3 ../../PHMR/Schema/CDA_SDTC.xsd">
  ... resten af dokumetet er fjernet for overskuelighed ... 
</ClinicalDocument> 
--uuid:2f4c8aeb-3158-4730-acaf-d113802064c9-- 
--------------------------------------

...

En rettelse laves på samme måde, som ovenfor angivet ovenfor med opret et nyt dokument. Men derudover skal der, når man laver ProvideAndRegisterDocumentSetRequestType, oprettes en association mellem det gamle og det nye dokument:dokumententry. entryUuidFoDocuemntToReplace vil være urn:uuid:69d3b9f3-7919-40e0-8731-32fb339216c2 ifald man vil rette det oprindelige dokument fra "Opret Stable Dokument".

Code Block
languagejava
titleEksempel på association for rettelse
linenumberstrue
// Hvis det er en opdatering af dokumentet, oprettes association mellem det gamle og det nye dokument vha. entryuuid'erne
if (doReplace && entryUuidForDocumentToReplace != null) {
 	Association replacementAssociation = new Association(AssociationType.REPLACE, generateUUID(), documentEntry.getEntryUuid(), entryUuidForDocumentToReplace);
 	provideAndRegisterDocumentSet.getAssociations().add(replacementAssociation);
}

...

Code Block
titleRet Stable Dokument Response
linenumberstrue
collapsetrue
----------------------------
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" 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
languagejava
titleEksempel på ITI-57 kald opdater metadata
linenumberstrue
// 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
languagejava
titleEksempel på oprettelse af SubmitObjectsRequest
linenumberstrue
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
languagejava
titleEksempel på submissionset
linenumberstrue
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
languagejava
titleEksempel på association
linenumberstrue
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
titleOpdater metadata Dokument Request
linenumberstrue
collapsetrue
---------------------------
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
titleOpdater metadata Dokument Response
linenumberstrue
collapsetrue
----------------------------
ID: 12
Response-Code: 200
Encoding: UTF-8
Content-Type: text/xml;charset=UTF-8
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"text/xml;charset=UTF-8], Date=[Wed, 24 Mar 2021 1112:5716:5348 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: Slet Dokument

...

Og at oprette en association kan gøres som følgende. TargetUuid vil være urn:uuid:69d3b9f3-7919-40e0-8731-32fb339216c2 ifald man vil rette det oprindelige dokument fra "Opret Stable Dokument".

Code Block
languagejava
titleEksempel på association
linenumberstrue
public Association createAssociateDeprecateStatus(SubmissionSet submissionSet, DocumentEntry documentEntryToDeprecate) {
	Association association = new Association();
	association.setAssociationType(AssociationType.UPDATE_AVAILABILITY_STATUS);
	association.setSourceUuid(submissionSet.getLogicalUuid());
	association.setTargetUuid(documentEntryToDeprecate.getEntryUuid());
	association.setOriginalStatus(documentEntryToDeprecate.getAvailabilityStatus());
	association.setNewStatus(AvailabilityStatus.DEPRECATED);
	
	return association;
}

...