HL7 Processor Demonstration - Java CAPS 6/JBI and OpenESB

This Note walks the reader through development of a Java
CAPS 6/JBI-based / OpenESB-based solution that addresses a Healthcare-related
business problem. The Note elaborates on the healthcare background necessary to
get a notion of what is being done and why, and provides detailed steps
required to implement and exercise the solution to the business problem.

Updated note, where GlassFsish ESB v2.1 is used instead of Java CAPS 6, is available at http://blogs.czapski.id.au/2009/09/hl7-processor-demonstration-glassfish-esb-v2-1

We will use the HL7 Binding Component, the File Binding
Component, the JMS Binding Component, the SOAP/HTTP Binding Component, the BPEL
2.0 Service Engine, the JavaEE Service Engine, the HL7 Encoder and EJB-based
Web Services in a JBI-based solution.

In the process we will create XML Schema Documents (XSDs),
Web Services Description Language Documents (WSDLs), a BPEL 2.0 Business
Process, an EJB-based “Implementation First” web service, an EJB- and
WSDL-based “Interface First” web service, a bunch of Composite Applications,
BPLE 2.0 mapping, BPEL 2.0-based Web Service orchestration, on-the-fly
conversion of HL7 version 2.3.1 delimited messages to their XML equivalents. We
will get a pretty good exposure to what OpenESB and Java CAPS 6/JBI components
look like, how they work and how they can be used to create real business
solutions. Above all, we will develop and test a solution that is more
sophisticated then the customary “Hello World” examples but not so complex as
to take too long to build and become too hard to comprehend by a novice user.

The particular business problem and the particular solution
came about because once upon a time there was intent to build a series of
related OpenESB projects – HL7 Processor, MDM Processor and IEP Processor -
that would:

  • receive HL7 v2.x delimited messages

  • convert HL7 v2.x messages to their equivalent XML format

  • split message stream into ADT A01s, ADT A03s and other

  • convert A01s to an abbreviated Custom Patient XML format

  • convert A03s to an abbreviated Custom Discharge format

  • send Custom Patients to a JMS Queue for processing by a MDM solution

  • send Custom Discharges to a JMS Queue for processing by an IEM solution

  • have the MDM process Custom Patients into a Master Patient Index

  • have the IEP process Custom Discharges to flag excessive length of stay

The MDM Processor and the IEP Processor made it to the Sun CEC
2008 as demonstrations, with associated Tutorials by Tom Barrett, and
demonstration recordings by me. The HL7 Processor did not make it. With the
appearance of Java CAPS 6 Update 1 more JBI components made it into the
officially supported Sun product. While the HL7 BC and the HL7 Encoder did not
make it into this Update they will, eventually. Both components are already
available from the OpenESB site and can be installed into the Java CAPS 6
Update 1 installation as unsupported components. This is what we will do for
this Note.

The article with the complete note and referenced links is available at http://blogs.czapski.id.au/2009/01/hl7-processor-demonstration-java-caps-6jbi-and-openesb

For these interested in processing HL7 using GlassFish ESB v2.1 there is a blog entry, "GlassFish ESB v2.1, MySQL v5.1 - Make HL7 v2.3.1 Delimited Messages from Custom Delimited Records with HL7 Encoder and HL7 BC", at , which discusses, amongst other things, how to create a custom HL7 v2 ADT A04 XSD and a "match any" XSD.


Thanks, Michael. It is very useful article.

Satish B

Posted by Satish Bommineni on January 01, 2009 at 07:43 PM EST #

Being a long time user of Sun (SeeBeyond) products but not yet having had the opportunity to do a JCAPS v6 project, this is very nice to get a feel for the tool. I'm tempted to get a copy of the tool and try this setup as if it were the old "end to end" scenario.

Very nice!


Posted by Kent Lee King on January 02, 2009 at 04:38 PM EST #

Yago Diaz pointed out that there is an error on Page 101 of the writeup.

What is there in the table now is:

vA01In>part1>ENV>EVN.1 vMDMOut>part1>EVN>EVN_1_TRIGGER_EVENT
vA01In>part1>ENV>EVN.5>XCN.1 vMDMOut>part1>EVN>EVN_1_TRIGGER_EVENT

what should be there is:

vA01In>part1>ENV>EVN.1 vMDMOut>part1>EVN>EVN_1_TRIGGER_EVENT
vA01In>part1>ENV>EVN.5>XCN.1 vMDMOut>part1>EVN>EVN_5_1_OPERATOR_ID

