ImportVendor()

Top  Previous  Next

Object: EHL7.HL7Vendors

FileName: EHL7.dll

 

METHOD

 

Name: ImportVendor()

Parameters: strFileName (String) a fully qualified file and pathname to a file exported from an EasyHL7 installation using the ExportVendor() method or from the vendor maintenance window (see ShowVendors).

Returns: Boolean

Description: You can export a vendor from one installation of EasyHL7 into a file of type (*.ehv) and import it again into a different installation, at a customers site for instance.

 

*NOTE* A runtime or Development license is required for this method to work successfully.  It is disabled in 'DEMO' mode.

 

See Also: VendorFileManifest()

 

Example:

Private Sub VendorTest()

Dim myVendorObj As New EHL7.HL7Vendors

Dim strVendorID As String

Dim strFileName As String

Dim strVendors As String

Dim v1() As String

Dim v2() As String

Dim i As Long

myVendorObj.VendorPath = "C:\EasyHL7\"

strFileName = "C:\EasyHL7\Newvendor.ehv"

strVendors = myVendorObj.VendorFileManifest(strFileName)

If strVendors = "" Then

       MsgBox myVendorObj.LastError

      Exit Sub

End If

v1 = Split(strVendors,"|")

If myVendorObj.OpenVendor(v1(2)) Then

    'This vendor is already installed

     Exit Sub

End If

myVendorObj.ClearErrors

'this file contains a vendor named 'Labcorp', version '2.2'

If Not myVendorObj.ImportVendor(strFileName) Then

   MsgBox myVendorObj.LastError

   Exit Sub

End If

strVendorID = myVendorObj.GetVendorID(v1(0),v1(1))

End Sub