Skip Navigation LinksHome / Support / EDI Knowledge Base & Standards / HL7

About X12

Health Level-7 or HL7 refers to a set of international standards for transfer of clinical and administrative data between software applications used by various healthcare providers. These standards focus on the application layer, which is "layer 7" in the OSI model. The HL7 standards are produced by the Health Level Seven International, an international standards organization, and are adopted by other standards issuing bodies such as American National Standards Institute and International Organization for Standardization.

Hospitals and other healthcare provider organizations typically have many different computer systems used for everything from billing records to patient tracking. All these systems should communicate with each other (or "interface") when they receive new information, or when they wish to retrieve information, but not all do so.

Primary Standards

HL7's primary standards are those standards that Health Level Seven International considers to be most commonly used and implemented.

Version 2 messaging

The HL7 version 2 standard (also known as Pipehat) has the aim to support hospital workflows. It was originally created in 1989.

HL7 version 2 defines a series of electronic messages to support administrative, logistical, financial as well as clinical processes. Since 1987 the standard has been updated regularly, resulting in versions 2.1, 2.2, 2.3, 2.3.1, 2.4, 2.5, 2.5.1, 2.6, 2.7, 2.7.1, 2.8, 2.8.1 and 2.8.2. The v2.x standards are backward compatible (e.g., a message based on version 2.3 will be understood by an application that supports version 2.6).

HL7 v2.x messages use a non-XML encoding syntax based on segments (lines) and one-character delimiters. Segments have composites (fields) separated by the composite delimiter. A composite can have sub-composites (components) separated by the sub-composite delimiter, and sub-composites can have sub-sub-composites (subcomponents) separated by the sub-sub-composite delimiter. The default delimiters are carriage return for the segment separator, vertical bar or pipe (|) for the field separator, caret (^) for the component separator, ampersand (&) for the subcomponent separator, and hashtag/pound (#) is the default truncation separator. The tilde (~) is the default repetition separator. Each segment starts with a 3-character string that identifies the segment type. Each segment of the message contains one specific category of information. Every message has MSHas its first segment, which includes a field that identifies the message type. The message type determines the expected segment types in the message. The segment types used in a particular message type are specified by the segment grammar notation used in the HL7 standards.

The following is an example of an admission message. MSH is the header segment, PID the Patient Identity, PV1 is the Patient Visit information, etc. The 2nd field in the PIDsegment is the patient's name, in the order, family name, given name, second names (or their initials), suffix, etc. Depending on the HL7 V2.x standard version, more fields are available in the segment for additional patient information.



PID|||56782445^^^UAReg^PI||KLEINSAMPLE^BARRY^Q^JR||19620910|M||2028-9^^HL70005^RA99113^^XYZ|260 GOODWIN CREST DRIVE^^BIRMINGHAM^AL^35209^^M~NICKELL’S PICKLES^10000 W 100TH AVE^BIRMINGHAM^AL^35200^^O|||||||0105I30001^^^99DEF^AN


OBX|1|NM|^Body Height||1.80|m^Meter^ISO+|||||F

OBX|2|NM|^Body Weight||79|kg^Kilogram^ISO+|||||F



HL7 v2.x has allowed for the interoperability between electronic Patient Administration Systems (PAS), Electronic Practice Management (EPM) systems, Laboratory Information Systems (LIS), Dietary, Pharmacy and Billing systems as well as Electronic Medical Record (EMR) or Electronic Health Record (EHR) systems. Currently, the HL7 v2.x messaging standard is supported by every major medical information systems vendor in the United States.

Version 3 Messaging

The HL7 version 3 messaging standard defines a series of Secure Text messages (called interactions) to support all healthcare workflows.

HL7 v3 messages are based on an XML encoding syntax, as shown in this example:

<POLB_IN224200 ITSVersion="XML_1.0" xmlns="urn:hl7-org:v3"
  <id root="2.16.840.1.113883.19.1122.7" extension="CNTRL-3456"/>
  <creationTime value="200202150930-0400"/>
  <!-- The version of the datatypes/RIM/vocabulary used is that of May 2006 -->
  <versionCode code="2006-05"/>
  <!-- interaction id= Observation Event Complete, w/o Receiver Responsibilities -->
  <interactionId root="2.16.840.1.113883.1.6" extension="POLB_IN224200"/>
  <processingCode code="P"/>
  <processingModeCode nullFlavor="OTH"/>
  <acceptAckCode code="ER"/>
  <receiver typeCode="RCV">
    <device classCode="DEV" determinerCode="INSTANCE">
      <id extension="GHH LAB" root="2.16.840.1.113883.19.1122.1"/>
      <asLocatedEntity classCode="LOCE">
        <location classCode="PLC" determinerCode="INSTANCE">
          <id root="2.16.840.1.113883.19.1122.2" extension="ELAB-3"/>
  <sender typeCode="SND">
    <device classCode="DEV" determinerCode="INSTANCE">
      <id root="2.16.840.1.113883.19.1122.1" extension="GHH OE"/>
      <asLocatedEntity classCode="LOCE">
        <location classCode="PLC" determinerCode="INSTANCE">
          <id root="2.16.840.1.113883.19.1122.2" extension="BLDG24"/>
  <!-- Trigger Event Control Act & Domain Content -->
Clinical Document Architecture (CDA)

The HL7 Clinical Document Architecture (CDA) is an XML-based markup standard intended to specify the encoding, structure and semantics of clinical documents for exchange.The standard was jointly published with ISO as ISO/HL7 27932.

Try IQDox Now