FHIR Mapper (deprecated)
Deprecated. Use the Mapper node with a Mapping Project instead: it takes the raw message (HL7 v2, X12 or JSON) directly and needs no upstream parser. This node is kept only so existing flows keep working.
Maps parsed JSON objects to target formats using customizable Liquid templates.
Inputs
Outputs
Details
This node transforms parsed JSON objects into various output formats using the Liquid template engine. It supports both pre-built FHIR-compliant templates and custom user-defined templates.
The node can process output from the ec-hl7-parser node or any JSON object structure.
Input Field Configuration:
- Specify custom location to read data from (required)
- Supports
msg,flow, andglobalcontext - Examples:
msg.myData,flow.savedData,global.configuration,global.configuration.message
Pre-built Templates
Standard FHIR R4 Templates (Recommended):
- Patient - Maps ADT messages to FHIR R4 Patient resource with full compliance
- Observation - Maps ORU messages to FHIR R4 Observation resource
- Encounter - Maps ADT messages to FHIR R4 Encounter resource
Custom Templates:
- Patient Bundle - Groups patient data with related resources
- Custom Patient - Simplified patient JSON structure
- Custom - User-defined Liquid template for any data structure
Template Syntax
Templates use Liquid template syntax with the following features:
- Field Access:
{{input.PID['5.1']}}- Access HL7 segment fields - Simple Access:
{{input.patientId}}- Access JSON properties - Conditionals:
{{value === 'M' ? 'male' : 'female'}} - Filters:
{{input.PID['7'] | formatHL7Date}}- Apply transformation filters - Default Values:
{{value | default: 'Not provided'}}
Available Filters
formatHL7Date- Convert HL7 date (YYYYMMDD) to ISO format (YYYY-MM-DD)mapGender- Map HL7 gender codes (M/F/O/U) to FHIR codes (male/female/other/unknown)mapPatientClass- Map HL7 patient class to FHIR encounter classuppercase/lowercase- Change text casedefault- Provide fallback value if field is empty
Template Examples
Simple JSON Object Mapping:
{
"patientId": "{{input.patientId}}",
"name": {
"first": "{{input.firstName}}",
"last": "{{input.lastName}}"
},
"birthDate": "{{input.dateOfBirth}}"
}
HL7 to FHIR Patient:
{
"resourceType": "Patient",
"id": "{{input.PID['3.1']}}",
"name": [{
"family": "{{input.PID['5.1']}}",
"given": ["{{input.PID['5.2']}}"]
}],
"birthDate": "{{input.PID['7'] | formatHL7Date}}",
"gender": "{{input.PID['8'] | mapGender}}"
}
Using Conditional Logic:
{
"id": "{{input.patientId}}",
"status": {{input.deceased === true ? 'deceased' : 'active'}}
"contact": "{{input.phone | default: 'Not provided'}}",
"gender": "{{input.gender | lowercase}}"
}
Output Format
- JSON: Standard JSON output with template-defined structure
- FHIR: FHIR-compliant resource format (validates against FHIR R4 specification)