HL7 v2.5 TDS/XML Messages/Acknowledgements - IBM Websphere Message Broker/MQ -
EDI Mapping Example

Acknowledgment Message (ACK) Segments:

Acknowledgment Message (ACK):
SegmentACK MessageUsageCardinality
MSHMessage HeaderR[1..1]
MSAMessage AcknowledgmentR[1..1]
ERRErrorRE[0..1]
R=Required, RE=Required Can Be Empty, C=Conditional, CE=Conditional Can Be Empty, B=Backward Compatible, X=Not Supported

Order Message (ORM) Segments:

Order Message (ORM):
SegmentORM MessageUsageCardinality
MSHMessage HeaderR[1..1]
NTENotes and Comments (for Header)X[0..0]
PIDPatient IdentificationR[1..1]
PD1Additional DemographicsX[0..0]
NTENotes and Comments (for Patient ID)X[0..0]
PV1Patient VisitR[1..1]
PV2Patient Visit Additional InfoX[0..0]
IN1InsuranceX[0..0]
IN2Insurance Additional InfoX[0..0]
IN3Insurance Additional Info CertX[0..0]
GT1GuarantorX[0..0]
AL1Allergy InformationX[0..0]
ORCCommon OrderR[1..1]
OBRObservation RequestR[1..1]
ZDSAdditional Identification InformationR[1..1]
NTENotes and Comments (for Detail)X[0..0]
DG1DiagnosisX[0..0]
OBXObservation/ResultRE[0..999]
NTENotes and Comments (for Results)X[0..0]
CTIClinical Trial InformationX[0..0]
BLGBilling SegmentX[0..0]
R=Required, RE=Required Can Be Empty, C=Conditional, CE=Conditional Can Be Empty, B=Backward Compatible, X=Not Supported

Data Type:


Escape Sequence:


Message Delimiter:

Sample HL7 v2.5 TDS Messages/Acknowledgements:

Input Message - The input HL7 v2.5 TDS message that is used to run the sample is contained in the following file: hig_hl7_tds_input_message.txt



Output Message - The expected HL7 v2.5 TDS output message is contained in the following file: hig_hl7_tds_output_message.txt



Output Message - The expected acknowledgment message is contained in the following file: hig_hl7_tds_ack_message.txt

Sample HL7 v2.5 XML Messages/Acknowledgements:

Input Message - The input HL7 v2.5 XML message that is used to run the sample is contained in the following file: hig_hl7_xml_input_message.txt



Output Message - The expected HL7 v2.5 XML output message is contained in the following file: hig_hl7_xml_output_message.txt



Output Message - The expected acknowledgment message is contained in the following file: hig_hl7_xml_ack_message.txt

Process Flow Solution

The message flows located in the Flows.Main broker schema show how the subflows in this sample can be combined to create a complete system.

The complete system performs the following tasks:

  1. Receives an HL7 message from a sending application over the Internet Protocol network.
  2. Removes MLLP delimiters from the HL7 message, by using the TrimMLLPBytes subflow.
  3. Parses and validates key fields of the received HL7 message, by using the HL7 message set.
  4. Detects if the message has been previously received, by using the DetectDuplicate subflow.
  5. Assigns a sequence number in an MQRFH2 header, by using a Sequence node. If the message already contains a sequence number the Sequence node must be removed.
  6. Commits the message to a WebSphere® MQ queue.
  7. Builds an HL7 acknowledgment (ACK) message, with code AA to indicate success.
  8. Adds MLLP delimiters to the HL7 ACK message, by using the AddMLLPBytes subflow.
  9. Sends the HL7 ACK message over the Internet Protocol network.
  10. Checks if any extra data has been sent by the sending application that falls outside of the HL7 specification, by using the RemainderProcessing subflow.
  11. Transforms the message into an XML-based canonical model Common Information Model (CIM) message.
  12. Transforms the message from the CIM into a specific HL7 format for a particular destination application.
  13. Ensures that the HL7 message is in the correct sequence, by using a Resequence node.
  14. Adds MLLP delimiters to the HL7 message, by using the AddMLLPBytes subflow.
  15. Sends the HL7 message to the receiving application over the Internet Protocol network.
  16. Waits for an HL7 ACK message to come back from the application.
  17. Checks the code of the received HL7 ACK message and takes the appropriate actions.

To achieve this process flow solution, the system has been constructed by using the following message flows, which are connected by using WebSphere MQ queues.

The Receiver flow receives HL7 messages over the Internet Protocol network and then parses and validates the HL7 message MSH segment by using HL7 message definitions, after handling MLLP. The Receiver flow checks that the message is not a duplicate. If it is not duplicate, the Receiver flow assigns a monotonically increasing sequence number to the incoming HL7 message by using the Sequence node. After committing the HL7 message to a WebSphere MQ Queue, the Receiver flow builds an HL7 ACK (AA) message and sends it over the Internet Protocol network. If an error occurs, an HL7 ACK (AE or AR) message is built and sent instead.

The XformHL7toCIM flow takes the HL7 message from the Receiver flow and checks the message for remainder fields. The XformHL7toCIM flow then maps the message into the XML-based CIM for processing.

The XformCIMtoHL7 flow transforms the XML-based CIM message into the HL7 format that is appropriate for the destination application.

The Sender flow maintains the sequential order of the HL7 messages, by using a Resequence node. The flow then removes the WebSphere MQ-specific headers and converts the message into BLOB format. The Sender flow adds the leading and trailing MLLP delimiters and sends the HL7 message to the destination application over the Internet Protocol network. The Sender flow then waits for an HL7 ACK message from the application. If the ACK contains an AA code, no further action is required. If the ACK contains an AE or AR code, the failure is logged, and if the code is AR the HL7 message is re sent.

Receiver Flow

The following diagram shows the Receiver flow.

hig_hl7_receiver_msgflow

ReceiverExceptionHandler subflow

The following diagram shows the ReceiverExceptionHandler subflow.

hig_hl7_receiverexceptionhandler_msgflow

XformHL7toCIM flow

The following diagram shows the XformHL7toCIM message flow.

hig_hl7_xfromhl7tocim_msgflow

XformCIMtoHL7 message flow

The following diagram shows the XformCIMtoHL7 message flow.

hig_hl7_xfromcimtohl7_msgflow

TransformationExceptionHandler subflow

The following diagram shows the TransformationExceptionHandler subflow.

hig_hl7_transformationexceptionhandler_msgflow

Sender flow

The following diagram shows the Sender flow.

hig_hl7_sender_msgflow

SenderExceptionHandler subflow

The following diagram shows the SenderExceptionHandler subflow.

hig_hl7_senderexceptionhandler_msgflow



Go Back to:
http://Howes-IT-Going.com

This Webpage and Contents Created by Steven C. Howes © Howes-IT-Going 2003-2012 - All rights reserved by IBM Websphere® MQ and HL7. - For Educational Purposes ONLY