iNTERFACEWARE Products Manual > Installing and Using Chameleon > Tutorials and Exercises > HL7 to Application > Step 4 - A Sample Server Application > Application Overview |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
The generated application's main components are:
The new Engine class inherits from the Engine class discussed in Step 3. This class overrides the ParseMessage method and overrides each of the On<MessageName>Message methods. (Recall that On<MessageName> is invoked by the parser when a message of type <MessageName> is received.) Here is the code generated for the new Engine class:
In this code, the OnPatientRegisterMessage method simply prints each extracted data element to the screen. In your application, you would replace this with your message handling logic. The socket connection object listens on a specified network port. When a message is received, it instructs the Engine to parse the message. In addition, it automatically constructs an acknowledgement message (an 'ACK' message) and sends it back to the message originator. The sending of the ACK is required by the HL7 standard. For more information, see Auto ACKnowledgments. The server object directs its socket connection object to listen for messages on a particular port. After generating the code, you will have a working application; no additional programming is required. The generated application has been thoroughly documented to make its operation as clear as possible. In the remainder of this section, you will test the application using a larger message sample. |