The HL7 (Health Level Seven International) protocol is a standard for transferring clinical and administrative data between Hospital Information Systems (HIS).  The Leadtools.Medical.HL7 library supports receiving HL7 V2.X messages and sending HL7 V2.6 messages.

The HL7 messaging standard defines how information is packaged and communicated from one party to another.  The standard defines the language structure and data types required for seamless integration of computer systems from different vendors.  HL7 version 2 defines a series of electronic messages to support administrative, logistical, financial as well as clinical processes.  HL7 v2.x has enabled interoperability between electronic Patient Administration Systems (PAS), Electronic Practice Management (EPM) systems, Laboratory Information Systems (LIS), Pharmacy and Billing Systems, to Electronic Medical Record (EMR) or Electronic Health Record (EHR) systems.

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, and 2.6.  The V2.X standards are backward-compatible (for example, a message based on version 2.3 will be understood by an application that supports version 2.6.)

A large portion of HL7 messaging is transported by Minimal Lower Layer Protocol (MLLP), also known as Lower Layer Protocol (LLP). When transmitting via TCP/IP, header and trailer characters are added to the message to identify the beginning and ending of the message. A Hybrid Lower Layer Protocol (HLLP) is a variation of MLLP that includes a checksum to help verify message integrity.

Components of the Leadtools.Medical.HL7 Namespace

Data Types


A message is the smallest unit of data that can be transferred between systems.  Each message has a type that defines its purpose.

There are many different types of messages that can be sent in HL7.  For a listing of the possible messages that can be sent, please consult Appendix A of the HL7 specification.

Messages are composed of segments and segment groups.  Segments can be repeatable, appearing multiple times.  Segments can be optional as well, depending on the schema used for the message.

LEADTOOLS has defined all message types from the HL7 2.6 specification.  The HL7 Message structure is encapsulated in the Leadtools.Medical.HL7.Message class.


Segments are composed of fields. Support for segments is provided by the Leadtools.Medical.HL7.Segment class.


Fields are composed of primitive and composite data types. 

Composite Data Types

Composite data types are types that are composed of more than one primitive data type.


Working with HL7 messages

Building an HL7 Network Client

Building an HL7 Network Server

Help Version 20.0.2020.4.3
Products | Support | Contact Us | Intellectual Property Notices
© 1991-2020 LEAD Technologies, Inc. All Rights Reserved.

LEADTOOLS Imaging, Medical, and Document