Skip to content

hl7ch/cda-fhir-maps

master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.

Implementation Guide CDA FHIR Maps

This Implementation Guide provides maps to transform documents between CDA and FHIR and back. This manual describes for which exchange formats the transformation can be used and how it is executed.

This description focuses on how to execute the transformation in the local development environment. You can also add your own maps in this context.

The transformation as a micro service is described here.

Supported document types

The maps are intended for the transformation of documents, especially eMedication documents, in the context of the Swiss EPR.
Note: The scope is based on the eMedication case study; there is as yet no final mapping of data types, templates and documents.

The following document types are supported and examples of these are shown in these directories:

Document type CDA examples FHIR examples Map CDA to FHIR Map FHIR to CDA
Swiss EPR document input\cda-ch input\ch-core input\maps\CdaChToBundle.map input\maps\BundleToCdaCh.map
Medication Card document input\cda-ch-emed input\ch-emed input\maps\CdaChEmed MedicationCardDocumentToBundle.map input\maps\BundleToCdaChEmed MedicationCardDocument.map
Medication Prescription document input\cda-ch-emed input\ch-emed input\maps\CdaChEmed MedicationPrescriptionDocumentToBundle.map input\maps\BundleToCdaChEmed MedicationPrescriptionDocument.map
Medication Dispense document input\cda-ch-emed input\ch-emed input\maps\CdaChEmed MedicationDispenseDocumentToBundle.map input\maps\BundleToCdaCh EmedMedicationDispenseDocument.map
Medication List document input\cda-ch-emed input\ch-emed input\maps\CdaChEmed MedicationListDocumentToBundle.map -
Pharmaceutical Advice document input\cda-ch-emed input\ch-emed input\maps\CdaChEmed PharmaceuticalAdviceDocumentToBundle.map input\maps\BundleToCdaCh EmedPharmaceuticalAdviceDocument.map
Medication Treatment Plan document input\cda-ch-emed input\ch-emed input\maps\CdaChEmed MedicationTreatmentPlanDocumentToBundle.map input\maps\BundleToCdaCh EmedMedicationTreatmentPlanDocument.map

Table 1: Document types with examples and maps

Specification

The example documents are structured according to the CDA/FHIR specifications for the exchange formats. The specification of the eMedication depends on the specification of the Swiss EPR exchange format.

Documents in the context of the Swiss EPR:

eMedication Documents:

Setup

To transform the documents from CDA to FHIR and back and maybe add your own maps, you should prepare the following setup:

Editor

  • Download Visual Studio Code
  • Install a REST Client for Visual Studio Code:
    Open VSC, press Ctrl + Shift + X, search for rest-client, then install it (humao.rest-client)

Docker

docker run --rm -i -t --name matchbox -p 8080:8080 -v /ABSOLUTEPATH/TO/DIR:/config eu.gcr.io/fhir-ch/matchbox:v220

GitHub Desktop (optional)

Development

Clone this project https://github.com/hl7ch/cda-fhir-maps

  • Option 1: GitHub Desktop
  • Option 2: VSC Terminal:
    git clone https://github.com/hl7ch/cda-fhir-maps.git

Open it with Visual Studio Code (REST Client extension is needed).

Transform documents between CDA and FHIR and back

  • Open cdatofhir.http or fhirtocda.http from the main directory with Visual Studio Code.
  • Choose @host = http://localhost:8080/r4
  • Add the maps to matchbox (Step 1 to 3).
  • Transform your document (Examples shown in Step 5).

Transform eMedication documents between CDA and FHIR and back

  • Open following files, depending on the requiered exchange format, from the main directory with Visual Studio Code:
    • Medication Card document: cdatofhir_card.http, fhirtocda_card.http
    • Medication Dispense document: cdatofhir_dispense.http, fhirtocda_dispense.http
    • Medication Prescription document: cdatofhir_prescription.http, fhirtocda_prescription.http
    • Medication List document: cdatofhir_list.http, -
    • Pharmaceutical Advice document: cdatofhir_padv.http, fhirtocda_padv.http
    • Medication Treatment Plan document: cdatofhir_treatmentplan.http, fhirtocda_treatmentplan.http
  • Choose @host = http://localhost:8080/r4
  • Transform your document of the choosen exchange format (Examples shown in Step 5).

About

Maps (FHIR Mapping Language) to transform documents from CDA to FHIR and back

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages