Inoutbound mode, the message is sent to the sender and waits for the commit
acknowledgementor negative acknowledgement from the receiver. If the adapter receives a
negativeacknowledgement, the message is sent again until the congured maximum number of
retriesis made.
StandardInbound HL7 V2 Collaboration OverviewoverMLLPV2Inthe MLLP V2 sample Projects, the inbound HL7 V2 Collaboration, jcdHL7Inbound,
containsMessage Libraries (previously called OTDs) for the HL7 Resource Adapter, JMS Data,
HL7ACK, JMS Journal, and JMS Error, as well as the Generic HL7 Event. The Collaboration
workswith its own internal code and the properties conguration les.
Thefollowing topics describe the business logic dened in the jcdHL7Inbound Collaboration
forMLLP V2:
■“HL7V2 Standard Inbound Message Mode Data Flow over MLLPV2 — Part 1” on page 146
■“HL7V2 Standard Inbound Message Mode Data Flow over MLLPV2 — Part 2” on page 148
■“HL7V2 Standard Inbound Message Mode Data Flow over MLLPV2 — Part 3” on page 149
HL7V2 Standard Inbound Message Mode Data Flow over MLLPV2 —
Part 1
Oncethe message is received, the Collaboration determines whether the message needs to be
validated.The HL7 V2 message is then validated making sure that the message structure is
correct.Various elds in the MSH segment of the message are also validated, such as Version
IDand Sending Facility. If these elds do not match the conguration, a NAK is returned.
Ifsequence numbering is enabled the Collaboration checks to see if the messages sequence
numberis valid. If the sequence number is not valid, the adapter sends a NAK.
Thevalidated HL7 V2 message moves on to processInitialHandshake() and the sequence
numbersare synchronized. The sequence number within the message is checked against the
expectedsequence number. If the numbers match, the Collaboration sends an ACK, if not it
sendsa NAK. The ACK or NAK includes information from various elds of the incoming MSA
segment.The ACKs level of acknowledgement is set to A (acknowledgement is sent when the
messageis successfully received) or C (acknowledgement is sent after the message is
successfullyprocessed).
MLLPV2and the Sample Projects
SunAdapterfor TCP/IP HL7 User's Guide • Oc tober 2009146