ListVendors()

Top  Previous  Next

Object: EHL7.HL7Vendors

FileName: EHL7.dll

 

METHOD

 

Name: ListVendors()

Parameters: None

Returns: String

Description: Returns a delimited string with information for all of the vendors in an installation.  Essentially a non-XML version of the VendorsXML() method.  Will return an empty string ("") if the vendor path does not point to a valid installation folder.

 

Programming Note: The return value of this method will be a string delimited with a line feed (vbLF or Asc(10) or Hex(0A)).  Parsing that string will produce an array of strings each delimited with a "|" character containing 2 elements.  The first element is the the VendorName and VendorVersion concatenated (Ex: "Default (Version 2.3)"), the second element will be the GUID VendorID of the vendor.

 

Example:

Private Sub VendorTest()

Dim myVendorObj As New EHL7.HL7Vendors

Dim strVendorID As String

Dim strVendors As String

Dim v1() As String

Dim v2() As String

Dim i As Long

myVendorObj.VendorPath = "C:\EasyHL7"

strVendors = myVendorObj.ListVendors()

v1 = Split(strVendors,vbLF)

For i = 0 To UBound(v1)

   v2 = Split(v1(i),"|")

   Msgbox "Vendor: " & v2(0) & " has a GUID of: " & v2(1)

Next

End Sub

 

 

 

Example XML String:

 

<VENDORS COUNT="3">

<VENDOR ID="63578DEA-9541-4663-B484-111919054FBC" NAME="Default"

DESCRIPTION="EasyHL7 default vendor for version 2.3" VERSION="2.3" FIELDSEPARATOR="|"

ENCODINGCHARS="^~\&" />

<VENDOR ID="10D80A28-6A2C-4AD3-8080-32924F02F0CE" NAME="Default"

DESCRIPTION="" VERSION="2.4" FIELDSEPARATOR="|" ENCODINGCHARS="^~\&" />

<VENDOR ID="5ABE45FC963631449F077FA15F28E69B" NAME="Labcorp"

DESCRIPTION="Labcorp vendor created by me" VERSION="2.3" FIELDSEPARATOR="|" ENCODINGCHARS="^~\&" />

</VENDORS>

 

*Notes: The ID attribute is the GUID assigned to the vendor, this ID number is used frequently throughout the system.  In the EasyHL7.exe program, this method is used to populate dropdown listboxes for the user to select which vendor definition to use.