Health Level Seven (HL7) is an interoperability standard used in healthcare. It is the language health information systems use to communicate. For example, Public Health Departments have immunization registries and syndromic surveillance systems that need to communicate with Electronic Health Records (EHRs) systems at hospitals and clinics. This is accomplished with HL7 messages. Though the HL7 standards have seen two major revisions since HL7 v2, it still remains the standard in healthcare and the version you’re most likely to find in the field. [1]


  1. Here is a typical HL7 message with syntax highlighting added to more easily identify the elements in a message: [2]
  2. Segments are the basic structural elements from which HL7 messages are built. Each message is composed of one or more segments. [3]
    Advertisement
  3. The following diagram is a conceptual model of an HL7 message broken down into segments and fields. The three-character codes used at the start of each segment serve as labels. Fields are notated by extending the segment to include the index number of the field. For example, the first field in the message header would be MSH-1, the second field would be MSH-2, etc. [4]
    • MSH, the message header, is the first segment in every HL7 message and contains message metadata. The second segment in every message is the EVN segment. This contains the event the message triggers. In this example, that event is the scheduling of an inpatient surgery.
  4. The following snippet of the NK1 (Next of Kin) segment contains empty fields. The empty fields here are indicated by field separators (|) with nothing in between, followed by the date in Yymmdd format:
    • SPO | | | | | 20011105
  5. This example shows a repeating allergic reaction field (AL1.5[1-3]) in the allergies (AL1) segment:
    • CODE16 ~ CODE17 ~ CODE18
  6. Each component in a field is separated by the ^ character. Fields are notated by extending segment notation with a decimal point followed by the index number of the field. The street address component, for example, is part of the address field and it can be indexed with PID-11.1. PID is the patient identification segment. PID-11.1 is the street address component of the address field (PID-11).
    • Components can be further broken down into subcomponents using the & character as a separator.
  7. The data dictionary for all of the elements contained in a message can be located by referencing the standard for the version of HL7 used to create the message. [5] The version number can be found in the MSH-12 field of any message header.
    • Appendix A of the standard contains a data dictionary for all of the elements in a message. It is available in both PDF and XLS file formats. The data dictionary for HL7 v2.6 is a typical example.
  8. Advertisement

Expert Q&A

Ask a Question
      Advertisement

      Tips

      Submit a Tip
      All tip submissions are carefully reviewed before being published
      Name
      Please provide your name and last initial
      Thanks for submitting a tip for review!

      About This Article

      Thanks to all authors for creating a page that has been read 58,656 times.

      Did this article help you?

      Advertisement