Understanding HL7 Version 3 from Developer perspective


Understanding HL7 V3 specification is a difficult task for the developers who worked on HL7 v2 messages. The HL7 V3 specification is different in many ways from V2. I have gathered all the information required for transmitting HL7 V3 messages from the V3 specification documents and here I will give a general overview of different elements of V3 and constructing the V3 message that can be exchanged with other compatible systems.

HL7 V2 versus V3

HL7 V2 is primarily intended for developers or clinical interface specialists, whose job is to move clinical data or create tools to exchange such data from one application to another. Thus, V2 is designed to ease the exchange of clinical data between different systems. Whereas V3 is influenced by Medical informatists who work in the field of healthcare and study how healthcare information is created. Thus the V3 specification primarily focuses on Healthcare data rather than how to transmit the data.

HL7 V3 message development process

The V3 message development process is based on information models produced by the development groups. An information model represents data in object oriented way. It has classes with relationships, properties, states and constraints. The information models are refined and localized to come up with messages that can be exchanged with different systems.

Reference Information Model (RIM): The RIM is an information model collectively developed by the HL7 working group. It is the information model that encompasses the HL7 domain of interest as a whole. The RIM is a coherent, shared information model that is the source for the data content of all HL7 messages. The RIM is intentionally abstract to represent the HL7 data in a standard way across all the domains of Healthcare. It is the root of all information models and structures developed as part of the V3 development process.

Domain-Message Information Model (D-MIM): The classes, attributes, state-machines, and relationships in the RIM are used to derive domain-specific information models called D-MIMs. A D-MIM is a refined subset of the RIM that includes a set of class clones, attributes and relationships that can be used to create messages for a particular domain (a particular area of interest in healthcare). Domains under Administrative Management : - Accounting and Billing - Claims & Reimbursements - Patient Administration - Personnel Management - Scheduling Domains under Health and Clinical Management: - Clinical Document Architecture - Medical Records - Public Health Reporting - Clinical Genomics - Specimen Domain - Regulated Studies

Refined-Message Information Model (R-MIM): The R-MIM is a subset of a D-MIM that is used to express the information content for a message or set of messages with annotations and refinements that are message specific. The D-MIM is used as a common base upon which all R-MIMs within a domain are built.

Heirarchical Message Descriptions (HMDs): The HMDs are abstract message structures which represent the information from R-MIMs. The HMD represents R-MIM in an organized way which can be exchanged between systems. The HMDs are called abstract because they define the message structure without reference to the implementation technology.

XML Schemas: HL7 V3 defines Implementation technology specifications (ITS). These ITS define how the abstract message types should be transmitted using an underlying technology. V3 currently defines XML ITS and UML ITS. The XML ITS defines data types and structures. The XML datatypes represents HL7 datatypes in XML specific way. And the XML structures represent the structures defined by HMDs. Thus for every message type there is a HMD and XSD correspondingly.

Understanding V3 Artifacts: We saw the process of V3 message development, where V3 information models are refined to come up with XML schemas which can be used to construct V3 XML messages. But I didn’t mention which are the XSDs contain all required information to come up with complete V3 message. In the below section, I will address this. To understand the V3 specification, understanding the artifacts of the specification is very important. The HL7 technical committee during the specification development process identifies various artifacts for a particular domain and submits the same. For every domain, the artifacts are organized in the same structure. Thus for every domain specification, the committee submits the artifacts documented as explained below. To identify every artifact, the HL7 has come up with an unique attribute called Artifact Identifier. For example, an application role submitted by the Patient Administration domain will have the following unique artifact identifier: PRPA_AR00001UV00 Where: PR = Practice(Subsection) PA = Patient Administration (Domain) AR = Application Role (Artifact type) 00001 = 6 digit non-meaningful number assigned by the Technical Comittee to ensure uniqueness UV = Realm (the only current value is UV for universal) 00 = Current version number

Application Role (Code:AR): Application roles represent a set of communication responsibilities that might be implemented by an application. Thus they describe system components or sub-components that send and/or receive interactions.

Trigger Event (Code:TE): A trigger event is a condition on which an action is initiated. 

Storyboard (Code:ST): A storyboard explains the series of actions in a particular scenario. Its primary purpose is to identify the various scenarios. Each storyboard is represented as sequence diagrams. It also lists the interactions between two or more systems playing different Application Roles.

Storyboard Narrative (Code:SN): A Storyboard narrative provides explanation for the storyboard.

