|
For demonstration purposes all project / code examples will be using Visual Basic .Net 2005. Note that this document is intended for HL7 professionals, it is beyond the scope of this document to explain what HL7 is and how it is implemented. It is assumed that you have a basic understanding of the HL7 message structure and data requirements at least as it pertains to your particular objective. Feel free to contact customer service (US#254-549-0825) to discuss your project requirements and goals. We will be more than happy to give you our opinion (for free and worth 10x what you pay for it) of whether anything within our arsenal of HL7 tools would be beneficial and how.
Step 1. In VB.Net 2005 create a blank Windows Forms Application.
Step 2. Add a reference to the toolkit DLL (filename: UPLTK.Net2005.dll). Note that you will have to "browse" for the DLL when adding the reference.
Step 3. In your main form add 2 buttons, 1 textbox and 1 richtextbox. Also add some labels as shown below. Our objective here is to create an application which allows you to a) enter the port number you will be receiving HL7 messages on into textbox1 b) click the 'Start Receiving Messages' button to begin c) echo anything received into RichTextbox1 and d) allow you to stop receiving messages by clicking the 'Stop Receiving Messages' button.
Step 4. In the code view (declarations section) declare your Proxy object and some variables.
Step 5. Since the events raised by the Proxy object might be coming in from another thread and since we're in Windows Form we need a thread safe way to update our richtextbox.
Step 6. Add code to Button1 (the Start Receiving Messages button)
Step 7. Add code to Button2 (the Stop Receiving Messages button)
Step 8. Handle the Events raised by the Proxy Object
Step 9. Add some house cleaning code to the Form Closing event.
Your Next Step: Review the ListenerProxy object
|