In an HL7 message, each segment of the message contains one specific category of health information, such as patient information or patient visit data.
The name of each segment in the message is specified by the first field of the segment, which is always three characters long. The following example message contains four HL7 segments:
- MSH
- PID
- NK1
- PV1
It is important to note that different types of HL7 messages contain different HL7 segments. For more information how to determine the HL7 message type, read the following article.
Here is an example of a typical HL7 message:
MSH|^~\&|EPIC|EPICADT|SMS|SMSADT|199912271408|CHARRIS|ADT^A04|1817457|D|2.5|
PID||0493575^^^2^ID 1|454721||DOE^JOHN^^^^|DOE^JOHN^^^^|19480203|M||B|254 MYSTREET AVE^^MYTOWN^OH^44123^USA||(216)123-4567|||M|NON|400003403~1129086|
NK1||ROE^MARIE^^^^|SPO||(216)123-4567||EC|||||||||||||||||||||||||||
PV1||O|168 ~219~C~PMA^^^^^^^^^||||277^ALLEN MYLASTNAME^BONNIE^^^^|||||||||| ||2688684|||||||||||||||||||||||||199912271408||||||002376853
The HL7 segments in this example contain the following information:
- The MSH (Message Header) segment contains information about the message itself. This information includes the sender and receiver of the message, the type of message this is, and the date and time it was sent. Every HL7 message specifies MSH as its first segment.
- The PID (Patient Information) segment contains demographic information about the patient, such as name, patient ID and address.
- The NK1 (Next of Kin) segment contains contact information for the patient’s next of kin.
- The PV1 (Patient Visit) segment contains information about the patient’s hospital stay, such as the assigned location and the referring doctor.
Over 120 different HL7 segments are available for use in HL7 messages to communicate health data. For further details on the HL7 message structure, including in depth information on segments, composites and delimiters, visit iNTERFACEWARE’s comprehensive guide to HL7.
Looking for professional advice? Iguana is the leading HL7 integration engine on the market, trusted globally for 20+ years. To learn more about HL7 data exchange, contact one of our integration engine experts today.