HL7DFDLInput node

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

Purpose

The HL7DFDLInput 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 while you are waiting for data, or the closure of a connection while you are 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 tries to reconnect until the data is successfully retrieved, or until the number of attempts that is defined by the Retry threshold property is exceeded.

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

The HL7DFDLInput node handles messages that are defined in the DFDL domain. The HL7 message format in the DFDL message model 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 models, see Message models in the IBM® Integration Bus product documentation.

You can configure the HL7DFDLInput 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 whether 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 that is 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 that are expected in the set time period.

If an incoming message is not a duplicate, the message is passed to the Out terminal of the HL7DFDLInput node for further processing. If a duplicate is detected, the HL7DFDLInput 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 it is processed as a new message.

For information about HL7, see Health Level Seven International.

The HL7DFDLInput 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:

GenericHL7DFDLInput node icon

Using this node in a message flow

When a HL7DFDLInput 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 DFDL domain. The message flow is responsible for returning an acknowledgment (ACK) to the requester.

If there is a failure in the HL7DFDLInput 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 HL7DFDLInput 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 A DFDL parsing error message is shown. The message summarizes the problem.
BUILDACK AR Error while building ACK message

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

SENDACK AR Error while sending 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 HL7DFDLInput 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 HL7DFDLInput node

When you have added an instance of a HL7DFDLInput 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 HL7DFDLInput 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 HL7DFDLInput node are described in the following table.
Property M C Default Description
Node name Yes No HL7DFDLInput 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 HL7DFDLInput node are described in the following table.
Property M C Default Description
Check duplicates No Yes 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 No 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 Yes   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 Yes 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 No Yes Selected Determines whether acknowledgment messages are sent when duplicate messages are detected.
Use generic model No Yes Selected Determines the structure of the message tree that is sent from the node.
  • If this option is cleared, the structure of the tree is determined by the content of the MSH.9.MessageType field in the incoming message. The tree contains a top-level element that corresponds to the message type, for example, ADT_A01, and this element contains a child element for each HL7 segment; for example MSH, EVN, PID, PV1.
    ADT_A01
      MSH
      EVN
      PID
      PV1
  • If this option is selected, the tree contains a top-level element HL7, which contains a child element MSH and a child element for each HL7 segment, called anyHL7Segment. Each instance of anyHL7Segment contains a child element that has the name of the HL7 segment, for example EVN, PID, PV1.
    HL7
      MSH
      anyHL7Segment
        EVN
      anyHL7Segment
        PID
      anyHL7Segment
        PV1
The Basic properties for the HL7DFDLInput 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 arrives. 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 HL7DFDLInput 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 HL7DFDLInput node.
The Retry properties for the HL7DFDLInput 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.
The Parsing properties for the HL7DFDLInput node are described in the following table.
Property M C Default Description
Validate Yes Yes None This property controls whether validation takes place. Valid values are:
  • None
  • Content and Value
  • Value
Parse timing Yes No On demand This property controls when an input message is parsed. Valid values are:
  • On demand
  • Immediate
  • Complete

For a full description of this property, see Parsing on demand.

Message coded character set ID Yes Yes 1208 The ID of the coded character set used to interpret the data being read.