GenericHL7Input node

Use a GenericHL7Input node to receive messages from clients that connect to the integration node by using the MLLP protocol over TCP/IP.

Note: The GenericHL7Input node is supported for compatibility with applications that were developed in IBM® WebSphere® Message Broker Connectivity Pack for Healthcare. However, in IBM WebSphere Message Broker Connectivity Pack for Healthcare version 8.0, an upgraded version of this node, HL7DFDLInput, became available. This node performs the same functions as the GenericHL7Input node except that it uses the DFDL message model instead of the original HL7v25P message set.

It is recommended that the HL7DFDLInput node is used for new and updated applications if possible, as the DFDL message model has the following benefits.

  • DFDL is an open-standard format whereas MRM and the HL7v25P message set are proprietary to IBM Integration Bus.
  • The DFDL editor provides simpler tools for developing and testing extensions to the HL7 schema compared to MRM and the HL7v25P message set.
  • The DFDL message model supports HL7 versions 2.7, 2.6, 2.5.1 and earlier whereas MRM and the HL7v25P message set only support HL7 version 2.5.1 and earlier.

For more information about the HL7DFDLInput node, see HL7DFDLInput node.

Purpose

The GenericHL7Input node listens on a port and when a client socket connects to the port, the server socket creates a connection for the client. When a connection is open a record of data is received and the end of record is detected by the presence of a configurable delimiter. If an error occurs when reading data, for example a timeout waiting for data or the closure of a connection while waiting for the full record, the data is sent to the Failure terminal. If the Failure terminal is not connected an exception is thrown. If the Retry mechanism property for the node is not set to Failure, the node retries until the data is successfully retrieved or until the number of retry attempts defined by the Retry threshold property is exceeded.

The GenericHL7Input node requires messages that use the MLLP protocol over TCP/IP. If the MLLP leading bytes are not present the message is sent to the Failure terminal.

The GenericHL7Input node handles messages that are defined in the MRM domain. The HL7 message format in the HL7v25P message set message set is used to parse the messages. If a parsing error occurs, or if mandatory MSH fields are not present, the message is passed to the Failure terminal. For information about message sets, see Message sets overview in the IBM Integration Bus product documentation.

You can configure the GenericHL7Input node to check for duplicates. Each incoming HL7 message has a MessageControlID field in the MSH header segment, which identifies the record. If the Check duplicates property is selected, all identifiers are stored on the duplicate queue with the acknowledgment (ACK) that was returned to the sender. The identifier of an incoming message is checked against the saved identifiers to determine if it is a duplicate. When a duplicate is detected, it is not processed, but the same acknowledgment that was sent with the first message is returned to the sender. The duplicate queue is specified as a node property.

Identifiers are stored on the duplicate queue for the duration defined by the Duplicate time period property. After this duration has elapsed, the identifiers are deleted and messages with the same identifier are no longer treated as duplicates. You must size the duplicate queue to contain the peak number of message identifiers expected in the set time period.

If an incoming message is not a duplicate, the message is passed to the Out terminal of the GenericHL7Input node for further processing. If a duplicate is detected, the GenericHL7Input node returns the ACK to the requester. If duplicate reporting is selected and a duplicate is detected the message is passed to the Failure terminal.

Messages are processed under transactional control. If the message flow is rolled back then duplicate identifiers that were added to the duplicate identifier queue are removed. This ensures that if the message is resubmitted it is not identified as a duplicate and is processed as a new message.

If an error occurs in reading data, including a timeout waiting for data or the closure of a connection while waiting for the full record, the data is sent to the Failure terminal. If the Failure terminal is not connected an exception is thrown. If the Retry mechanism property for the node is not set to Failure, the node retries until the data is successfully retrieved or until the number of retry attempts defined by the Retry threshold property is exceeded.

For information about HL7, see Health Level Seven International.

The GenericHL7Input node is contained in the Healthcare drawer of the message flow node palette, and is represented in the IBM Integration Toolkit by the following icon:

GenericHL7Input node icon

Using this node in a message flow

When a GenericHL7Input node is used in a message flow, messages passed to the Out terminal contain parsed HL7 messages with leading and trailing MLLP bytes removed. The message tree contains MQMD and MQRFH2 headers so that the message can be written directly to a queue if required. The body of the message contains an HL7 message in the MRM domain. The message flow is responsible for returning an acknowledgment (ACK) to the requester.

The GenericHL7Input node is transactional. When the message flow in which it is used ends successfully, all messages written under the transaction are committed, including the message to the queue that saves IDs for duplicate detection.

If there is a failure in the GenericHL7Input node, the message is passed to the Failure terminal. LocalEnvironment.HL7 contains the fields shown in the following Environment table. These fields give information that is used to build a negative acknowledgment (NACK) or create an error message.

Field Description
FlowMilestoneReached Indicates the action being taken when the error occurs.
SendNACK Send a negative acknowledgment (NACK) response.
EndConnection YES: Close the connection.

NO: Do not close the connection.

HL7RC HL7 Return code.
ErrorCondition Error text to include in the NACK.
If the SendNACK field is set to YES, a NACK is returned to the requester. The SendNACK field is set to NO if one of the following conditions occurs:
  • The incoming message did not contain the correct MLLP delimiters, therefore it is assumed that the MLLP protocol is not supported.
  • The message is a duplicate and the NACK was returned by the GenericHL7Input node.