D-MIM (Code:DM): Domain specific classes represented in a diagram with relationships.

R-MIM (Code: RM): A subset of D-MIM classes represented in a diagram with relationships. These classes are specifically to represent information content for one or more HMDs.

HMD (Code:HD): The Message Structures or Message types which form the payload of the data transmitted. The base HMD is depicted in a tabular format or in excel view. It also lists the various message types built based on this HMD.

Message Type (Code:MT): A message type represents a unique set of constraints applied against the common message. It is represented in Table view or in XML schema view.

Interaction (Code:IN): Interactions define the interaction between two systems. The documentation of interaction defines: - Trigger Event which initiated the interaction - Message Type which should be used for interaction (The payload) - Transmission Wrapper: A Message Type to wrap the payload with - Control Act Wrapper: A Message Type to hold the administration information about the payload being transmitted. - Sender: The Sender Role for this interaction - Receiver: The Receiver Role for this interaction.

Transmission Wrapper and Control Act Wrapper: This specification defines HL7 V3 Composite message is composed of:


  1. An "HL7 Transmission wrapper" (always)


  2. A "Trigger Event Control Act" (required for all messages except accept level acknowledgements, for which it is not permitted)


  3. The "HL7 Domain Content" specified by an HL7 domain specific technical committee (required for each Trigger Event Control Act)


The HL7 Transmission wrapper is specified in domain: Transmission Infrastructure. This domain specification describes the details on composing a V3 composite message and exchanging the composite message between systems. It covers features like acknowledgements, sequence no. protocol support, error handling and security. “Trigger Event Control Act” is detailed in domain: Message Control Act Infrastructure. This details the administrative information about the data being transmitted. Thus the interactions define the complete set of information that is required to exchange HL7 data between the systems.

Conclusion: The HL7 V3 specification contains the XSDs for Interactions which can be used to construct the composite HL7 V3 message. This composite message then can be transmitted between the systems. The V3 Specification says that a system can claim for V3 conformance based on the Application Role it will play in a particular domain. The system playing the Application Role will recognize the Trigger Events, the message types and the data content of these messages. Thus a system whose sole responsibility is to exchange the V3 data between systems reliably should claim conformance for the Application Roles defined under Transmission Infrastructure Domain.


[Trackback] Here is an interesting article by Vishnuvardhan working at Sun Microsystems in Bangalore, India. We often see semantic analysis doing by strategy and process consultants but usually not from the developers working on implementing these solutions. From ...

Posted by HL7 Connection on August 07, 2007 at 01:36 PM IST #

Interesante y clara exposición de la versión 3 de HL7.

Posted by Cgallego on August 21, 2007 at 04:40 PM IST #

"00001 = 6 digit non-meaningful number assigned by the Technical Comittee to ensure uniqueness"
I count only 5 digits... some places do have 6 though. Is this a floating number or are some of the examples missing a digit?

Posted by Kevin on August 28, 2007 at 02:41 PM IST #

Thanks Vishnu for your clear explanation of v3 from a developer perspective. We are currently implementing HL7 for the first time at a customer and are doubting between v2.4 and v3. We find it very hard to find suitable IT implementation documents on v3. Do you have some sources where we can start?
Thanks in advance.

Posted by Bas Kroes on September 12, 2007 at 06:43 PM IST #


Posted by guest on September 14, 2007 at 04:32 AM IST #

Thanks vishnu,

We have already developed the HL7 parser service for 2.3 version. For CCHIT cerficatiion for our health care product they have strictly saying to use HL7 v2.4, to do the same we are unable to get the specification document for HL2.4 version. If you have any idea please do mail me.

Thanks & Regards
Vishwanatha NOUS Infosystems

Posted by VISHWANATHA ACHARY on October 12, 2007 at 05:15 AM IST #

Its really very helpful for me at the time when I am working to develop HL7 application with version 3. It will also be helpful if I found documetns related to version 3 development like this.

Posted by Muhammad Afzal on January 21, 2008 at 05:49 AM IST #

Good explanation.

Posted by Scot Johnson on March 04, 2008 at 11:31 PM IST #

It's great to have some explanation about HL7.
My questions, Do you have an implementation with Version3 about how to decide the best kind of messages, the trigers ans more???

Posted by Harold Alexis Candelo on October 24, 2008 at 06:16 PM IST #

Hi Vishnu,

