VendorUnEscData() |
Top Previous Next |
Object: EHL7.HL7Vendors FileName: EHL7.dll
METHOD
Name: VendorEscData() Parameters: 1) strData (String) the data you wish to "escape". Returns: String Description: Used to safely "UnEscape" a string that was escaped with the VendorEscData() method.
Private Sub VendorTest() Dim myVendorObj As New EHL7.HL7Vendors Dim strVendorID As String Dim myEmployerName As String myVendorObj.VendorPath = "C:\EasyHL7" strVendorID = myVendorObj.GetVendorID("Default","2.3") If Not myVendorObj.OpenVendor(strVendorID) Then MsgBox myVendorObj.LastError Set myVendorObj = Nothing Exit Sub End If myEmployerName = "Dave & Buster's" 'If the vendor definition is set to the default encoding characters this string 'is not to place directly into an HL7 Field becase the '&' character is the 'SubComponentDelimiter. So first we 'Escape' it. myEmployerName = myVendorObj.VendorEscData(myEmployerName) MsgBox "Escaped Value is: " & myEmployerName myEmployerName = myVendorObj.VendorUnEscData(myEmployerName) MsgBox "And back to the Actual value: " & myEmployerName '......etc, etc. End Sub
Programming Note: The VendorEscData() and the VendorUnEscData() methods DO NOT form a complete 'escape/unescape' solution. Using Escape sequences in HL7 is a comprehensive process that (despite the fact that it's part of the standard) will still almost ALWAYS need to be negotiated between you and your HL7 trading partners. What these methods will insure is that the individual piece of data is HL7 safe within the context of the vendor definition, in that all ParsingCharacters, SegmentDelimiters, FieldSeparators and EncodingCharacters are safely and correctly 'Escaped' to make them safe to use in an HL7 message created using that vendor object.
See Also: VendorEscData(), Escape Characters In HL7
|