HL7 Segments

HL7 Segments - Health Level 7

An HL7 message consists of HL7 segments - each seperated by a new line.

HL7 Segments are separated by segment separator characters. Each segment begins with a three-character literal value that identifies it within a message. Segments may be defined as required or optional and may be permitted to repeat. Individual data fields are found in the message by their position within their associated segments.

While developing the standard, the HL7 committee realized it was impossible to standardize all the aspects of data exchange in the healthcare industry. This is why they provided a framework for the addition of custom information into HL7 messages, more commonly referred to as Z-segments. You may define a custom segment and include it in any HL7 message. These segments should be named starting with letter Z, (e.g. ZPD for custom patient demographics information). Applications that do not know the meaning of your Z-segments should simply ignore these segments.

The downside of the Z-segment approach is that you cannot expect any particular piece of information to be in a specific place. While one vendor will send this information in some segment of the standard, another will send it in a custom Z-segment.

HL7 segments are made up of fields and sub-fields that define information related to the HL7 message. The individual segments are listed as part of the HL7 standard.

In the following HL7 example message, you can see that each HL7 segment is located on it's own line.

Example: (MSH, PID, OBR, OBX)

MSH|^~\&|GHH LAB|ELAB-3|GHH OE|BLDG4|200202150930||ORU^R01|CNTRL-3456|P|2.4
PID|||555-44-4444||EVERYWOMAN^EVE^E^^^^L|JONES|19620320|F|||153 FERNWOOD DR.^^STATESVILLE^OH^35292||(206)3345232|(206)752-121||||AC555444444||67-A4335^OH^20030520
OBR|1|845439^GHH OE|1045813^GHH LAB|15545^GLUCOSE|||200202150730|||||||||555-55-5555^PRIMARY^PATRICIA P^^^^MD^^|||||||||F||||||444-44-4444^HIPPOCRATES^HOWARD H^^^^MD
OBX|1|SN|1554-5^GLUCOSE^POST 12H CFST:MCNC:PT:SER/PLAS:QN||^182|mg/dl|70_105|H|||F