DeleteDataTypeComponent() |
Top Previous Next |
Object: EHL7.HL7Vendors FileName: EHL7.dll
METHOD
Name: DeleteDataTypeComponent() Parameters: 1) strGUID (String) the GUID of the DataType component to delete. Returns: Boolean Description: Removes a component from an HL7 datatype.
*NOTE* Development license required to call this method successfully
See Also: HL7DataTypesXML(), HL7ComponentsXML(), DataTypeComponents()
Example: Private Sub VendorTest() Dim myVendorObj As New EHL7.HL7Vendors Dim strVendorID As String Dim i As Long Dim strXML As String Dim domNode As Object Dim ndList As Object Dim myXMLObj As New EHL7.qsXML Dim strComponentID As String
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 i = DataTypeComponents("CE") If i = 1 Then MsgBox "CE only has 1 component" Exit Sub End If strXML = HL7ComponentsXML("CE") With myXMLObj .OpenFromString strXML Set ndList = .GetRootChildren() 'MS XML Nodelists are 0 based, get the GUID of the second node strComponentID = .GetAttribute(ndList(1),"ID") End With If Not myVendorObj.DeleteDataTypeComponent(strComponentID) Then Msgbox myVendorObj.LastError Else Msgbox "Component 2 has been deleted from datatype CE" End If End Sub
|