Healthcare Interoperability Blog

interfaceware.com
  • Iguana Integration Engine
  • Resource Center
  • Blog
Home HL7 Message Components: Everything You Need to Know

HL7 Message Components: Everything You Need to Know

HL7 Message Components

HL7 (Health Level Seven) is a messaging standard for data transfer and consistency across disparate systems. HL7 plays a major role in healthcare interoperability and is used to define the format for the transmission of health-related information.

Health data sent using the HL7 standard is transmitted as a collection of one or more messages. Each message sends one record or item of health-related information. Some common examples of HL7 messages include patient records, laboratory records and billing information.

The following video describes the contents of an HL7 message and how a message is organized. After watching this video you will understand the following concepts:

  • The components of an HL7 message;
  • The delimiter characters that are used to separate these components;
  • How to determine the HL7 message type;
  • How HL7 message segments are organized.

Watch now: What are HL7 Message Components?

HL7 messages are in human-readable (ASCII) format, though they may require some effort to interpret. HL7 messages consists of 3 main components:

  • Segments
  • Composites
  • Sub-fields

Let’s take a closer look at each HL7 message component.

HL7 Segments

An HL7 message consists of one or more segments, which contains one specific category of information, such as patient information or patient visit data.

A carriage return character (\r, which is 0D in hexadecimal) separates one segment from another. Each segment is displayed on a different line of text (as seen in the sample HL7 message below).

If you are interested in learning more about segments, we suggest reading the following article.

HL7 Composites

Further, segments consists of one or more composites, also known as fields. A pipe (|) character is used to separate one composite from another.

HL7 Sub-fields

If a composite contains other composites, these sub-composites (or sub-fields) are normally separated by ^ characters.

Now that we understand HL7 message components, let’s explore a typical sample HL7 message, and describe segments and composites in more detail.

Sample HL7 message

MSH|^~\&|EPIC|EPICADT|SMS|SMSADT|199912271408|CHARRIS|ADT^A04|1817457|D|2.5|
PID||0493575^^^2^ID 1|454721||DOE^JOHN^^^^|DOE^JOHN^^^^|19480203|M||B|254 MYSTREET AVE^^MYTOWN^OH^44123^USA||(216)123-4567|||M|NON|400003403~1129086|
NK1||ROE^MARIE^^^^|SPO||(216)123-4567||EC|||||||||||||||||||||||||||
PV1||O|168 ~219~C~PMA^^^^^^^^^||||277^ALLEN MYLASTNAME^BONNIE^^^^|||||||||| ||2688684|||||||||||||||||||||||||199912271408||||||002376853

In this example, you will notice that we have 5 distinct segments separated by the carriage return character: MSH, PID, AVE, NK1 and PV1.

You will also notice that each segment contains a number of composites. For example, in the first line, the pipe character (|) separates the SMS and SMS ADT segments.

Finally, on the second line, the first name sub-field JOHN is separated from the last name DOE using the ^ character.

Determining the HL7 Message Type

Each HL7 message is of a particular message type. This HL7 message type indicates what health-related information is being provided in this message.
The message type also determines what segments can be included as part of the message.

To determine the message type of an HL7 message, examine its MSH segment. The message type is normally the ninth field of this segment. For example, consider this MSH segment, which you have seen before:

MSH|^~\&|EPIC|EPICADT|SMS|SMSADT|199912271408|CHARRIS|ADT^A04|1817457|D|2.5|

Here, the HL7 message type is ADT^A04, which is “Register a Patient”.

For further details on the HL7 message structure, including in depth information on segments, composites and delimiters, visit iNTERFACEWARE’s comprehensive guide to HL7.

Looking for professional advice? Contact an HL7 integration specialist today.

Additional Resources:5 Ways to Speed Up Your HL7 Integration

Aug 18, 2021iNTERFACEWARE
  • Email
  • LinkedIn
  • More
  • Facebook
  • Twitter

Related

The Role of Data Accessibility in HealthcareWhat is an HL7 Segment Group?
August 18, 2021 HL7 InformationHL7, hl7 message, hl7 message components, sample hl7 message
Enjoying this blog?

Sign up to receive healthcare integration news, just like this, from iNTERFACEWARE Inc.

iNTERFACEWARE needs the contact information you provide to us to contact you about our products and services. You may unsubscribe from these communications at any time. For information on how to unsubscribe, as well as our privacy practices and commitment to protecting your privacy, please review our Privacy Policy.

Resources

Integration Resources & Guides

HL7 Resources

Iguana Case Studies

Iguana Integration Engine

Overview: Integration Engine

Features: Building HL7 Interfaces

Benefits: Why Choose Iguana

Company

About Us

Integration Services

Contact Us

Connect

LinkedIn

Twitter

YouTube

© - iNTERFACEWARE Inc.
loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.