Sun Microsystems TCP Computer Hardware User Manual


 
The following topics describe the business logic dened in the jcdHL7Outbound Collaboration:
“Outbound HL7 V2 Collaboration - Part 1” on page 115
“Outbound HL7 V2 Collaboration - Part 2” on page 117
“Outbound HL7 V2 Collaboration - Part 3” on page 119
“HL7 V2 Outbound Test Collaboration” on page 119
Outbound HL7 V2 Collaboration - Part 1
The Collaboration is triggered by a JMS HL7 V2 message. The Collaboration then calls the HL7
User Collaboration Rule by executing the receive method. Receive is the entry point to the
HL7 User Collaboration, with the following signature,
receive (input, otdHL7eWay_1, otdJMS_JOURNAL, otdJMS_ERROR, otdHL7_ACK_1,
otdHL7_GENERIC_EVT_1)
The incoming HL7 V2 message is then validated, making sure that the message structure is
correct. Various elds of the message are also validated, such as Sending Facility, Version ID,
and MSH.
If the message does not pass validation, an error occurs and the associated recourse action is
applied. If the HL7 V2 message passes validation, the message moves on to
processInitialHandshake() to receive a sequence number (if sequences numbering is
enabled). The Collaboration takes the sequence number from the sequence numbering le and
determines the next number to use. This number is then inserted into the HL7 V2 message.
Next, the message moves on to processMessage(), which calls the helper method,
sendAndReceive(). The sendAndReceive method sends the HL7 message, waits for an HL7
ACK message, and processes the ACK or NAK. The validation also checks the message
structure to see if the message is unmarshaled. If a valid ACK is not received, it continues to
send the HL7 V2 message up to the congured number of retries, at which time an error occurs
and the associated recourse action is taken. If a valid ACK is received, the message moves on to
insertSequenceNumber().
If sequence numbering is enabled, the insertSequenceNumber method inserts the sequence
number and calls sendHL7Message(). The sendHL7Message method sends the HL7 V2 message
to the external using the HL7 adapter Message Library.
AboutTCP/IPHL7V2Collaborations
SunAdapterforTCP/IPHL7User's Guide 115