Jan 01

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 00_HL7_Example_Development_Instructions_Final_1.1.2.pdf

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 complete Note is to be found here.

The archive containing supplementary material you can use to save yourself the trouble of downloading component and, above all else, containing test files with HL7 delimited records, is here.

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“, which discusses, amongst other things, how to create a custom HL7 v2 ADT A04 XSD and a “match any” XSD.

16 Responses to “HL7 Processor Demonstration – Java CAPS 6/JBI and OpenESB”

  1. Satish Bommineni says:

    Thanks, Michael. It is very useful article.

    Satish B

  2. Kent Lee King says:

    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!


  3. Michael Czapski says:

    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.


  4. 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.

  5. Michael Czapski says:

    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.



  6. Michael Czapski says:

    Thanks for the good word. I try to please 🙂



  7. Michael Czapski says:

    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?



  8. hoot72cpd says:

    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.

  9. Michael Czapski says:


    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.



  10. […] CAPS 6, GlassFish ESB, Java Message Queue 4.1, Obtaining and using Java MQ Monitoring Metrics HL7 Processor Demonstration – Java CAPS 6/JBI and OpenESB Dec […]

  11. […] HL7 Processor Demonstration – Java CAPS 6/JBI and OpenESB Java CAPS Basics Book – Project Exports Archive Jan 08 […]

  12. Padma Karunatilake says:

    Hi Michael,
    Found the article very useful. Started fulfilling the prerequisites.
    Downloaded the .nbm files specified from this site and unzipped the zip files. But there aren’t any .nbm files in any of the unzipped directories, so couldn’t add the pludins in NetBeans.
    Any alternatives/suggestions?

    The HL7 Encoder NetBeans support is available at
    http://download.java.net/jbi/binaries/open-esb-full-install/nbm/latest/. Download from
    that location the HL7 Encoder NetBeans design-time modules to a convenient
    · com-sun-encoder-hl7.nbm
    · org-netbeans-modules-encoder-hl7-aip.nbm

    Thank you.


    • Hello, Padma.

      At http://download.java.net/jbi/binaries/open-esb-full-install/nbm/latest/ the com-sun-encoder-hl7.nbm and org-netbeans-modules-encoder-hl7-aip.nbm _are_ NMBs, not ZIP archives so there is nothing to unzip.

      Please bear in mind that the “latest” has the latest NMBs and the article you are following is pretty old – at least 1 1/2 years old. I did not go back to check to see that the solution works with the most recent components. Perhaps, if you are not set on using Java CAPS, you should look at http://blogs.czapski.id.au/?p=23 instead? Is is a more recent implementation using GlassFish ESB v2.1. nd uses a HL7 BC installer which may make it easier to deploy teh requisite components.



  13. Padma Karunatilake says:

    Thanks Michael.

  14. Padma Karunatilake says:

    Hi Michael, I have installed SoapUI plugin from the downloaded .nbm file from the prerequisites directory. (“Availble Plugins” tab is empty and grayed out)
    But the web service I have created (WSSConvertDateService) does not have the option “Create Web Service Tests” to test the service. Any idea why it’s not there?

Leave a Reply

preload preload preload