ISCDOTransactionInterestCopy.Delete

Description

This function deletes the interest copy of the CDO transaction.

Syntax

object.Delete

Part Attribute Type Description
object Required
The object always implements the ISCDOTransactionInterestCopy interface

Example

Delete the interest copy of the CDO transaction.

Dim aPatient
Dim aFilter 
Dim aCDOTransactions, aCDOTransaction
Dim aCDOTransIntCopies, aCDOTransIntCopy
Dim aIntCopyCopiedTo
Dim aMessage
Dim i, j

Set aPatient = Profile.SelectPatient
set aFilter = Profile.CreateCDOTransFilter
aFilter.PatientId = aPatient.Id
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 & "- The CDO transaction was created on: " &_
    aCDOTransaction.CreatedOn 
  
  set aCDOTransIntCopies = aCDOTransaction.InterestCopies
  aMessage = aMessage & vbNewLine &_  
    "Interest Copies Count = " & aCDOTransIntCopies.Count & vbNewLine   
  for j = 0 to aCDOTransIntCopies.Count - 1
    set aCDOTransIntCopy = aCDOTransIntCopies.Item(j)
    aCDOTransIntCopy.Delete
    set aIntCopyCopiedTo = aCDOTransIntCopy.CopiedTo 
    aMessage = aMessage & vbNewLine &_
      "Interest Copy to " & aIntCopyCopiedTo.FullName & "  was deleted"
  next 'j
next 'i     

Profile.MsgBox(aMessage)  
Note:

In Profile Client v8 on User Interface Interest Copies can be found and deleted in Clinical > Medical Record > Results > Open the CDO transaction > Transaction > Copies To.

Version information

Added in v8.4.20