Thank you Yago for picking this up. As it happens it would not matter in this solution or the downstream MDM solution, because neither uses these fields, but it is best to correct mistakes.


Posted by Michael Czapski on January 09, 2009 at 01:00 AM EST #

Hi Michael,

Excellent article and screencast. I've been building the solution in NB 6.5 and the bundled OpenESB/GF2. I'm creating notes and source code which I plan to make available for other folk using OpenESB (rather than CAPS).

I've hit a problem in the BPEL assign for the ADT\^A01 -> MDMCustomPatient. When I submit one of the ADTs you provide e.g. ADT_A0x_output1.dat, the BPEL process fails with selectionFailure when it hits the first missing element on the source side of the mapping (PID:5.3, patient middle name, in my case). As the element is optional in both the source (PID.5.CONTENT (XPN3)) and destination (MDM) schema, I'd expect the BPEL assign to ignore it.

Why does it work in your screencast? I must have missed some part of the configuration, but cannot spot it. Can you help?

Roger Searjeant.

Posted by Roger Searjeant on March 11, 2009 at 05:48 PM EST #

Hello, Roger.

Thanks for the good word.
NetBeans 6.5 is not a platform I worked with and as far as I am aware it does not have the right bits to work with the OpenESB kit so you are pretty much on your own, though I see from your post that you are dong just fine.

Select the outer process scope and look at the process properties. See IgnoreMissingFormData. Make sure it is checked. In 5.1 BPEL 1.0 behavior is to ignore this. In the BPEL 2.0 implementation you must explicitly configure the process to ignore missing data.



Posted by Michael Czapski on March 12, 2009 at 01:14 AM EST #

nice article

Posted by http://webmoneysniffer.com on April 06, 2009 at 09:33 AM EST #

Thanks for the good word. I try to please :-)



Posted by Michael Czapski on April 06, 2009 at 10:02 AM EST #

Thanks for the good word.
I must admit that I don't understand how a site that promotes footwear and clothing manufactured articles relates to HL7. How would you reprint the article?
Please elaborate on what you would like to do and how you would like to use this material on your site?



Posted by Michael Czapski on July 09, 2009 at 03:38 AM EST #

Michael, thx for this article (and the longer paper) - gave me food for a blog, cleared up a question I had. The much touted CONNECT project uses the academic HL7 v3 in its demo. I was wondering was there any v2 in Java CAPS.

Posted by hoot72cpd on September 11, 2009 at 05:42 AM EST #


I am not sure what point is being made in your blog entry.

Java CAPS 6 includes full commercial support for HL7 v2 delimited, in addition to a wealth of functionality for healthcare and non-healthcare application. It also includes HL7 v2 message libraries for v2.x. It also supports HL7 v3 as any other standard XML Schema-based formats. Support for HL7 delimited has been in the product set since day 1, back in 1990s. See http://www.sun.com/software/javaenterprisesystem/javacaps/specs.jsp for a high-level overview of what is in the product. Be very clear about the distinctions between the the Java CAPS 6 Suite, the GlassFish ESB product and the OpenESB open source project. If you don’t know the difference you will have difficulty understanding what you get for what you pay, if you oay anything at all.

My focus in the article you selectively quote was on the brand new, shiny JBI (Java Business Integration) part of Java CAPS 6. HL7 delimited support in Java CAPS 6 and previous releases is well known amongst these who use the product, and well understood by them.

JBI parts of Java CAPS 6, as well as GlassFish ESB v2.1, are the outcomes of the OpenESB project (open-esb.dev.java.net). As such, the necessary infrastructure to implement the solution I discuss in the article cam be downloaded and used for the solution, without a fee or obligation. This is not the case with the non-JBI-based commercial components, supporting HL7 v2 delimited message structures, message libraries and other components which are not open source.

I am concerned that your post can cause misunderstanding of products vs open source projects vs things I develop and write about with intent to help people work with the software.

So, the HL7 Processor is a solution I built using OpenESB for the CEC 2008 conference to demonstrate product capability is a small, selected business area. Sun does not sell this solution. Sun assists community developers, involved in open source projects, who develop software that can be used to build these kinds and many other kinds of integration and SOA solutions, whether for healthcare or not. I made this available to help people who need to develop healthcare solutions.



Posted by Michael Czapski on September 11, 2009 at 06:54 AM EST #

Post a Comment:
  • HTML Syntax: NOT allowed

In this Blog I post abstracts of articles / writeups / notes on various aspects of Java CAPS and SOA Suite including solutions, discussions and screencasts. The links to the referenced material are included in the bodies of the abstracts.


« August 2016