Process Data Transfer Start v1.0.x.x - medizininformatik-initiative/mii-process-data-transfer GitHub Wiki

This page lists FHIR resources that can be used to prepare a DIC CDS FHIR store and start the data-transfer send process at a DIC. The following needs to be known beforehand:

  • The DIC identifier of the local organization
  • The DMS identifier which should receive the project results
  • A project identifier for which results should be transmitted
  • The project results (i.e. the actual data) that should be transmitted

It is important to differentiate between the DSF FHIR server and the CDS FHIR store. The DSF FHIR server contains all FHIR resources of the DSF needed for process flow and the CDS FHIR store contains the FHIR resources (i.e. the actual data) on which the report is based. These are two different FHIR servers.

DIC: Prepare CDS FHIR Store

The DIC CDS FHIR store needs to be prepared with the data-set that should be transmitted to the DMS.

To prepare your DIC CDS FHIR store manually, upload a transaction Bundle like the following examples containing a DocumentReference resource and a linked Binary or Bundle resource as attachment resource. Please replace all placeholders in the form <REPLACE-WITH-...>. For the placeholders concerning a UUID, please make sure to use the same placeholder inside one transaction Bundle of one project, but different UUIDs in transaction Bundles of different projects.

To send the transaction Bundle to a CDS FHIR store with basic authentication, the following cURL command could be used:

curl \
-u "<username>:<password>" \ 
-H "Accept: application/fhir+xml" -H "Content-Type: application/fhir+xml" \
-d @transaction-bundle.xml \
https://<cds-fhir-base-url>/fhir

Notice: On Windows you need to remove the \ multi-line command seperators.

The individual parts of the command have the following meaning:

  • <username> represents the basic authentication username
  • <password> represents the basic authentication password
  • transaction-bundle.xml contains the corresponding Transaction Bundle resource from below
  • <cds-fhir-base-url> needs to be replaced with the base url of your KDS FHIR store

Notice 2: This works only if you are using a HAPI FHIR server as your DIC CDS FHIR store having set the environment variable HAPI_FHIR_ALLOWED_BUNDLE_TYPES: COLLECTION,DOCUMENT,MESSAGE,TRANSACTION,TRANSACTIONRESPONSE,BATCH,BATCHRESPONSE,HISTORY,SEARCHSET. If you are using a BLAZE FHIR server with Version < 0.18.2 as your DIC CDS FHIR store, you have to upload and link both resources separately. Start by uploading the attachment resource, add the returned id of the attachment resource to DocumentReference.content.attachment.url and upload the DocumentReference resource.

Decentralyzed Analysis (VHF-MI-dezentral / WE-STORM):

This transaction Bundle containing a DocumentReference resource with a linked Binary resource should be used in the projects with identifier VHF-MI-dezentral and WE-STORM.

To encode the results in a csv- or zip-file as base64 format, the following command could be used: base64 /path/to/file.

