BizTalk HL7 essential knowledge part 2

This is the second part of the HL7 essential for BizTalk developer.
The essential things that a BizTalk developer must know to start with this accelerators are:

HL7 Message structure
How HL7 accelerator work
Most important tips (next post)

to install HL7 accelerator we must execute the setup under ROOTBizTalk Accelerators directory of the BizTalk 2010 distribution.
The installation user must be part of BizTalk Administration Group


I’ve started to work with the first version of this accelerator, now there are new more features, I recommended to select custom installation and select all.
Follow the canonicals setup steps, select a user for service (for first time I recommended the same user used on setup), select the name of HL7 accelerator database.

HL7 Message structure

The first important thing for BizTalk developer is to understand what is HL7 message and how it work.
To work with HL7 we must understand these terms:
Events, Triggers, semantic and expected events
There are many type of HL7 message ORM,ODT, ACK etc.. , any type has its own meaning, for example ACK is general acknowledgment message, ADT Admission Dismission Transfer and for ADT type we have events, for example Admit a patient (A01), Discharge/End Visit (A03), Pre-admit a patient (A05) and so on.
Each HL7 message is composed of segments and each segment begins with three byte, MSH message header, PID patient identification, EVN event type and each field are separated from a pipe |
In detail

MSH Message Header

EVN Event Type

PID Patient Identification

PV1 Patient Visit

This is a sample message


Each field may also divided into subfields with ^ char
You can identify all char divisors in the first field of MSH segment.
For BizTalk developer the most important thing are MSH.15 and MSH.16 fields, these fields are used from accelerator to check the acknowledgment type.
MSH.15 define the type of acknowledgment and MSH.16 is the application acknowledgment type, each HL7 infrastructure that used HL7 protocol must respect this rule.
For example, if we set to NE|NE this means that the receiver doesn’t want any acknowledge, if the sender set MSH.16 to AL this means that the accelerator must respond an acknowledge ever.
In these years I have used all BizTalk accelerators and many times I have seen the same problem, a wrong use of protocol specifications.
If the client application doesn’t respect the HL7 protocol acknowledge specification, the BizTalk HL7 accelerator cannot work as well, so you must be sure about this.


When the BizTalk HL7 accelerator send an acknowledge message the client receive a MSA type message.
About MSA the most important fields are:

MSA.1, return a two byte code:

AA Application Accept

AE Application Error

AR Application Reject

MSA.2, this is the message control ID from sender

MSA.6 for error code and description

For others details about HL7 protocol message you can read these resources: is the Hl7 official site

How HL7 accelerator work

The core of BizTalk HL7 accelerator are , adapter, pipeline, HL7 schemas and Parties.
To understand we must inspect the HL7 directories installation, under ROOT:Program Files (x86)Microsoft BizTalk 2010 Accelerator for HL7.


Under pipelines you have the pipelines to use with accelerator, these pipelines have a pipeline component used from accelerator.


Under schemas, the most important schemas to work with BizTalk accelerator and HL7 messages


Under SDK there are the MLLP send an d receive tools to test HL7 message transmission, you can find other tools in internet too, check this link

The BizTalk HL7 accelerator uses the parties to make all operations around protocol rules, all rules must be set with BizTalk HL7 Configuration Explorer.


With BTAHL7 we can sett all HL7 rules related at the accelerator behavior.
To use BTAHL7 we must create a party and the Organization name is related to the first fields of MSH segment

the big picture…


Without HL7 pipelines the accelerator doesn’t work.

Most important tips
The Most important tips are related to the development of a HL7 project, in the next post and third part of this trip around HL7 accelerator I’ll explain the development aspects

Related blog posts