Overview
HL7 is a messaging specification for healthcare information systems. Read more at https://www.hl7.org.
When to use HL7 2.x Formats
Etlworks can read and write HL7 messages in all 2.x Formats.
Read how to work with HL7 messages in Etlworks.
Create Format
To create a new CSV Format, go to Connections, select the Formatstab, click Add Format, and type in hl7 2 in the Search field.
Below are the available parameters:
- HL7 Version: specific HL7 Version. Any means parser will try to read a message regardless of the version, so if you don't know the version, please select Any.
- Type of Encoding: the ER7 (default) is a standard HL7 pipe-delimited Format. The difference between HL7 XML and XML is that the former allows duplicated XML tags while the latter does not. In most cases, you will use ER7.
- Validate: if enabled, Etlworks will validate the message before passing it to the connector. If a message is not valid according to the default rules, the appropriate error will be generated.
- Datatype if OBX2 Missing: if this property is set, the value provides a default datatype (such as 'ST', 'NM') for an OBX segment with a missing OBX-2 value.
- Datatype if OBX2 Invalid: if this property is set, the value provides a default datatype (such as 'ST', 'NM') for an OBX segment with an invalid OBX-2 value.
- Encode First Segment: if this property is enabled (default) when encoding a group where the first segment is required, but no data has been populated in that segment, the empty segment is now still encoded if needed as a blank segment to give parsers a hint about which group subsequent segments are in.
- Escape Subcomponent Delimiter: enable if subcomponent delimiters in OBX-5 shall be ignored.
- Enforce Encoding For: a comma-separated list of segments for which the system should enforce encoding even if they contain no content.
- Remove Encoding For: a comma-separated list of segments for which the system encoding should be removed.
- Namespace: the HL7 XML namespace. If not set, the default namespace will be used: xmlns=urn:hl7-org:v2xml.
- Template: template in the HL7 2.x Format. If this field is not empty, Etlworks will use it to populate column names and data types. Template is an optional field.
- Date and Time Format: a Format for timestamps (date+time).
- Date Format: a Format for date (date only, no time).
- Time Format: a Format for time (time only, no date).
- Trim Strings: if this option is enabled, Etlworks will trim leading and trailing white spaces from the value.
- Treat 'null' as null: if this option is enabled, Etlworks will treat string values equal to 'null' as actual nulls (no value).
- Preprocessor: use Preprocessor JavaScript to modify the raw HL7 message before passing it to the HL7 connector. Example:
-
/* this code replaces all spaces in a message on underscore character */ message = message.replace(" ", "_");
- Encoding: the character encoding used for HL7 documents in the XML Format.