Introduction to HL7 Format |
An HL7 message is the unit of data transferred between HL7 systems.
Here is an example of HL7 message:

Every HL7 message consists of a sequence of segments. Each segment occupies a line. This message contains 7 segments (MSH, EVN, PID, ..., PR1).
Every message begins with the MSH (Message Header) segment which contains the message type, version and other important information.

Each message message has a type that defines its purpose. This message has the type ADT^A01 (Patient Admit/Visit notification) of the version 2.4.
![]()
Each segment begins with a tree-letter label that identifies its type and purpose. For example PID segment contains patient identification data. You can find more information on message and segment types on the official Health Level 7 web site (http://www.hl7.org).

Each segment is divided into fields separated by pipe character ‘|’. This PID segment contains 10 fields. Some of the fields are empty.
![]()
Fields may also be divided into subfields. In this example patient's name divided on a surname, first name, second name and suffix.