What Are the Components of an HL7 Message?
October 5th, 2006 by NeoTool
Posted in HL7 Terms, What is HL7?, HL7 Standard
HL7 terms to better understand what is HL7. Each HL7 standard message is composed of groups and segments where:
- Groups contain segments or groups
- Segments contain fields
- Fields contain components
- Components contain sub-components
Cardinality for these groups, segments, fields, components, and sub-components are defined using the following markers:
[Square Brackets] indicate something is optional; and
{Curly Brackets} indicate something is repeatable.
To explain how these markers are used to indicate segment cardinality, the ADT^A01 message fragment is defined below:
MSH Exactly one required message header
EVN Exactly one event segment
PID Exactly one patient ID segment
[PD1] Zero or one demographic segment
[ { NK1 } ] Zero to n next-of-kin segments
PV1 Exactly one patient visit segment
…
[ Start of optional, repeatable group
{ IN1 If group is in message, exactly one IN1
[ IN2 ] For each group in message, 0 or 1 IN2
[ IN3 ] For each group in message, 0 or 1 IN3
}
] End of optional, repeatable group
Last 5 posts by NeoTool
- What Is an SIU Message? - November 3rd, 2006
- What Is an ACK? - October 5th, 2006
- What Are Z Segments? - October 5th, 2006
- What Is a DFT Message? - October 5th, 2006
- What Is an ORU Message? - October 5th, 2006






[…] The ideal HL7 interface should allow you to monitor all of your connections from a central location to ensure messages are delivered successfully. When a connection stops or a message is not delivered, monitoring ensures that this information is immediately available. This allows the interface team to quickly respond and resolve the problem. […]
[…] 1. The response is an HL7 formatted message. To do this, the application simply needs to review the format of the response that was received and verify that it appears to be formatted in a typical HL7 pipe-and-hat format. […]
[…] In my last two posts - acknowledgement (ACK) message definition and Original Mode ACK, it is important to remember that not every system will handle acknowledgments the same way. You will interface with systems that send you HL7 messages and do not wait for a response of any kind prior to sending the next message. In this scenario, your system will not be able to send back acknowledgment messages. This type of message delivery is never recommended. […]
[…] TCP/IP protocols mean that the data just starts coming in a stream, so how do you know where one HL7 message ends and the next one starts? […]
[…] In order to filter, the business rules for the filtering must be understood by both the technical (IT) and clinical staff. Ultimately these rules are translated into HL7 segment or field values. […]
[…] we were aware of the problem, fixing it was trivial. This got me thinking about the way HL7 messages are delivered, and the importance of HL7 acknowledgment […]