HAPI Conformance Classes Demo Application
Author: James Agnew ( jait214@yahoo.ca ), Algonquin College
Date: 27-May-2003
Introduction:
This application is a small example of the use of the Conformance Class Set Generation System combined with the HL7 API (HAPI) to generate HL7 messages. It is not intended to be a complete, fully functional, or well thought out design; it is only to illustrate the ease of programming using this system.
Requirements:
In order for the demo to succeed, the following system requirements must be met.
Installation instructions:
$ mkdir /home/james/demo
$ unzip ccsgs_demo.zip /home/james/demo
cd /home/james/demo
export CLASSPATH="$CLASSPATH:/home/james/demo"
$ java ca.uhn.hl7v2.conf.classes.generator.builders.ConfGen -v adt_a01_profile.xml build demo
This command instructs the C.C.S.G.S. to generate a set of conformance classes corresponding to the adt_a01_profile.xml file.
The "-v" flag instructs the system to display progress information as it works.
The "build" argument instructs the system to create all output in a path named ".\build\".
The "demo" argument instructs the system to create all classes in a package named "demo".
$ ant
$ export CLASSPATH="$CLASSPATH:/home/james/demo/build/dist/demo.jar"
$ cd app
$ javac DemoView.java
$ java DemoView
Using the demo:
The demo presents several text boxes. These test boxes represent the areas into which data is entered. Note that you must press enter in the text box to store the data. This signals to the application that you wish to store the data in a message.
When you have entered any data you wish to store, you may click on the "Generate Message" button to generate an HL7 message in XML format.