The TCP/IP HL7 Adapter's functionality comes from a combination of the TCP/IP HL7 Resource Adapter (RA), the predefined inbound and outbound HL7 Collaborations, and the generic HL7 Message Libraries.
The TCP/IP HL7 Resource Adapter communicates with external HL7 systems, establishes and maintains the TCP/IP socket, manages message enveloping, maintains the sequence numbering file, and provides the HL7 protocol state to the Collaboration. The RA (Resource Adapter) is configured from the Adapter Properties Editor.
The inbound and outbound HL7 Collaborations provide message validation, sequence numbering, ACK and NAK generation, and recourse actions. The predefined HL7 Collaborations are designed to implement the HL7 standard protocol and inter-operate with similar standard compliant systems by simply changing the Adapter property configuration.
If a system does not conform to the HL7 specification, the Collaborations can be modified for that transaction by changing the Java code using the Collaboration Editor. The Collaborations Java code is designed to be available and “transparent” so you can easily reference the predefined Java code to see how it currently handles HL7 transactions and make the appropriate modifications.
The Collaboration Editor allows you to create and edit Java code to modify a Collaboration for your specific needs. In many cases this code can be created graphically (drag and drop), using the Collaboration Editor’s Business Rules Designer. If you need to change the code of a prebuilt Collaboration, you should duplicate the Collaboration first and then modify it.
The Collaborations are designed to target one unit of work at a time, meaning the resolution of one message at a time. Once the current message transaction is resolved, the Collaboration is free to process the next HL7 message. The general form of the Collaborations is a state machine. Based on the state of the connection, the Collaboration performs the appropriate action. Additional Collaborations can be added to a Project to increase message flow.
The generic HL7 Message Libraries are version-agnostic structures used to send and receive HL7 messages, acknowledgements, and negative acknowledgements (NAKs). They provide the Collaboration with only the essential fields for implementing the HL7 protocol. If you need to perform functions that are specific to a version or message type, you can add the appropriate Message Library to the Collaboration.
The TCP/IP HL7 Adapter takes advantage of the Java CAPS facilities to provide journaling and error messaging, as well as monitoring, alerting, and logging. journaling and error messages are sent to JMS queues, which allow flexibility for postprocessing. For example, invalid messages and their negative acknowledgements (NAKs) are sent to a JMS queue. This JMS queue can then be set up to allow the invalid HL7 messages to be viewed, corrected, and resubmitted automatically to the same Adapter.
Error Queues
Each Collaboration automatically sends invalid messages that have incorrect data, have invalid formatting, or are deemed unacceptable to a JMS error queue. The error generated by the message and, if appropriate, its associated NAK, are written as JMS properties of that message for later processing. You can send errors to one common queue, to a specified queue for each Adapter, or to a combination of both.
Journaling Queues
When journaling is enabled, the HL7 message and its related acknowledgement (ACK) are written to a JMS journal queue. You determine the number of JMS error queues or journal queues used by a Project. From the JMS queue, these messages can be accessed and written to file, sent to a database, sent to a Web application for processing, and so forth.
Monitoring
The Enterprise Manager provides a real-time picture of the Adapter's state and status. The monitoring facilities display the following information:
Adapter up or down
Connected to external
Current sequence number
Date and time of the last transaction
Adapter properties
Alerts
Alerts are sent from the RA and the Collaborations when conditions are identified that endanger or stop the interface. You can add your own custom alert messages to the Collaborations.
Logging
Log messages are written from both the RA and the Collaborations. You can also configure your own log messages. The level is set in the Enterprise Manager. For more information on monitoring, alerting and logging, see Using Enterprise Manager Management Application in Java CAPS and Alert Codes for Java CAPS Adapters.