If the EndConnection is set to YES, the connection must be closed. This action occurs when the incoming message did not contain the correct MLLP delimiters and it is therefore assumed that the MLLP protocol is not supported.

The HL7RC (HL7 Return code) and ErrorCondition fields are available to provide information in the NACK that is returned to the requester.

The following Error table indicates the error codes that can occur.
Flow Milestone Reached Return Code Error text
DETECTDUPLICATE AR Error checking duplicates
PARSE AE Input message MSH parsing or validation error
BUILDACK AR Error while building ACK message.

(This error occurs when an ACK is returned because it is a duplicate message).

SENDACK AR Error while building ACK message

(This error occurs when an ACK is returned because it is a duplicate message).

DUPLICATEERROR AR Failure during duplicate detection. Duplicate queue is full.

Failure during duplicate detection. Message processing failed.

SAVINGDUPDATA AR Error while saving duplicate data
DUPLICATE RECORD AR Duplicate record detected

The GenericHL7Input node is transactional. When the message flow in which it is used ends successfully, all messages written under the transaction are committed. If the message ends with an exception that is not caught, all messages written under the transaction are rolled back, including the message. This action includes the message to the queue that saves IDs for duplicate detection. You must determine which messages you want to be rolled back in these circumstances and ensure that other messages, for example error messages, are not written under the transaction.

Configuring the GenericHL7Input node

When you have added an instance of a GenericHL7Input node into a message flow, you can configure it.

All mandatory properties for which you must enter a value (properties that do not have a default value defined) are marked with an asterisk.

Terminals and properties

The GenericHL7Input node terminals are described in the following table.
Terminal Description
Failure The output terminal to which a message is routed if an error occurs.
Out The output terminal to which the message is routed if it is successfully retrieved from an external resource.
Catch The output terminal to which the message is routed if an exception is thrown downstream and caught by this node. Exceptions are caught only if this terminal is attached.

The following tables describe the node properties. The column headed M indicates whether the property is mandatory (marked with an asterisk if you must enter a value when no default is defined); the column headed C indicates whether the property is configurable (you can change the value when you add the message flow to the BAR file to deploy it).

The Description properties for the GenericHL7Input node are described in the following table.
Property M C Default Description
Node name Yes No GenericHL7Input The name of the node.
Short description No No   A brief description of the node.
Long description No No   Text that describes the purpose of the node in the message flow.
The HL7 Processing properties for the GenericHL7Input node are described in the following table.
Property M C Default Description
Check duplicates Yes No Selected Determines whether duplicate messages are detected, as determined by the unique message identifier in the HL7 MSH header.
If a duplicate is detected, the following action is taken:
  • If the message is received within the timeout period, the message is not processed but the same ACK that was sent for the original message is returned to the sender.
  • After the timeout period has expired, any duplicate messages are processed as usual.
Report duplicates Yes Yes Selected Determines whether duplicate messages that arrive within the specified time generate an error notification message.
Duplicate time period No Yes 86400 Defines (in seconds) how long identifier messages are kept before expiry. After this time period, duplicates are not recognized and are processed as usual. The default (86400) equates to 24 hours.

This property is mandatory if Check duplicates is selected.

Duplicate identifiers queue No No   Defines the queue that holds the list of current duplicate IDs against which incoming messages are checked.

This property is mandatory if Check duplicates is selected.

Leading MLLP bytes Yes No 0B Defines the leading byte, which is part of the MLLP protocol and which is removed before the message is parsed and processed.
Acknowledge duplicates Yes Yes Selected Determines whether acknowledgment messages are sent when duplicate messages are detected.
The Basic properties for the GenericHL7Input node are described in the following table.
Property M C Default Description
Connection details Yes Yes 1111 The TCP/IP connection for the source application in the form hostname:port
Timeout waiting for data record (seconds) Yes Yes 60 The length of time that the node listens on a connection for more data after the first byte of data has arrived. You can specify any length of time in seconds. The default is 60 seconds. When the specified time is exceeded, all available data is sent to the Failure terminal.
The Record Detection properties for the GenericHL7Input node are described in the following table.
Property M C Default Description
Delimiter Yes No Custom delimiter This property is not editable.
Trailing MLLP bytes Yes Yes 1C0D The trailing MLLP bytes that are used as an HL7 record delimiter. These trailing MLLP bytes are removed by the GenericHL7Input node.
The Retry properties for the GenericHL7Input node are described in the following table.
Property M C Default Description
Retry mechanism Yes No Short retry interval (seconds) How the node handles a flow failure. Valid options are:
  • Failure
  • Short retry interval (seconds)
  • Short and long retry
Short retry interval (seconds) Yes Yes 0 The interval, in seconds, between each retry if Retry threshold is not zero.
Retry threshold Yes Yes 0 The number of times to retry the flow transaction when Retry mechanism is Short retry interval (seconds).
Long retry interval (seconds) Yes Yes 300 The interval between retries if Retry mechanism is Short and long retry and the retry threshold has been exhausted.