AddHL7Table() |
Top Previous Next |
Object: EHL7.HL7Vendors FileName: EHL7.dll
METHOD
Name: AddHL7Table() Parameters: 1) strXML (String) An XML string containing information for the table you wish to add to the vendor definitions. Returns: Boolean Description: Returns True if the table is successfully added to the vendor definition and false on failure. On failure check the LastError property for the error description.
Example XML: <TABLE TABLEID="2222" TABLENAME="My Test Table" SYSUSER="User" ITEMGUID="11A580CFEDE0BC4F9573D6788FD126E5" />
*Note: XML node and attribute names are case sensitive and should be uppercase:
Example Code to do this: Private Sub VendorTest() Dim myVendorObj As New EHL7.HL7Vendors Dim strVendorID As String Dim strXML As String Dim domNode As Object Dim myXMLObj As New EHL7.qsXML myVendorObj.VendorPath = "C:\EasyHL7" 'Process the XML 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 myXMLObj strXML = "<TABLE></TABLE>" .OpenFromString strXML Set domNode = .GetRootElement() .SetAttribute domNode, "TABLEID", "2222" .SetAttribute domNode, "TABLENAME", "My Test Table" .SetAttribute domNode, "ITEMGUID", CreateGUID() 'The order of the attributes is not important .SetAttribute domNode, "SYSUSER", "User" strXML = .XML End With If Not myVendorObj.AddHL7Table(strXML) Then MsgBox myVendorObj.LastError Exit Sub End If 'Now we have added the table let's add some elements End Sub
|