The HL7 FHIR format parses and emits FHIR resources (Patient, Observation, DiagnosticReport, Bundle, …) in either JSON or XML. This article is the parameter reference. For the end-to-end usage walkthrough — FHIR transport, mapping, and the reformat patterns — see Working with HL7. For scripting against the FHIR resource model with HAPI FHIR, see Create HL7 messages using scripting.
When should I use this format?
Use the HL7 FHIR format for any FHIR-based exchange — modern healthcare APIs, US Core / international FHIR profiles, REST integrations with EHRs, SMART on FHIR apps. For HL7 2.x (the pipe-delimited message format used by most existing hospital information systems), use the HL7 2.x format instead.
Create an HL7 FHIR format
- Open Connections and select the Formats tab.
- Click +, search for FHIR, and select HL7 FHIR (in the HL7 group).
- Set HL7 FHIR Version and Type of Encoding (required) and any other parameters you need.
FHIR parameters
| Parameter |
Default |
What it does |
|
HL7 FHIR Version (required) |
DTSTU3 |
The FHIR release to parse / emit. Options: DTSTU2, DTSTU2_! (DSTU2.1), DTSTU2HL7ORG, DTSTU3, R4, R5. R4 is the most common in production today and the recommended starting point unless you have a specific reason to use another. R5 is the current standard for new projects. DSTU3 is the Etlworks default for backward compatibility. |
|
Type of Encoding (required) |
XML |
JSON or XML. FHIR exchanges over REST APIs typically use JSON; FHIR over messaging or some HL7 v3-derived workflows use XML. Pick whichever your partner expects; the parsed dataset and the resource model are the same either way. |
| Validate |
off |
Run structural validation on the FHIR message before passing it to the connector. Off by default; profile-level validation (US Core, IPS, …) is not enabled here — for that, build a FhirValidator with the profiles you care about in a script. See FHIR notes and limitations. |
| Namespace |
http://hl7.org/fhir |
XML namespace for FHIR XML encoding. The standard FHIR namespace is the default — override only when a partner uses a non-standard one. |
| Template |
(blank) |
When the actual input file isn't available during flow design, the template populates column names so mapping can still be built. |
| Parameter |
What it does |
| Preprocessor |
JavaScript that modifies the raw FHIR message before the parser sees it. See Preprocessor for the available variables and the typical pattern. |
Parsing options
Date / time / encoding / null-handling settings shared with most other formats in Etlworks.
| Parameter |
Default |
What it does |
| Date and Time Format |
MM/dd/yyyy HH:mm:ss |
Format for date+time output (Java SimpleDateFormat pattern). FHIR DateTime values are normalized to this format on read. |
| Date Format |
MM/dd/yyyy |
Format for date-only output. |
| Time Format |
HH:mm:ss |
Format for time-only output. |
| Parse Dates |
off |
When the input doesn't match the configured formats, attempt automatic parsing. |
| Trim Strings |
off |
Strip leading / trailing whitespace from string values. |
| Convert 'null' to null when reading |
off |
Treat the literal string 'null' (case-sensitive) as a SQL null. |
| Convert empty string to null when reading |
false |
Treat empty strings as nulls. |
| Value for null when reading |
(blank) |
Comma-separated list of string tokens (e.g., NULL, n/a, -) interpreted as null when read. |
| Encoding |
UTF-8 |
Character encoding for the input. |
Overrides
| Parameter |
What it does |
| Function to calculate Filename |
JavaScript that rewrites the file name when reading or creating a FHIR file. The input is fileName; assign the result to value. |
| Function to calculate Field Name |
JavaScript that rewrites column names produced by the parser. The input is name; assign the result to value. |
FHIR resource model and scripting
Parsed FHIR resources are exposed to JavaScript / Python flows as HAPI FHIR Java objects (an IBaseResource — cast to Patient, Bundle, DiagnosticReport, …) through dataSet.getActualData() / setActualData(). For the full scripting reference — the HAPI FHIR library, package layout per FHIR version, common patterns (build a Bundle, clone a resource, recode Observations), and two worked examples drawn from real clinical interfaces — see Create HL7 messages using scripting.