In outbound mode, the message is sent to the sender and waits for the commit
acknowledgement or negative acknowledgement from the receiver. If the adapter receives a
negative acknowledgement, the message is sent again until the congured maximum number of
retries is made.
Standard Inbound HL7 V2 Collaboration Overview
over MLLPV2
In the MLLP V2 sample Projects, the inbound HL7 V2 Collaboration, jcdHL7Inbound,
contains Message Libraries (previously called OTDs) for the HL7 Resource Adapter, JMS Data,
HL7 ACK, JMS Journal, and JMS Error, as well as the Generic HL7 Event. The Collaboration
works with its own internal code and the properties conguration les.
The following topics describe the business logic dened in the jcdHL7Inbound Collaboration
for MLLP V2:
■
“HL7 V2 Standard Inbound Message Mode Data Flow over MLLPV2 — Part 1” on page 146
■
“HL7 V2 Standard Inbound Message Mode Data Flow over MLLPV2 — Part 2” on page 148
■
“HL7 V2 Standard Inbound Message Mode Data Flow over MLLPV2 — Part 3” on page 149
HL7 V2 Standard Inbound Message Mode Data Flow over MLLPV2 —
Part 1
Once the 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
ID and Sending Facility. If these elds do not match the conguration, a NAK is returned.
If sequence numbering is enabled the Collaboration checks to see if the messages sequence
number is valid. If the sequence number is not valid, the adapter sends a NAK.
The validated HL7 V2 message moves on to processInitialHandshake() and the sequence
numbers are synchronized. The sequence number within the message is checked against the
expected sequence number. If the numbers match, the Collaboration sends an ACK, if not it
sends a 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
message is successfully received) or C (acknowledgement is sent after the message is
successfully processed).
MLLPV2andthe SampleProjects
SunAdapterforTCP/IPHL7User's Guide • October2009146