Sun Adapter for TCP/IP HL7 User's Guide

Modes and Roles

The TCP/IP HL7 Adapter can operate in two modes: standard and delayed ACK. Standard mode is the typical message exchange in HL7 where an HL7 message is sent and an HL7 ACK is received, or the other way around. In delayed ACK mode, the exchange of a message requires two acknowledgements: one to confirm the message was received and the other from the external system that actually received the message to verify that it was received.

In these two modes, the Adapter and the ESB have a number of roles they play within certain scenarios; that is, certain components can fulfill different responsibilities within a protocol. For example, the outbound Collaboration can fulfill two roles in the delayed ACK mode: one as the “sender of messages” that expects two delayed ACKS, and another as the “forwarder of ACKS” from the external system.


Note –

Delayed ACK mode is deprecated as of HL7 version 2.2 and was removed from the HL7 standard as of version 2.5.


Standard Mode

In standard mode, the HL7 Adapter can assume two roles, sender and receiver. These are implemented in the outbound and inbound Collaborations respectively.

HL7 Adapter Sender Role

The outbound Collaboration is the implementation of the Sender and the RA is configured for an outbound data flow. A Java CAPS Service forwards the data to the Adapter, which in turn forwards the data to the accepting HL7 external system. The External System responds with an ACK or NAK response.

HL7 Adapter Receiver Role

The inbound Collaboration is the implementation of the Receiver role in conjunction with the RA being configured for inbound direction. The Adapter accepts a message from the sending HL7 external system, forwards the data to a Java CAPS Service, and responds to the sending system with an ACK or a NAK response.

Delayed ACK Mode

Delayed ACK mode is an extension to the basic HL7 message exchange mode, where there is some middleware component between the Sender and the Receiver. The sending system expects to receive the ACK from the receiving system in addition to the middleware component. In this mode, the ESB can assume two roles in the protocol: as the Sender and as the Receiver.

ESB Sender Role

In this role, the ESB acts as the Sender in the exchange. The HL7 RA is configured for the outbound direction, and the HL7 outbound Collaboration is configured so the Sends App Ack property is set to True. This parameter is used even though the ESB technically does not send an application ACK. Rather, it receives the application ACK and provides the compliment behavior to the ACK sent by the inbound configured Adapter. The two are related in the protocol.

The purpose of this role is for the ESB to act as if it is a system that requires the Delayed ACKs so that it can communicate with a system that operates in the Delayed ACK Receiver role. An example implementation of this role is available in the HL7Outbound sample Project.

ESB Receiver and Forwarder Role

To perform this role, the ESB is configured with two instances of the HL7 Adapter , each performing its own role as Receiver or Forwarder.


Note –

For Delayed ACK, the Receiver and Forwarder must be on the same integration server.


The following steps convey the steps taken in this scenario.

  1. The Receiver accepts the HL7 message. It then returns the first ACK, with an MSH - 5, value “D” (for the Delayed ACK), to the Sender.

  2. The Receiver sends the message to the Forwarder.

  3. The Forwarder sends the message to the receiving External System.

  4. The receiving External System sends an ACK to the Forwarder.

  5. The Forwarder receives the ACK from the External and forwards it on to the Receiver.

  6. The Receiver then forwards the ACK, with an MSH - 5, value “F” indicating that it is the receiving External System’s ACK, to the Sender.

In the Receiver role, the HL7 RA is configured for inbound, and the inbound Collaboration is used with the parameter Sends App Ack set to true. In the Forwarder role, the RA is set to outbound, the parameter Forward External Acks to eGate, is set to true, and the outbound Collaboration is selected.

This configuration table presents the necessary parameters used to configure the Adapter to assume the Delayed ACK roles

Table 1 Adapter Delayed ACK Configuration

Role 

Direction 

Sends App Ack Property 

Forward External Acks 

Sender 

Out 

True 

N/A 

Receiver 

In 

True 

N/A 

Forwarder 

Out 

N/A 

True 

An example of the receiver role is provided in the prjHL7Inbound sample Project. The prjHL7Outbound Project provides a sample implementation of the Forwarder role.