HL7 Module 10.5 | Understanding and Using HL7 Module | Installing and Using HL7 Module | Verifying The Message Header Segment of HL7 Messages | Required Fields in the Message Header Segment of HL7 Version 2.x Messages
 
Required Fields in the Message Header Segment of HL7 Version 2.x Messages
When you send or receive HL7 messages with Trading Networks using any of the supported transport protocols, Trading Networks extracts the information required to process HL7 version 2.x messages from the Message Header (MSH) segment fields of the HL7 message. To send or receive HL7 version 2.x messages using Trading Networks, verify that the required MSH segment fields are included and set correctly in the message header.
If any of the segment fields listed in the following table are missing, the wm.ip.hl7.tn.service:send service fails to send the HL7 message and logs in an error message in the Integration Server logs. In this case, the transaction is not saved in the Trading Networks database. On the receiving end if any of the required segment fields are missing from the message header, the HL7 message will be saved in the Trading Networks database with the status of DONE W/ Errors and HL7 Module logs an error message in the Trading Networks Activity Log for the persisted transactions. For more information about how to manage information about HL7 message transactions, see Viewing Information about HL7 Messages.
Note:HL7 Module requires and processes only the MSH segment fields listed in the following table.
Required Segment Field
Specifies...
MSH.1 Field Separator
The character to be used as the field separator in the message. Recommended value:|
MSH.2 Encoding Characters
The characters to be used as the component separator, repetition separator, escape character, and subcomponent separator (in that order). Recommended values: ^~\& (ASCII 94, 126, 92, and 38, respectively).
MSH.3 Sender Application
The identity of the sender when receiving an HL7 message. The field contains the following components:

Namespace ID (IS) ^ Universal ID (ST) ^ Universal ID Type
(ID)
For more information about the format of the Sender Application field, see Format of the Sender Application and Receiver Application Fields.
HL7 Module requires that either the namespace ID or the combination of universal ID and universal ID Type are specified. For more information about using the namespace ID component to identify a trading partner, see Identifying a Trading Partner.
MSH.5 Receiver Application
The identity of the receiver when receiving an HL7 message. The components in the MSH.5 field are identical to the components of the MSH.3 field.
For more information about the format of the Receiver Application field, see Format of the Sender Application and Receiver Application Fields.
HL7 Module requires that either the namespace ID or the combination of universal ID and universal ID Type are specified. For more information about using the namespace ID component to identify a trading partner, see Identifying a Trading Partner.
MSH.7 Date/time of message
The date and time when the message was created. The value of this field is in the following format: YYYYMMDDHHMMSS
MSH.9 Message Type
The message type of the HL7 message.
Important:
The Message Type segment field is case sensitive. By default all HL7 message schema definitions use the uppercase.
The field contains the following components:

Message Code (ID) ^ Trigger Event (ID) ^ Message Structure
(ID)
where
<Message Code (ID)> identifies the message code, for example: ADT
<Trigger Event (ID)> identifies the event type, for example: A01
<Message Structure (ID)> identifies the message structure, for example: ADT_A01. HL7 Module does not use this component.
The structure of the data in the MSH.9 field depends on the HL7 message version:
*For HL7 message version 2.1, the structure is:
Message Code (ID)>
*For HL7 message versions 2.2 and 2.3, the structure is:
Message Code (ID) ^ Trigger Event (ID)
*For HL7 message version 2.3.1 to 2.7, the structure is:

Message Code (ID) ^ Trigger Event (ID) ^ Message Structure (ID)
MSH.10 Message Control ID
A unique identifier for the message, for example a number. HL7 Module uses this ID to send back an acknowledgment to the sending system in the Message Acknowledgement Segment (MSA).
MSH.11 Processing ID
Specifies the processing ID or processing mode of the HL7 message. Valid values for the processing ID are:
*D - debugging
*P - production (Default)
*T - training
Valid values for the processing mode are:
*A - archive
*R - restore from archive
*I - initial load
*not present - currently processing the message (Default)
MSH.12 Version ID
The HL7 message version. The field contains the following components:

Version ID (ID) ^ Internationalization
Code
(CWE) ^ International Version ID (SWE)
HL7 Module uses only the Version ID (ID) component to identify the HL7 message version of the incoming message. The sending application should set the Version ID correctly for HL7 Module to process the message. When sending a message from HL7 Module to other trading partners, you must set the correct message version for the outgoing HL7 message.