Skip to content

Conversion utility to translate legacy data formats into FHIR

License

Notifications You must be signed in to change notification settings

SemanticClarity/FHIR-Converter

Repository files navigation

FHIR Converter

FHIR Converter is an open source project that enables conversion of health data from legacy formats to FHIR.

The first version of the FHIR Converter released to open source on Mar 6th, 2020. It used Handlebars template language and Javascript runtime. A new converter engine was released on Nov 13, 2020 that uses Liquid templating language and .Net runtime.

Both Handlebars and Liquid converters, and corresponding templates/filters, are supported by Microsoft. We recommend using Liquid converter for better alignment with Azure API for FHIR, FHIR Server for Azure, and Microsoft Logic Apps.

The following table compares the two converter engines:

Handlebars Engine Liquid Engine
Release Date March 6, 2020 Nov 13, 2020
Template language Handlebars Liquid
Template authoring tool 1. Text editor
2. Self-hosted web-app
1. Text editor
2. VS Code extension*
Supported conversions 1. HL7v2 to FHIR
2. CCDA to FHIR
1. HL7 v2 to FHIR
2. CCDA to FHIR*
Available as 1. Self-deployed web service
(on-prem or on Azure)
1. Command line tool
2. $data-convert operation of Azure API for FHIR*
3. $data-convert operation on FHIR Server for Azure*
Available in Azure FHIR servers No Yes*

*To be released soon.

⚠ Rest of this document is about the Liquid converter. For the Handlebars converter, refer to the Handlebars branch.

The Converter makes use of templates that define the mappings between different data formats. The templates are written in Liquid templating language and make use of custom filters, which make it easy with work with HL7 v2 messages.

The converter comes with templates for HL7v2 to FHIR conversion. These templates are based on the spreadsheet created by the HL7 2-To-FHIR project. If needed, you can create new, or modify existing templates to meet your specific conversion requirements.

FHIR Converter with DotLiquid engine runs as a command-line tool. It takes raw data as input and converts it to FHIR bundles. These bundles can be persisted to a FHIR server such as the Azure API for FHIR.

FHIR Converter with DotLiquid engine consists of the following components:

  1. A command-line tool for converting data.
  2. Templates for HL7 v2 to FHIR conversion.
  3. Sample data for testing purpose.

Using the FHIR Converter

Command-line tool

The command-line tool can be used to convert a folder containing HL7 v2 messages to FHIR resources. Here are the parameters that the tool accepts:

Option Name Optionality Default Description
-d TemplateDirectory Required Root directory of templates.
-e EntryTemplate Required Name of root template.
-c InputDataContent Optional Input data content. Specify OutputDataFile to get the results.
-f OutputDataFile Optional Output data file.
-i InputDataFolder Optional Input data folder. Specify OutputDataFolder to get the results..
-o OutputDataFolder Optional Output data folder.
--version Version Optional Display version information.
--help Help Optional Display usage information of this tool.

Example usage to convert HL7 v2 messages to FHIR resources in a folder:

>.\Microsoft.Health.Fhir.Liquid.Converter.Tool.exe -d myTemplateDirectory -e ADT_A01 -i myInputDataFolder -o myOutputDataFolder

Reference documentation

External resources

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit the CLA site.

When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

About

Conversion utility to translate legacy data formats into FHIR

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Liquid 51.8%
  • C# 48.1%
  • ANTLR 0.1%