HL7 Processing and Generation


This document will cover the following topics.

What is HL7 ?
HL7, which is an abbreviation of Health Level Seven, is a standard for exchanging information between medical applications. This standard defines a format for the transmission of health-related information. Information sent using the HL7 standard is sent as a collection of one or more messages, each of which transmits one record or item of health-related information.

How are HL7 messages used ?
Briefly, an hl7 message is used to transfer healthcare information in an uniform format. More information on what types of data can be exchanged, see here

HL7 message types
There are four primary HL7 standard message types ( types of information  being sent).

They are,

RHEA only uses the ADT and ORU message types. 

What does an HL7 message look like ?

An hL7 message can be broken down into several segments, each of which may be composed by many fields. an hl7 message can be -parsed in different formats. It can be parsed either as an xml message (each field denoted by a an xml tag) or as a pipe delimited message. Pipe delimited messages have the same structure as their xml counterparts. The only difference between xml and pipe delimited is how they seperate various segments from each other. 

For a sample hl7 message (xml format) see here.

For a sample hl7 message (pipe delimited format) see here.

HL7 messages and OpenMRS
OpenMRS currently supposed both hl7 message generation and consuming. HL7 message consuming is supported directly via  the OpenMRS core, while message creation is performed via the hl7query module.

OpenMRS vs SHR
What are the key differences between OpenMRS hl7 processing and SHR message processing ?
Synchronous vs asynchronous, the use of hl7 message queues and alternatives adopted by the SHR Adapter module.

HL7 message types used in the SHR Adapter module

For a more detailed explanation on what hl7 message types the SHR Adapter supports, and what they look like, see here.