HL7 |
Top Previous Next |
Object: EHL7.EHL7Message FileName: EHL7.dll
PROPERTY
Name: HL7 DataType: String Mode: Readonly Description: Returns the current message in HL7 format, on failure an empty string ("") is returned and IsError is set to True. (This is the functional equivalent of calling the HL7XMLToString() method)
Example: Private Sub MessageTest() Dim myVendorObj As New EHL7.HL7Vendors Dim myMsg As New EHL7.EHL7Message Dim myMsg2 As New EHL7.EHL7Message Dim strVendorID As String Dim strHL7 As String Dim oSegment As Object Dim oMSH As Object myVendorObj.VendorPath = "C:\EasyHL7" strVendorID = myVendorObj.GetVendorID("Default","2.3") If strVendorID = "" Then MsgBox myVendorObj.LastError Set myVendorObj = Nothing Exit Sub End If If Not myVendorObj.OpenVendor(strVendorID) Then MsgBox myVendorObj.LastError Set myVendorObj = Nothing Exit Sub End If With myMsg Set oMSH = .CreateMessage(myVendorObj) If .IsError Then MsgBox .LastError .ClearErrors Exit Sub End If Set oSegment = .AddSegment("EVN") If .IsError Then MsgBox .LastError .ClearErrors Exit Sub End If strHL7 = .HL7 End With With myMsg2 SetVendorObj myVendorObj If Not .CreateFromHL7(strHL7) Then MsgBox .LastError .ClearErrors Exit Sub End If MsgBox "myMsg2 is now an exact copy of myMsg" End With End Sub
See Also: The QSXML Object, HL7XMLToString()
|