Outbound HL7 V2 Collaboration - Part 2
The Collaboration receives the HL7 ACK or NAK from the external system using
receiveHL7AckNak(). If an exception occurs due to incomplete data and the adapter fails to
read the data within the congured number of retries, the associated recourse action is taken. If
the exception is due to no response, the associated recourse action is taken. If no exception
occurs, the ACK or NAK message moves on to isAckMessage(), which validates the message to
determine whether the message is an ACK or a NAK.
Next the validateAckNak method unmarshals the message to the ACK Message Library and
validates the MSH/MSA data. It also calls other helper methods such as
checkSendingReceivingApplication() and checkSendingReceivingFacility() to validate
the ACK message.
If the message does not pass validation it is handled as a NAK, the associated recourse action is
taken, and the message is archived in the error queue.
If the message is a NAK, the associated recourse action is taken, and the message is archived in
the error queue, along with the NAK message, as a JMS property.
If the message is an ACK and passes validation, the message is sent on to the journalMessage
method
AboutTCP/IPHL7V2Collaborations
SunAdapterforTCP/IPHL7User's Guide 117