This is one of two sets of public domain open source software to facilitate the exchange of immunization and adverse event reporting information using the Health Level 7 protocol.  This sample demonstrates using Interfaceware's Chameleon Message Parsing Engine in a JSP and web server environment.  It does not use the secure socket layer, which is to say the user id, password, and facility id fields are ignored.
The other component of this project is the Windows client program in VB, which will collect immunization and vaccine adverse event reporting information, format it as an HL7 message, and send it to the server.  Each end of the transfer relies on the visual message definition file, as Chameleon routines are used to both generate and parse the message.
The JSP's are located at http://www.dt7.com/java-server/; note the JSP page names are case-sensitive. IREX.jsp presents an HTML form in a web browser, with user id, password, and facility id fields, and a multiline text area for the HL7 test message.  The page accepts a post response, assigning values to the user, password, facility, and testMessage attributes (all but the last are ignored).  The response is forwarded to IREXResponse.jsp, which sets the ParseEngine Java Bean’s testMsg attribute to the value found in response.testMessage.  ParseEngine handles the message as a side effect of setting its value by calling the parseMessage method of the ServerEngine (based on the ServerEngine application generated by Chameleon).  Parsed data is located in tables which correspond to message segments established in the cdc.vmd visual message definition file.  A Chameleon method is used to generate an application acknowledgement, which is made available to the page by the ParseEngine's appResp attribute.  The IREXResponse JSP then returns the application response as an unadorned text string.
As a demonstration, the data is not saved.  To assist development, IREXDisplay.jsp creates a similar form, with an additional text area to display the application acknowledgement which would have been returned, along with the inbound test message as received and the parse results.
This version was built using IBM's WebSphere Application Developer version 5, which allowed me to initialize the ServerEngine when the ParseEngine bean is instantiated.  Due to what seems be a bug in Sun's Open Network Environment 1.4, Community Edition, this code is not executed, resulting in a null pointer exception thrown while attempting to parse the inbound message.  The obvious work-around is to initialize the ServerEngine in the setTestMsg method.  Having said that, I have not revisited the issue since service was released for the 1.4 CE, and don't know if it is also true of the Enterprise Edition.
This version is dated January, 2003.  The Java source code is packaged separately from the web application, in IREXSource.zip while the Java Server Pages and the cdc.vmd file can be found in IREX.war; note the cdc.vmd file must be installed in the same subdirectory as the JSP's.
Please direct questions, suggestions, and contributions to the Java and web server aspects of this project to
Return to the CDC HL7 Immunization Message Transport and Parser Project home page.