This function deletes the CDO transaction.
object.Delete
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISCDOTransaction interface |
Display the number of the CDO transactions before and after deleting.
sub main()
Dim aPatient
Dim aFilter
Dim aCDOTransactions, aCDOTransaction
Dim i
Dim aMessage
Set aPatient = Profile.SelectPatient
set aFilter = Profile.CreateCDOTransFilter
aFilter.PatientId = aPatient.Id
aFilter.TransactionTypes = 1 'tsotweEncounters
set aCDOTransactions = Profile.LoadCDOTransactions(aFilter)
aMessage = "CDO Transactions Count = " & aCDOTransactions.Count & vbNewLine
for i = 0 to aCDOTransactions.Count - 1
set aCDOTransaction = aCDOTransactions.Item(i)
aMessage = aMessage &vbNewLine & "BEFORE DELETING:" & GetCDOTransactionInfo(aCDOTransaction)
aCDOTransaction.Delete
aMessage = aMessage & vbNewLine &_
"AFTER DELETING:" & GetCDOTransactionInfo(aCDOTransaction)
next
Profile.MsgBox (aMessage)
end sub
function GetCDOTransactionInfo(aCDOTransaction)
Dim aMessage
aMessage = vbNewLine &_
"The transaction created on " & aCDOTransaction.CreatedOn &_
" is deleted: " & aCDOTransaction.IsDeleted & vbNewLine
GetCDOTransactionInfo = aMessage
end function
In Profile Client v8 on User Interface CDO transactions can be found and deleted in
.