Save() |
Top Previous Next |
Object: EHL7.EHL7Message FileName: EHL7.dll
METHOD
Name: Save() Parameters: strFileName (String) a fully qualified path\filename Returns: Boolean Description: This method will write the current HL7 message in HL7 format to the path/file passed in strFileName.
Programming Note: This method will append the HL7 Message to the end of strFileName if it already exists. It does not delete the file.
Example: Private Sub MessageTest() Dim myVendorObj As New EHL7.HL7Vendors Dim myMsg As New EHL7.EHL7Message Dim strVendorID As String Dim oSegment 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 oSegment = .CreateMessage(myVendorObj) If .IsError Then MsgBox .LastError .ClearErrors Exit Sub End If If Not .Save("C:\EasyHL7\sample.hl7") Then MsgBox .LastError .ClearErrors Exit Sub End If End With End Sub
|