PrintPreviewMessage() |
Top Previous Next |
Object: EHL7Interface.eUtilities FileName: EHL7Interface.dll
Method
Name: PrintPreviewMessage() Parameters: 1. strMessageData (string) A single entire HL7 message 2. enXMLorHL7 (optional enumerator default eOpenHL7String) one of the following:
3. sVendorID (optional string) the GUID vendor id, if not set using VendorID property 4. sVendorPath (optional string) the full path to the vendor definition files, if not set using VendorPath property Returns: N/A Description: Shows the built-in EasyHL7 HL7 Reports with the added option of printing an HL7 message. If you have previously set the VendorID or VendorPath properties it is not necessary to provide them as parameter(s).
**NOTE: Passing an empty string "" in the strMessageData parameter is the functional equivalent of calling the ShowReports() method. Calling this method from code is also the functional equivalent of clicking 'File' then 'Print Selected' in the File Manager window.
Example1:
For the purposes of the example code, strHL7Message will contain the following String data: MSH|^~\&|MEDIC|MEDIC|SAMPLE|SAMPLE|20030910113004+0000^S|NO SECURITY|ADT^A05|MISYS000000002|T|2.3|000000000000002||AL|||| EVN|A05|20030910113004+0000^S||00802|00002| PID||123456789|0118021|123456789|POWELL^COLIN^B||19550325|M|||3412 PENTAGON ST^^FORT WORTH^TX^76117-0000||(817)555-1212|||00002||987654321|987654321||||||||||| PV1||P|^^^00002|R||00041|08109^WOODS^BENNY^L|0005511^TOLKIEN^JOHN^R||MS|||||||||000376487|00005|||||||||||||||||||||||||||||||| PV2||||||||20030814113000||||MS GT1|0001||POWELL^COLIN^B||3412 PENTAGON^^FORT WORTH^TX^76117-3517|(817)555-1212||||||||||||||| IN1|0001|0000002|0000101|SECURE HORIZONS13378|2821 LACKLAND ROAD^SUITE 214^FORT WORTH^TX^76116-0000||(800)309-9675| ||||20011101|||P|POWELL^COLIN^ |00001|19210325|3412 PENTAGON^^FORT WORTH^TX^76117-0000|Y|Y|||||| |||||||||555121211|||||||M|^^^^||| IN2||987654321|0000698^RETIRED||I||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Private Sub ShowMessage(strHL7Message As String, strVendorID As String) 'Opens a message in a print preview state in the reports window' 'This is the same as clicking 'Print Selected' from the 'File' menu in the EasyHL7 File Manager Dim myInterfaceObj As New EHL7Interface.eUtilities myInterfaceObj.ClearErrors myInterFace.VendorID = strVendorID myInterfaceObj.PrintPreviewMessage strHL7Message, eOpenHL7String Set myInterfaceObj = Nothing Exit Sub Set myInterfaceObj = Nothing End Sub
Screenshot
When calling the PrintPreviewMessage() method the HL7 data passed in the strMessageData parameter is parsed and displayed in the regular EasyHL7 Definition Reports window. You can print the entire message or just individual segments. It also gives you the ability to select varying levels of detail for the report including our unique 'Data Only' view. Clicking a 'Data Only' view will show you only those fields within each segment that actually contain data of some kind. HL7 message data is displayed in blue to allow you to easily pick it out.
|