<Bundle xmlns="http://hl7.org/fhir">
	<type value="transaction"/>
	<entry>
		<fullUrl value="DocumentReference/<REPLACE-WITH-DOCUMENT-REFERENCE-UUID>"/>
		<resource>
			<DocumentReference xmlns="http://hl7.org/fhir">
				<id value="<REPLACE-WITH-DOCUMENT-REFERENCE-UUID>" />
				<masterIdentifier>
					<system value="http://medizininformatik-initiative.de/sid/project-identifier"/>
					<!-- Example: <value value="VHF-MI-dezentral"/> -->
					<!-- Example: <value value="WE-STORM"/> -->
					<value value="<REPLACE-WITH-PROJECT-IDENTIFIER>"/>
				</masterIdentifier>
				<status value="current"/>
				<docStatus value="final"/>
				<author>
					<type value="Organization"/>
					<identifier>
						<system value="http://dsf.dev/sid/organization-identifier"/>
						<!-- Example: <value value="ukhd.de"/> -->
						<value value="<REPLACE-WITH-YOUR-ORGANIZATION-IDENTIFIER>"/>
					</identifier>
				</author>
				<!-- Example: <date value="2022-11-16T15:00:00+01:00"/> -->
				<date value="<REPLACE-WITH-DATE-TIME>"/>
				<content>
					<attachment>
						<!-- Example: <contentType value="text/csv"/> -->
						<!-- Example: <contentType value="application/zip"/> -->
						<contentType value="<REPLACE-WITH-CONTENT-TYPE>"/>
						<url value="Binary/<REPLACE-WITH-BINARY-UUID>"/>
					</attachment>
				</content>
			</DocumentReference>
		</resource>
		<request>
			<method value="PUT"/>
			<url value="DocumentReference/<REPLACE-WITH-DOCUMENT-REFERENCE-UUID>"/>
		</request>
	</entry>
	<entry>
		<fullUrl value="Binary/<REPLACE-WITH-BINARY-UUID>"/>
		<resource>
			<Binary xmlns="http://hl7.org/fhir">
				<id value="<REPLACE-WITH-BINARY-UUID>" />
				<!-- Example: <contentType value="text/csv"/> -->
				<!-- Example: <contentType value="application/zip"/> -->
				<contentType value="<REPLACE-WITH-CONTENT-TYPE>"/>
				<!-- Example: <data value="base-64-data-omitted"/> -->
				<data value="<REPLACE-WITH-BASE64-ENCODED-DATA-MATCHING-CONTENT-TYPE>"/>
			</Binary>
		</resource>
		<request>
			<method value="PUT"/>
			<url value="Binary/<REPLACE-WITH-BINARY-UUID>"/>
		</request>
	</entry>
</Bundle>

Centralized Analysis (VHF-MI-2-zentral):

This transaction Bundle containing a DocumentReference resource with a linked Bundle resource should be used in the project with identifier VHF-MI-2-zentral.

Caution: The following transaction Bundle for DIC CDS FHIR store preparation can be omitted if you are using the script provided for data extraction, pseudonymization and data-set upload in the project VHF-MI-2-zentral using the option --storebundle.

<Bundle xmlns="http://hl7.org/fhir">
	<type value="transaction"/>
	<entry>
		<fullUrl value="DocumentReference/<REPLACE-WITH-DOCUMENT-REFERENCE-UUID>"/>
		<resource>
			<DocumentReference xmlns="http://hl7.org/fhir">
				<id value="<REPLACE-WITH-DOCUMENT-REFERENCE-UUID>" />
				<masterIdentifier>
					<system value="http://medizininformatik-initiative.de/sid/project-identifier"/>
					<!-- Example: <value value="VHF-MI-2-zentral"/> -->
					<value value="<REPLACE-WITH-PROJECT-IDENTIFIER>"/>
				</masterIdentifier>
				<status value="current"/>
				<docStatus value="final"/>
				<author>
					<type value="Organization"/>
					<identifier>
						<system value="http://dsf.dev/sid/organization-identifier"/>
						<!-- Example: <value value="ukhd.de"/> -->
						<value value="<REPLACE-WITH-YOUR-ORGANIZATION-IDENTIFIER>"/>
					</identifier>
				</author>
				<!-- Example: <date value="2022-11-16T15:00:00+01:00"/> -->
				<date value="<REPLACE-WITH-DATE-TIME>"/>
				<content>
					<attachment>
						<!-- Example: <contentType value="application/fhir+xml"/> -->
						<contentType value="<REPLACE-WITH-CONTENT-TYPE>"/>
						<url value="Bundle/<REPLACE-WITH-BUNDLE-UUID>"/>
					</attachment>
				</content>
			</DocumentReference>
		</resource>
		<request>
			<method value="PUT"/>
			<url value="DocumentReference/<REPLACE-WITH-DOCUMENT-REFERENCE-UUID>"/>
		</request>
	</entry>
	<entry>
		<fullUrl value="Bundle/<REPLACE-WITH-BUNDLE-UUID>"/>
		<resource>
			<Bundle xmlns="http://hl7.org/fhir">
				<id value="<REPLACE-WITH-BUNDLE-UUID>" />
				<!-- Example: <type value="transaction"/><entry> ... </entry>/> -->
				<REPLACE-WITH-BUNDLE-RESOURCE-CONTENT>
			</Bundle>
		</resource>
		<request>
			<method value="PUT"/>
			<url value="<REPLACE-WITH-BUNDLE-UUID>"/>
		</request>
	</entry>
</Bundle>

DIC: Start Send Process

