Print Page

Tuesday, February 10, 2009

Insight into HL7 Acknowledgement and Generic Acknowledgement

Acknowledgement in HL7 with out Trigger Event and How to enable it.

Every message has a message type and a Trigger event. Message type defines the purpose of the message and the Trigger event results in creation of one or more messages.

e.g

When the patient is admitted to hospital sending a HL7 Admit Patient message (HL7 ADT:A01)
When the patient is transferred from one ward to another sending a HL7 Transfer message (HL7 ADT:A02)

ADT message is used to transmit the Patient Administration information from hospital to pharmacy. Typically this information is broadcasted from hospital to pharmacy, lab, admin section.

A01 - Admit patient only.
A02 - Transfer patient


Combination of message type and Trigger event refers to a specific message type is sent for a specific activity. A message type may be associated with more than one event.

HL7 Acknowledgement -

Recipient sent the below acknowledgement code depending on the outcome of processing business message

AA Application Accept
AE Application Error
AR Application Reject

Recipient check the message type(msh.9), version ID (msh.12) and processing ID(msh.11), if any of these are not acceptable it should send a acknowledgement message with msa.1 having value AR. For improper message format, missing required filed, it sends the value AE. For all other error recipient sends AR.

ADT Message

MSH|^~\&|ACME APP|ACME FAC|GC APP|GC FAC|20050804162010||ADT^A01|13463136|P|2.3.1|||AL|AL|US|ASCII|ENG
EVN|A01|199901061000|199901101400|01||199901061000
PID|1||191919^MCM~371-66-9256|253763|MASSIE^JAMES^A||19560129|M|||171 ZOBERLEIN^^ISHPEMINGMI^49849^""^||(900)485-5344|(900)485-5344||S|CHR|10199925^^^GENHOS^AN|371-66-9256||
NK1|1|ACK^ELLEN|SPO|171 ZOBERLEIN^^ISHPEMING^MI^ABW^""^|(900)485-5344|(900)545-1234~(900)545-1200|EC^EMERGENCY CONTACT
NK1|2|MASSIE^MARYLOU|MTH|300 ZOBERLEIN^^ISHPEMING^MI^ABW^""^|(900)485-5344|(900)545-1234~(900)545-1200|EC^EMERGENCY CONTACT
NK1|3
NK1|4|||123 INDUSTRY WAY^^ISHPEMING^MI^49849^""^||(900)545-1200|EM^EMPLOYER|19940605||PROGRAMMER|||ACME SOFTWARE COMPANY
PV1||O|||||0148^ADDISONJAMES|0148^ADDISON,JAMES|0148^ADDISON,JAMES|CAR|||||||0148^ADDISON,JAMES|S|1400|A|||||||||||||||||||GN||||||
PV2||||||||199901101400|||||||||||||||||||||||||199901101400
OBX||ST|1010.1^BODY WEIGHT||62|kg|||||F
DG1|1|19||BIOPSY||A
GT1|1||MASSIE^JAMES^""^""^""^""^||171 ZOBERLEIN^^ISHPEMINGMI^49849^""^|(900)485-5344|(900)485-5344||||SEL^SELF|371-66-925||||a|171 ZOBERLEIN^^ISHPEMING^MI^49849^""|(900)485-5344|||||||||||||||||||||||||||||||||MOOSES AUTO CLINIC
IN1|1|0|BC1|BLUE CROSS|171 ZOBERLEIN^^ISHPEMING^M1^49849^^||(900)485-5344|90||||||VXX
IN1|2|""|""

Acknowledgement
MSH|^~\&|GC APP|GC FAC|ACME APP|ACME FAC|20071016055244||ACK^A01|20071016055244131|P|2.3.1|
MSA|AA|13463136|MSG Received Successfully|


Typically Acknowledgement carries the message type and Trigger event of the original message in MSH.9.

Some of the HL7 System has a Generic Acknowledgement implementation for all trigger types i.e which does not expect only message type in msh.9 and not any trigger type.

To enable this set the following tip.properties.

oracle.tip.adapter.b2b.hl7.genericAck=true

How to configure Oracle B2B for sending and Receiving GenericAck

1. Edit the Acknowledgement ecs file in spec builder.
2. Go to MSH 9, select Event type under Trigger event and delete the same.
3. Save the ecs file and export xsd.
4. Use the above ecs while modelling the flow of Acknowledgment.

Sunday, February 8, 2009

Document vs Exchange level Acknowledgement

Acknowledgment are of two types,

1. Document Acknowledgment - Acknowledgment which is sent/consumed by the document layer and it caters more for sending validation, translation status, it can also be considered as Application acknowledgement.

e.g Functional Acknowledgment(997)/Control in EDI/HL7 protocol.

Typically Functional acknowledgment are send/received by B2B, however there is always a fallback option to send FA by the back end application only for a use case which cant be handled by B2B.

e.g To send some of the specific segment in the inbound business message as part of the outbound control/FA, for which there is no mapping in B2B Functional Acknowledgment. Back end Application need to generate the Functional acknowledgment using the internal property of the inbound business message.

How to enable Document level Acknowledgment

The flag isFunctionalAck required controls whether an FA is needed are not. Make sure to define a Document Type with the name and revision of 997/4010(any) or control/D3 with an attached Business action in the agreement.

2. Exchange Acknowledgment/MDN/Ack

Exchange level acknowledgment are called MDN in AS2 and Acknowledgment in RNIF and eBMS case. Exchange level acknowledgment signifies the status of validity of Exchange message, verify,decrypt functionality and sends a negative
acknowledgment to the initiator of the business message for any issues.

How to enable Exchange level Acknowledgment

The flag IsAcknowledgement handled by B2B enables B2B to generate and consume Exchange level Acknowledgment. However it is possible to delegate this functionality to back end application by setting this flag to OFF.