HL7 Message Types Tutorial

The third video in the series of HL7 Messaging tutorials where we examine the HL7 Message Types. Learn how to work with different HL7 message types, and identify the different components used to define a message. Prepare for your HL7 integration work with the tools to understand every hl7 message type that comes your way.

Return to Tutorial Directory

Video Transcript

HL7 Message Types - HL7 Tutorial 3:

Hello and welcome to this third video in the series of HL7 Messaging tutorials where focus on:

HL7 Message Types of the MSH-9.

Because HL7 is designed to work with many different sectors of the medical software industry it is not surprising that different types of message are needed to express different collections of information.

The message type is critical for filtering out messages that are not relevant to a particular application.

If we take a look in HL7 Soup sample messages we see an indication of what each message is about.

Headings like “Document notification” , “Patient Referral”, and “Register a Patient” clearly indicate the intended use of this message, but how does HL7 Soup know this – more importantly, how can you know this when looking at a message.

Well, It’s always at the same place – MSH-9. After working with HL7 for a while you’ll find it easy to spot, but if you are new to it, you can always right click on the Message Type Header, and you’ll be taken straight to it.

One of the first things you’re going to notice is that even though HL7 Soup tells you this message is for Registering a Patient, the actual HL7 message says no such thing. Instead the more computer friendly ADT^A04 code is written in the message.

Fortunately, HL7 Soup provides you a convenient drop down to help you out. Scrolling through this list gives you a directory of every message type that HL7 supports.

It is worth noting though that I am only scrolling through the first component of the MSH-9. This is just the ADT section, not the A04 part.

A quick side note: Unlike most HL7 Message Types, the description of ADT message isn’t particularly intuitive. It actually stands for “Admission, Discharge and Transfer” but everyone who works with HL7 just calls it ADT.

Setting the first component helps to filter what is available for the second component, the MSH-9.2, the “Event Type”. Here is the real nitty gritty of what this message is doing. The A04 is the specific part of the message that says to “register a patient”. And so we see that the MSH-9.2’s description is actually what HL7 Soup uses to represent the message.

What the MSH-9.1 component has done for us is to provide a filter, so that we only see ADT type events in this drop down. So all of the event types that we see here are just for the ADT message type. You can optionally use the segments grid on the right to view the full list of MSH-9.2 in its entirety – as you can see; this is quite a large and comprehensive list. Searching through this list can be a very effective technique for finding a message type that suits your needs.

You may have noticed that some of the sample messages have message types codes that are longer than others – Ones such as this ADT^A04^ADT_A01 have a third component section, the MSH-9.3, that seems to add nothing to the message type other than confusion. Is this messages event type A04, or is it an A01? The answer is quite simply that it is an A04, but the messages structure is the same as an A01. The message structure along with the message version in MSH-12 enables computer software to validate that the message conforms to a particular structure, and can prevent poorly formed HL7 messages being processed by their system.

Because many of the A0x messages have exactly the same composition requirements, the MSH-9.3 creates a way of reducing the required schema definition size, by allowing different message types to share identical structure.

In order to see the message structure for the current message, just click on the message type name. Here you can see every segment type that is valid for this type of message. You can see for instance that this message requires exactly 1 PID or Patient details section, but could have 0 or more NK1 or Next of Kin details.

You can also see that some segments come in groups. For instance the IN1 or insurance details could also be supplemented with an IN2, IN3, and a ROL segment providing additional details.

It’s also worth noting that a short description for each of the segments is available if you mouse over the segment code.

Remember, you can download a free 30 day trial of HL7 Soup from www.HL7Soup.com, which will help you through this tutorial series.

If these tutorials have helped you then please do me a favor, and click ‘like’. You can also subscribe to this channel so you are notified as soon as new ones come out.

Comments are always welcome. I'll have new videos coming out shortly, why not send me a message and let me know what you'd like my next one to be one.

Download 30 Day Free Trial of HL7 Soup