GetFieldType()

Top  Previous  Next

Object: EHL7.EHL7Message

FileName: EHL7.dll

 

METHOD

 

Name: GetFieldType()

Parameters:

1) Object (Segment Object)

2) nFieldNumber (Long) index of the data field in the segment (1-xxx)

       

Returns: String

Description: Returns the HL7 datatype of the field element as defined in the vendor's HL7 definition

 

See Also: HL7ElementsXML(), HL7DataTypesXML()

 

 

Example:

Private Sub MessageTest()

Dim myVendorObj As New EHL7.HL7Vendors

Dim myMsg As New EHL7.EHL7Message

Dim strVendorID As String

Dim oSegment As Object

Dim oMSH As Object

Dim i As Long

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

   MsgBox "The HL7 datatype of field 2 is: " & .GetFieldType(oSegment,2)

End With

End Sub