Introduction to HL7v2
HL7v2 is the messaging standard that has carried clinical and administrative data between healthcare systems since 1987. This page places it within the wider HL7 family.
Before explaining what HL7v2 means, it helps to understand what HL7 is in the first place. HL7 and HL7v2 are related terms within the wider context of healthcare interoperability standards.
Health Level Seven (HL7)
HL7 (Health Level Seven) is a set of international standards for the exchange, integration, sharing, and retrieval of electronic health information. These standards include HL7v2, HL7v3, and Fast Healthcare Interoperability Resources (FHIR).
HL7 standards are widely recognized and adopted in the healthcare industry as a means of interoperability between different systems and applications. They address different levels of complexity and different use cases, catering to the evolving needs of the industry.
Health Level Seven International (also HL7)
HL7 standards are developed and maintained by Health Level Seven International (HL7), a not-for-profit, ANSI-accredited standards-developing organization. Its mission is to provide a framework and a community for healthcare professionals, software developers, and other stakeholders to collaborate on standards for information exchange across the healthcare ecosystem. HL7 standards support a wide range of activities, including clinical care, research, public health, and administrative functions.
HL7 International operates through a collaborative process involving volunteers and member organizations from around the world. It offers educational resources, certification programs, and events to promote awareness and understanding of its standards. The organization also facilitates the creation of implementation guides and provides tools to support adoption.
Health Level Seven Version 2 (HL7v2)
HL7v2, also known as HL7 version 2, is a specific version of the HL7 standard. It is the most widely used and historically significant version. HL7v2 provides a structured, standardized format for exchanging clinical and administrative data between healthcare systems — electronic health record (EHR) systems, laboratory information systems (LIS), radiology systems, billing systems.
Consider a patient visiting a hospital for an HbA1C test. The patient's demographic data lives in the hospital's EHR. The physician orders a blood test, and the order is sent to the laboratory information system, where the test is performed. The results are returned to the EHR, where they become available to the physician.
HL7v2 uses a hierarchical structure of segments and fields to represent different types of data — patient demographics, clinical observations, orders, results, and more.
Here is a sample HL7v2 message in version 2.8 format for a Lab Order message OML O21:
MSH|^~\&|SendingApp|SendingFacility|ReceivingApp|ReceivingFacility|20230630120000||OML^O21^OML_O21|MSG000001|P|2.8|
PID|1||12345||Doe^John||19700101|M|||123 Main St^Anytown^CA^12345||555-123-4567|||||S||12345678|
PV1|1|O|^^^Hospital^Bed^100|||12345^Smith^Jane^^Dr.|^|||Ward^^^Hospital|||||||||||||||||||||||||20230630120000|
ORC|NW|ORD000001^Lab|
OBR|1|ORD000001^Lab||^Complete Blood Count|||20230630120000|||12345^Smith^Jane^^Dr.|||20230630120000||Urgent|||Specimen^Blood|||||||||||||F|The message will not make sense yet
Do not worry if the structure looks impenetrable — Message structure breaks it down piece by piece.
HL7v2 versions
HL7v2 has evolved over the years to meet the changing needs of the healthcare industry. The first version was released in 1987. Each subsequent version represents an evolution of the standard, addressing issues, introducing new features, and improving interoperability.
Backward compatibility
HL7v2 versions are designed to be backward compatible. The syntax and structures of earlier versions are supported in later ones. A system that supports HL7v2.8 can therefore process messages from HL7v2.7, HL7v2.6, and so on.
In practice, backward compatibility is not always honoured. Some systems do not support every version. And although HL7v2 is semantically backward compatible, later versions add fields, segments, and other elements to accommodate new requirements. If an implementation relies on the value or presence of these added elements, backward compatibility breaks down for messages from older versions.
Backward compatibility is not guaranteed
HL7v2 has been developed and maintained with backward compatibility in mind. In practice that promise is not always kept. Some systems do not support every version of HL7v2.
The purpose of HL7v2 is the standardized exchange of healthcare information. That exchange is what makes coordinated care, patient safety, streamlined administration, and clinical decision support work across systems built by different vendors at different times.
HL7 as a whole defines the principles and frameworks for healthcare data interoperability. HL7v2 is the version that focuses specifically on message structure and syntax for data exchange.