A sending application should review each response and verify three things:
1. The response is an HL7 formatted message.
To do this, the application simply needs to review the format of the response that was received and verify that it appears to be formatted in a typical HL7 standard pipe-and-hat format.
2. The response is a positive HL7 ACK.
To verify this, the application needs to review the MSA segment of the ACK message. MSA-1 will contain the acknowledgment status of the message. Below are the typical values you will find in this field:
AA – Application Accept
AE – Application Error
AR – Application Reject
3. The response received is for the last HL7 message that was system sent.
The third piece of qualifying the response is verifying that the message control ID value in MSA-2 of the ACK message matches the message control ID that was in MSH-10 of the message that was originally sent.
To illustrate this point, take a look at the following HL7 message, followed by the corresponding HL7 acknowledgment message that would be returned:
HL7 Order Message:
PID|||20301||Durden^Tyler^^^Mr.||19700312|M|||88 Punchward Dr.^^Los Angeles^CA^11221^USA|||||||
Qualification 1: The ACK message is a properly formatted HL7 message.
Qualification 2: The ACK message has the value ‘AA’ in MSA-1, this means the application successfully received the message.
Qualification 3: The message control ID in MSA-2 of the ACK matches the message control ID sent in MSH-10 of the message.
When interfacing in the real world, it is important to remember that not every system will handle acknowledgments the same way. You will interface with systems that send you HL7 standard messages and do not wait for a response of any kind prior to sending the next message. In this scenario, your system will not be able to send back acknowledgment messages. This type of message delivery is never recommended.
Latest posts by Mike Stockemer (see all)
- Supporting CDA in Clinical Applications, Part 2: XML and HTML Rendering - March 8, 2011
- Supporting CDA in Clinical Applications, Part 1: Introduction - March 1, 2011
- Comparing HL7 Messages to HL7 Documents - January 25, 2008