iNTERFACEWARE Products Manual > Installing and Using Chameleon > Sample Applications > C# Server Application > Step 5 - Writing C# Code to Parse Messages |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
To write code for your application that parses HL7 messages, you first need to know what classes are created when you use your Chameleon VMD file to generate C# stubcode for your application.
In this example, the following classes have been created:
Now that you have this information, you are ready to write the C# code for the sample application. Recall that the sample application contains:
The following C# code example implements HL7 message parsing in this sample application:
Here, the SampleCsharpServerEngine class handles message parsing and the displaying of the parsed output. It inherits the methods of the HL7Engine class that was created by Chameleon. Three of these methods are used in this application:
Here is how the application works:
And here is how OnPatientRegisterMessage accesses the message data:
Now that you have written your application code, the final step is to test the application. |