MSHObject

Top  Previous  Next

Object: EHL7.EHL7Message

FileName: EHL7.dll

 

 

PROPERTY

 

Name: MSHObject

DataType: Object (Segment Object)

Mode: Readonly

Description: Returns the segment object for the MSHSegment of the current message.  If no message has been created, then is nothing and IsError is set to True.

 

 

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

   Call .CreateMessage(myVendorObj)

   If .IsError Then

     MsgBox .LastError

     Exit Sub

   End If

   Set oSegment = .MSHObject

End With

End Sub