I am trying to create domain classes in C# for the HL7v3 RIM. I am looking for the base classes for Entity, Role, Participation and Act and anything that derives from that. Do you know if there is anything available out there that everybody uses but that I cannot seem to find?


Posted by Martin van der Linden on October 31, 2008 at 01:21 PM IST #


Posted by guest on March 24, 2009 at 10:39 AM IST #


Posted by guest on April 08, 2009 at 08:02 AM IST #

Vishnu, very nice article indeed !!!

I am planning to give HL7 V3 certification. Can you please let me know where can i find the study material. Is it free or it needs to be purchased. Please help !!!

Adnan Siddiqui

Posted by Adnan Siddiqui on May 16, 2009 at 04:08 PM IST #

i am new to this...i want to code an application using c# that translates HL-7 v 2.3.1 or v2.5.1 messages in HL7 v3.
Awaiting for your kind response.

Posted by zee on June 25, 2009 at 06:59 AM IST #

Thanks Vishnu for your clear explanation of v3 from a developer perspective. We are currently implementing HL7 for the first time. We find it very hard to find suitable IT implementation documents on v3. Do you have some sources where we can start?
Thanks in advance.

Posted by AnjaliHL7 on November 27, 2009 at 04:12 AM IST #

Thanks Vishnu for your clear explanation of v3 from a developer perspective. We are currently implementing HL7 for the first time. We find it very hard to find suitable IT implementation documents on v3. Do you have some sources where we can start?
Thanks in advance

Posted by AnjaliHL7 on November 28, 2009 at 02:28 AM IST #

Hi Vishnu,
Your explanation is useful to me. We too are implementing HL7 for first time. Where to find IT implementation documents on V3. Thanks

SenthilKumar Ponnuswamy

Team Lead
iblue Technologies

Posted by SenthilKumar Ponnuswamy on December 30, 2009 at 07:37 AM IST #

Hi Vishnu !
I want to see few HL7 interface Templates for scheduling. As i want to get HL7 implemented so just wants to know how can i implement. For Staff Scheduling. I have tried several ways but not getting any help.

Posted by Maryam on May 03, 2010 at 11:32 AM IST #

It's really comprehensive and abstratct about HL7 v3. I reviewed very fast what I have read about HL7.
but there is a problem that I can't find any soulution to start implementing of for example v3 message. I mean there is very few articles about implementing of HL7 statndard and it makes me really mad;
would you please help me to find some sesible papers about implementing.
thank you for your kind help.

Posted by Masoud Hosseini on May 05, 2010 at 12:36 PM IST #

[Trackback] Ya escribí sobre el tema software para salud/medicina, en: Primeras ideas para Hospital Information System

Posted by Angel "Java" Lopez on June 02, 2010 at 08:47 AM IST #

Thanks Vishnu for your explanation of v3. We currently have an application which is using HL7 v2 and we are going to work to convert the application to use HL7v3.Do u have any helpful documents which we need to follow to successfully do this and also since v3 does not have backward compatiability how do we make our application work with both v2 and v3? Also looking forward for some useful documents to where we can start off.

Thanks in advance.

Posted by Sudarsan on June 03, 2010 at 01:01 PM IST #

Hi everybody

I'm going to work on hl7 v3and try to map messages from hl7 v2.3.1 to hl7 v3.
Please if you have some materials about the way we can do the mapping between v2.3.1 and v3 i'll appreciate.

Thanks in advance

Posted by Ali on October 07, 2010 at 09:15 PM IST #

We are currently implementing HL7 for the first time. We find it very hard to find suitable IT implementation documents on v3. Do you have some sources where we can start?

Posted by Shweta on October 14, 2010 at 06:29 AM IST #

Hi Vishnu,

Nice article.


Posted by Uday on November 29, 2010 at 08:13 PM IST #

We are new to HL7. We have a requirement to connect to mutiple hospitals who can provide us HL7 files in 2.x format. From what I have learnt, the only way for them to connect to us would be to establish a secure socket connection over VPN. Is this a practical approach if we need to connect to say 50 hospitals?

Do we need to create unique sockets for each clients (incoming and outgoing) or can we use a common in and out socket and have it threaded using LLP?

Any ingsight into real world scenarios would really help me.

Thanks in advance

Posted by Srikant Chokhany on March 07, 2011 at 06:26 PM IST #

Post a Comment:
  • HTML Syntax: NOT allowed



« July 2016