The following topics explain the basic elements of the TCP/IP HL7 Adapter’s general operation:
The TCP/IP HL7 Adapter can be configured as either HL7 inbound or HL7 outbound. This option is determined automatically by the Adapter’s binding (link) in the Connectivity Map.
The connection type indicates how the Adapter establishes a TCP/IP connection. The role can be as a Client, where the RA connects to the external, or as a Server, where the RA waits for a connection.
Connected as a TCP/IP HL7 Client
As a TCP/IP HL7 client, the Adapter connects to external server (host/port) and establishes a connection (in active mode).
Connected as a TCP/IP HL7 Server
The Adapter waits and listens to a specific port for incoming connection requests from an external client. Once a request is received, the Adapter accepts the request and establishes a connection (in passive mode).
This section describes the two supported envelope types used in the HL7 protocol:
Both envelope types use the following configuration parameters. For more information on these parameters, see Lower Layer Protocol — TCP/IP HL7 V2 Inbound Adapter or Lower Layer Protocol — TCP/IP HL7 V2 Outbound Adapter.
Start Block Character
End Data Character
End Block Character
The MLLP envelope consists of a Start of Block component, a Data component, an End of Data component, and an End of Block component. The size of the HL7 Data field is determined by the length of the data (number of bytes between start and end), with a maximum size of 99999 Bytes.
The HLLP envelope consists of a Start of Block component, a ”D’ (Data) or ”N’ (NAK) indicator, an HL7 Version component, a Carriage Return, a Data component, a Block Size component, a Block Checksum component, an End of Data component, and an End of Block component. The size of the HL7 Data field is determined by the length of the data (number of bytes between start and end), with a maximum size of 99999 Bytes.
The Adapter supports sending and receiving both HL7 acknowledgement types:
Application acknowledgment: This acknowledgement is sent when the message is successfully received.
Commit (accept) acknowledgment: This acknowledgement is sent after the message is successfully and functionally processed by one receiving system.
The Adapter provides the option to journal successfully received or sent messages and their corresponding ACKs. The messages are sent to a JMS queue or topic, depending on how you configure the Adapter, and the ACKs are stored as a JMS property, HL7_ACK, of that message.
It is expected that, when enabled, the journal queue has one or more subscribers that process the contents of the queue so that it remains manageable. For example, the Batch Adapter or a database Adapter could periodically consume the messages by writing them to a file or a database.
The Adapter provides a mechanism to store failed or stripped messages in a JMS queue or topic. The advantage of this is that the messages are then saved in a form readily usable by the other data flows, that can automatically process these messages or make them available to some type of human intervention or message repair, using tools like the JMS queue editor or an eVision application.
If the Adapter loses the connection to the external system in any direction or connection type, due to a crash, shutdown, or suspension (including recourse actions), an alert is generated. The monitor’s status of that Adapter is changed to “down” and the Adapter’s icon is encased in a red warning box. The monitor also displays the number of messages it has processed along with the date and time of the last message sent.
HL7 version 2.5 adds a new SFT segment to every message. The Adapter not only sends and receives messages with the new segment, it can automatically create and populate them, using information from the Adapter properties, for the outbound message and the ACK sent from the inbound mode. This feature is only available when the Version ID property is set to 2.5 or later.
The Adapter supports delayed acknowledgements in either direction and in a number of roles. This functionality is described in detail in Outbound Adapter Roles for Delayed ACK Scenarios.