|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
Rather than examine the C++ code you generated in detail, this section will focus on a conceptual overview of the generated application. The generated application's main components are as follows:
The new Engine class inherits from the HL7Engine Engine class, and overrides the msg<MessageName> method that is invoked by the parser when a message of type <MessageName> is received. The default implementation of this method simply prints each extracted data element to the screen. In a real-world application, you would put your message handling logic here. The server 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 acknowledgment 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 the socket connection object to listen for messages on a particular port. The generated project is a working application; no additional programming is required to use it. However, since messages from Acme Medical and Magic Health Systems Inc. appear on the same port, you can use the sorting engine algorithm to identify which messages came from which provider. To use the sorting engine algorithm, you must add code to your application to distinguish between the configurations specified in your VMD file. The following section describes how to do this. |