DSF FHIR Server Frontend

The data-transfer send process can be started in the DIC DSF FHIR server frontend by accessing the following url and opening the correspondig draft Task resource (<dsf-fhir-base-url> needs to be replaced with the base url of your DSF FHIR server):

https://<dsf-fhir-base-url>/fhir/Task?status=draft&identifier=http://dsf.dev/sid/task-identifier|http://medizininformatik-initiative.de/bpe/Process/dataSend/1.0/dataSendStart

Commandline

To start the data-transfer send process, a Task resource like the following example has to be sent to the DIC DSF FHIR server. Please replace all placeholders in the form <REPLACE-WITH-...>.

To send the Task resource to the DIC DSF FHIR server, the following cURL command could be used:

curl \
--cert client-certificate.pem \
--key client-certificate_private-key.pem \
-H "Accept: application/fhir+xml" -H "Content-Type: application/fhir+xml" \
-d @task.xml \
https://<dsf-fhir-base-url>/fhir/Task

Notice: On Windows you need to remove the \ multi-line command seperators.

The individual parts of the command have the following meaning:

  • task.xml contains the corresponding Task resource from below
  • client-certificate.pem contains your client-certificate
  • client-certificate_private-key.pem contains the private-key belonging to your client-certificate
  • <dsf-fhir-base-url> needs to be replaced with the base url of your DSF FHIR server

Task: Data-Transfer Send Process

<Task xmlns="http://hl7.org/fhir">
   <meta>
      <profile value="http://medizininformatik-initiative.de/fhir/StructureDefinition/task-start-data-send|1.0" />
   </meta>
   <instantiatesUri value="http://medizininformatik-initiative.de/bpe/Process/dataSend/1.0"/>
   <status value="requested" />
   <intent value="order" />
   <!-- Example: <authoredOn value="2022-11-16T15:00:00+01:00"/> -->
   <authoredOn value="<REPLACE-WITH-DATE-TIME>"/>
   <requester>
      <type value="Organization"/>
      <identifier>
         <system value="http://dsf.dev/sid/organization-identifier"/>
         <!-- Example: <value value="ukhd.de"/> -->
         <value value="<REPLACE-WITH-YOUR-ORGANIZATION-IDENTIFIER>"/>
      </identifier>
   </requester>
   <restriction>
      <recipient>
         <type value="Organization"/>
         <identifier>
            <system value="http://dsf.dev/sid/organization-identifier"/>
            <!-- Example: <value value="ukhd.de"/> -->
            <value value="<REPLACE-WITH-YOUR-ORGANIZATION-IDENTIFIER>"/>
         </identifier>
      </recipient>
   </restriction>
   <input>
      <type>
         <coding>
            <system value="http://dsf.dev/fhir/CodeSystem/bpmn-message"/>
            <code value="message-name"/>
         </coding>
      </type>
      <valueString value="startDataSendMii"/>
   </input>
   <input>
      <type>
         <coding>
            <system value="http://medizininformatik-initiative.de/fhir/CodeSystem/data-transfer"/>
            <code value="dms-identifier"/>
         </coding>
      </type>
      <valueReference>
         <type value="Organization"/>
         <identifier>
            <system value="http://dsf.dev/sid/organization-identifier"/>
            <!-- Example: <value value="uniklinikum-leipzig.de"/> -->
            <!-- Example: <value value="ukdd.de"/> -->
            <value value="<REPLACE-WITH-DMS-IDENTIFIER>"/>
         </identifier>
      </valueReference>
   </input>
   <input>
      <type>
         <coding>
            <system value="http://medizininformatik-initiative.de/fhir/CodeSystem/data-transfer"/>
            <code value="project-identifier"/>
         </coding>
      </type>
      <valueIdentifier>
            <system value="http://medizininformatik-initiative.de/sid/project-identifier"/>
            <!-- Example: <value value="VHF-MI-dezentral"/> -->
            <!-- Example: <value value="VHF-MI-2-zentral"/> -->
            <!-- Example: <value value="WE-STORM"/> -->
            <value value="<REPLACE-WITH-PROJECT-IDENTIFIER>"/>
      </valueIdentifier>
   </input>
</Task>
⚠️ **GitHub.com Fallback** ⚠️