JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Java CAPS Adapter for TCP/IP HL7 Tutorial     Java CAPS Documentation
search filter icon
search icon

Document Information

TCP/IP HL7 Adapter Inbound and Outbound Tutorial

Sample Project Overview

Standard Inbound and Outbound Samples

prjHL7Inbound Project

prjHL7Outbound Project

Schematron V3 Inbound Sample

Sample Project Components

Sample Project Collaborations

Tutorial Overview

Tutorial Process

Tutorial Context

Working With the Standard Inbound and Outbound Sample Projects (V2.x)

Installing the TCP/IP HL7 Adapter and Sample Projects

Installing the TCP/IP HL7 Adapter

Installing the TCP/IP Adapter in the NetBeans IDE

Downloading the Sample Projects

Importing the Sample TCP/IP HL7 Adapter Projects

Importing the TCP/IP Adapter Sample Projects

Checking Out the Imported Projects

Creating and Configuring the Environments

Creating and Configuring the HL7 Outbound Environment

Creating Environments for the HL7 Inbound and Outbound Samples

Configuring the Connectivity Map Properties

To Configure the Connectivity Map Properties

Creating the Deployment Profile

To Create the Deployment Profile

Creating Deployment Profiles for the HL7 Inbound and Outbound Samples

Building and Deploying the Project

Starting the GlassFish Server

Building a Project

Deploying the Project

Running the Samples

To Run a Sample Project

Monitoring the HL7 Adapters

To Monitor the HL7 Adapters

Working With the Schematron HL7 V3 Sample Project

Importing the Sample Project

To Import the Sample Project

Checking Out the Project

To Check Out the Project

Modifying the Connectivity Map

To Modify the Connectivity Map

Modifying the Java Collaboration Definition

Modify the Collaboration Editor

Schematron Validation Inside the JCD

Excerpt for Beginning Schematron Validation

validateWithSchematron() method

Retrieving the Validation Results

Creating and Importing Sample Files

Sample Schematron

Sample Input Document

Importing a Schematron XML File

Creating the Environment

To Create an Environment

Building and Deploying the Sample Project

To Build and Deploy the Sample Project

Executing a Sample Project

To Execute the Sample Project

Sample Project Overview

The TCP/IP HL7 Adapter includes several sample projects that you can use as templates to create your own customized projects to enable communication between external systems. These projects are designed to be extended and modified for your specific project requirements. The TCP/IP HL7 Adapter includes the following sample projects:

Some of these projects include a predefined Environment so you do not have to create one from scratch. This tutorial concentrates on two of the sample projects: prjHL7Inbound and prjHL7Outbound. Each of these projects demonstrate multiple operations (Collaborations), and the tutorial takes you through configuring, building, and deploying the projects. Ad additional section at the end of this tutorial goes through the prjHL7V3Inbound_WithSchematron sample to illustrate how to implement schematron validation in HL7 V3.

Standard Inbound and Outbound Samples

The first section of the tutorial deals with standard inbound and outbound sample projects, which include a variety of Collaborations and Connectivity Maps for you to deploy.

prjHL7Inbound Project

The prjHL7Inbound project includes the following Connectivity Maps, both of which use the same Collaboration:

prjHL7Outbound Project

The prjHL7Outbound project includes the following Connectivity Maps:

Schematron V3 Inbound Sample

The second section of the tutorial deals with standard inbound and outbound sample projects, which include a variety of Collaborations and Connectivity Maps for you to deploy. The schematron sample illustrates how to perform schematron validations against the incoming message. Schematron validation uses the concept of finding tree patterns in the parsed document rather than the grammar, which allows representation of numerous structures that are difficult in grammar-based schema languages.

The inbound schematron project includes the following Connectivity Maps, each of which process message in different ways depending on how the Adapter is configured in the Connectivity Map and which Collaboration is in use:

Sample Project Components

The TCP/IP HL7 Adapter projects provide predefined adapter components designed to be extended and modified for your specific project requirements. Projects are created using tools in the NetBeans IDE. Use Deployment Profiles to deploy projects to specific logical hosts in specific Environments. Components developed for use in one project can be used in another, and a project can internally reference another project.

The components found in a typical project include the following:

These components are graphically represented in a project's Connectivity Map. For example, the cmHL7Outbound Connectivity Map is shown below. This Connectivity Map does not contain a Scheduler or any Topics.

image:Connectivity Map

Sample Project Collaborations

The sample projects include multiple Collaborations for you to work with. These Collaborations are designed to work as is for HL7 compliant interfaces, and can be configured for your specific needs by configuring the External System properties. If an interface requires special functionality, the Collaboration's Java code is easily accessible for modification, much of which can be created graphically (drag and drop), using the Collaboration Editor's Business Rules Designer.

The Collaborations contain a number of OTDs that extend functionality for HL7 message handling, logging, error messaging, journaling, and sequence numbering. These include both generic HL7 OTDs for HL7 ACK/NAK generation or verification, and the Resource Adapter that communicates to the external system and offers services to the application server. The Collaboration controls messaging protocol and all business logic.

The Collaborations are designed to target one unit of work at a time, meaning the resolution of one message at a time. The basic structure of the Collaborations is a state machine implemented in a Java switch statement. The state machine keeps track of the messaging protocol so that when a Collaboration is invoked, it can retrieve the state of the connection just handed to it by the RA, and then execute proper actions based on the state machine.

At the end of each action, the state is set for the next execution of the Collaboration. There are three main states:

Additional Collaborations can be added to a project to increase message flow.


Note - The TCP/IP HL7 inbound Collaboration publishes received data as a Byte message in JMS using the sendBytes() method. However, the HL7 outbound Collaboration expects a Text message from JMS. The Adapter is not designed for the HL7 outbound Collaboration to subscribe to a JMS data queue created by the HL7 inbound Collaboration directly. HL7 inbound and outbound Collaborations are designed to communicate through an HL7 Adapter TCP/IP connection.