Driver Configuration

<< Click to Display Table of Contents >>

 

Driver Configuration

HL7 protocol is a standard for data exchange into medical environments, maintained by Health Level Seven International (HL7).

The structure of an HL7 version 2 (two) message is complex, plain, delimited, and described in ASCII format. The current version of HL7 protocol is version 3 (three). However, older versions still exist and are used nowadays, mainly due to the huge number of customizations performed on HL7 version 2 (two) messages.

The main differences between HL7 version 2 (two) and HL7 version 3 (three) messages are the following:

1.Version 2 (two) works mainly in clinical environments, such as device measurement, medical orders, and patient's databases. Version 3 (three), on the other hand, has additional resources, such as an information model (RIM) used by information systems to meet government requirements, like reports.

2.Version 2 (two) uses a custom format, encoded and separated by a pipe with headers and several segments. Version 3 (three) uses the XML format.

3.All formats of version 2 (two) are compatible with previous versions.

4.Version 3 (three) has a completely different format and therefore it is not compatible with previous versions.

 

This Driver implements support to version 2 (two). The next code shows an example of a message in this version.

MSH|^~\&|MegaReg|XYZHospC|SuperOE|XYZImgCtr|20060529090131-0500||ADT^A01^ADT_A01|01052901|P|2.5
EVN||200605290901||||200605290900
PID|||56782445^^^UAReg^PI||KLEINSAMPLE^BARRY^Q^JR||19620910|M||2028-9^^HL70005^RA99113^^XYZ|260 GOODWIN CREST DRIVE^^BIRMINGHAM^AL^35209^^M~NICKELL'S PICKLES^10000 W 100TH AVE^BIRMINGHAM^AL^35200^^O|||||||0105I30001^^^99DEF^AN
PV1||I|W^389^1^UABH^^^^3||||12345^MORGAN^REX^J^^^MD^0010^UAMC^L||67890^GRAINGER^LUCY^X^^^MD^0010^UAMC^L|MED|||||A0||13579^POTTER^SHERMAN^T^^^MD^0010^UAMC^L|||||||||||||||||||||||||||200605290900
OBX|1|NM|^Body Height||1.80|m^Meter^ISO+|||||F
OBX|2|NM|^Body Weight||79|kg^Kilogram^ISO+|||||F
AL1|1||^ASPIRIN
DG1|1||786.50^CHEST PAIN, UNSPECIFIED^I9|||A

 

HL7 messages in version 2 (two) are formed by several Segments. Each Segment is formed by Fields and each Field is formed by Data Types, which may be Simple, such as numbers or texts, or Composed, such as a data structure.

Segments, Fields, and Data Type may change for each sub-version inside version 2 (two).

Health Level Seven International provides files in XML format, with an .xsd extension, which declare templates for these objects. This Driver needs those files to be copied into a folder, so that they can be read during initialization, thus allowing a dynamic definition of these objects. The default folder must be informed in the Message Descriptor Folder option on the configuration tab. Inside this folder, users must create a folder called XML and, inside this folder, a folder with the version number, such as 2.8.2, where users must copy all files with the .xsd extension. These files can be downloaded at this address.

The Generate Descriptors option on the configuration window reads definitions from .xsd files and creates an example file for each message type found. The default name of this file is Map_XXX_V_YYY.map, where XXX is the message name and YYY is the version. The goal of this file is to provide syntax examples to declare Block Tags used in E3 or Elipse Power through file HL7BlockDefs.map.

The block definition file, HL7BlockDefs.map, declares the names of messages processed by this Driver and which information are used in Tags. Due to the structure of Segments, Fields, and Data Types of HL7 protocol, several items may not exist or appear repeated inside a message. Also, there may be some information that must not be handled in an E3 or Elipse Power application. Therefore, users must describe which values must appear in PLC Tags or Block Tag Elements.

The file HL7BlockDefs.map must be formed by several sets, and each set represents a message to process, in the following format:

MESSAGE_1
PATH_1;EXTRAINFO
PATH_2;EXTRAINFO
...
PATH_N;EXTRAINFO
MESSAGE_2
PATH_1;EXTRAINFO
PATH_2;EXTRAINFO
...
PATH_N;EXTRAINFO
MESSAGE_N
PATH_1;EXTRAINFO
PATH_2;EXTRAINFO
...
PATH_N;EXTRAINFO

 

In which:

MESSAGE_N is the type of HL7 message, such as "ADT_A01". The names of all supported messages can be obtained by generating the example descriptor files, using the Generate Descriptors option

PATH_NNN is the full path, up to the last level, of numeric or textual values that can be copied to a Block Tag Element. To discover the existing paths in a message, the descriptor files Map_XXX_V_YYY.map must be generated, so that users can get all possible paths for each type of message

EXTRAINFO is an additional information for this Driver, which can be TS or LIST. TS instructs this Driver to use a Field as a timestamp of the Block Tag, as long as the corresponding path is a Date and Time-type (DTM) object. LIST informs that a Field is the beginning of a list whose members, from this point forward, may repeat. There must be only one item per message type defined as LIST, as well as only one item defined as TS per message

 

Example of a HL7BlockDefs.map file:

ORU_R01
MSH\MSH.7;TS
ORU_R01\ORU_R01.PATIENT_RESULT[]\ORU_R01.ORDER_OBSERVATION[]\OBR\OBR.2\EI.1;
ORU_R01\ORU_R01.PATIENT_RESULT[]\ORU_R01.ORDER_OBSERVATION[]\ORU_R01.OBSERVATION[]\OBX\OBX.1;LIST
ORU_R01\ORU_R01.PATIENT_RESULT[]\ORU_R01.ORDER_OBSERVATION[]\ORU_R01.OBSERVATION[]\OBX\OBX.3\CWE.1;
ORU_R01\ORU_R01.PATIENT_RESULT[]\ORU_R01.ORDER_OBSERVATION[]\ORU_R01.OBSERVATION[]\OBX\OBX.5;
ORU_R01\ORU_R01.PATIENT_RESULT[]\ORU_R01.ORDER_OBSERVATION[]\ORU_R01.OBSERVATION[]\OBX\OBX.6\CWE.1;

 

In this example, only the ORU_R01 message was declared, instructing this Driver to use the MSH.7 Field as the Block Tag's timestamp, and also declaring 5 (five) more Fields with information that must be reported in Block Tag Elements. In this case, the Block Tag must be created with 5 (five) Elements.

The MESSAGE_N Field must be used in the Item parameter of the Block Tag to identify which message to receive. Therefore, if the Item parameter is configured with a name not declared in the file, this Block Tag does not receive data.

The complete folder structure must be the following:

C:\USER_DIR\HL7BlockDefs.map: File with message definitions reported in Block Tags

C:\USER_DIR\Map_XXX_V_YYY.map: Descriptor files of each type of message generated using the Generate Descriptors option. These files are optional and are used as the base to generate the HL7BlockDefs.map file

C:\USER_DIR\XML: Parent folder

C:\USER_DIR\XML\2.8.2: Version folder

C:\USER_DIR\XML\2.8.2\*.XSD: Descriptor files from Health Level Seven International

 

For more information about the configuration tabs, please check topic Documentation of I/O Interfaces.

Was this page useful?