Atthe end of each action, the state is set for the next execution of the Collaboration. There are
threemain states:
ToEstablish: A new or reset connection needs to have an HL7 session established. If
sequencenumbering is used, the sequence numbers need to be negotiated.
Messaging:This is where the exchange of messages and ACKs takes place.
Shutdown:This is where any cleanup can happen before the connection is closed, or to
closethe connection.
AdditionalCollaborations can be added to a Project to increase message ow.
Note– The TCP/IP HL7 V2 inbound Collaboration publishes received data as a Byte message in
JMSusing the sendBytes() method. However, the HL7 V2 outbound Collaboration expects a
Textmessage from JMS. The adapter is not designed for the HL7 V2 outbound Collaboration to
subscribeto a JMS data queue created by the HL7 V2 inbound Collaboration directly. HL7 V2
inboundand outbound Collaborations are designed to communicate through an HL7 V2
TCP/IPadapter connection.
Inbound HL7V2 Collaboration Overview
Theinbound HL7 V2 Collaboration, jcdHL7inbound, contains Message Libraries for the HL7
ResourceAdapter, JMS Data, HL7 ACK, JMS Journal, and JMS Error, as well as the Generic
HL7Event. The Collaboration works with its own internal code and the properties
congurationles.
Thisfollowing topics describe the business logic dened in the jcdHL7Inbound Collaboration:
“InboundHL7 V2 Collaboration - Part 1” on page 109
“InboundHL7 V2 Collaboration - Part 2” on page 112
“InboundHL7 V2 Collaboration - Part 3” on page 114

InboundHL7 V2 Collaboration - Part 1

Theinbound Collaboration is triggered by an HL7 V2 message received from an external
systemor an outbound HL7 V2 client. The Collaboration calls the HL7 V2 user Collaboration
ruleby executing receive().
Thereceive method is the entry point to the HL7 V2 user Collaboration, with the following
signature:
public void
receive(com.stc.connector.appconn.tcpip.hl7.HL7ServerApplication input,
com.stc.connectors.jms.JMS otdJMS_DATA,
com.stc.SeeBeyond.OTD_Library.HL7.Generic.HL7_GENERIC_EVT.GENERIC_EVT
AboutTCP/IPHL7 V2 Collaborations
SunAdapterfor TCP/IP HL7 User's Guide 109