FHIR converter is an open source project that enables conversion of health data from eCR (electronic Case Report) to FHIR. The FHIR converter uses the Liquid template language and the .NET runtime.
The CDCgov fork supports only eCR to FHIR as of version 8. Changes to the code were needed to support this conversion in addition to improving the performance of the FHIR converter. This converter is still under active development and is not yet fully validated.
The converter uses templates that define mappings between these different data formats. The templates are written in Liquid templating language and make use of custom filters.
The converter comes with a few ready-to-use templates. If needed, you can create a new template, or modify existing templates to meet your specific conversion requirements. See Templates & Authoring for specifics.
The latest iteration of the FHIR converter makes some significant changes over previous versions.
Some of the changes include:
- Removal of input types other than eCR.
- Removal of Azure Container repository dependency for custom templates.
All the documentation for the new FHIR converter API can be found in the How to Guides folder.
The FHIR converter API provides REST based APIs to perform conversion requests.
The FHIR converter APIs are offered as a container artifact in Github Container Registry.
The FHIR converter API comes with several pre-built templates you can use as reference as to create your own.
| Conversion | Notes |
|---|---|
| eCR to FHIR |
In addition to the example templates provided there are several important concepts to review and consider when creating your own templates, including:
The conversion APIs process the provided input data of the specified format and use the specified Liquid template (default or custom) and return the converted result as per the transformations in the template.
Complete details on the FHIR converter APIs and examples can be found here.
Some key concepts to consider:
- Processing time is related to both the input message size, template, and logic contained in the template. If your template is taking a long time to execute make sure you don't have any unnecessary loops.
- The output of the template is expected to be JSON when the target is FHIR.
- When converting data to FHIR, post processing is performed. If you are seeing unexpected results, double check the post processing logic.
- If you want a deeper understanding on how data is converted, look at the functional tests found here
Detailed documentation of prior Converter release is covered in the table below.
| Version | Summary |
|---|---|
| 5.x Liquid | Liquid engine release covers: 1. HL7v2, CCDA, and JSON to FHIR transformations. 2. Command Line utility. 3. VS Code authoring extension. 4. FHIR Service $convert integration. 5. ACR template storage. |
| 3.x Handlebars | Previous handlebars base solution. No longer supported. See full comparision here. |
