ISCDOTransaction.LinkedEncounter

Description

The encounter linked to the CDO Form transaction.

Syntax

object.LinkedEncounter()

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

Return Value

ISEncounter

Example

Display some information about the CDO Form transactions, including IDs of the encounters linked to them.

Dim aPatient
Dim aFilter 
Dim aCDOTransactions, aCDOTransaction
Dim aLinkedEncounter
Dim i
Dim aMessage

Set aPatient = Profile.SelectPatient
set aFilter = Profile.CreateCDOTransFilter
aFilter.PatientId = aPatient.Id
aFilter.TransactionTypes = 2 'tsotweForms 

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 & (i + 1) & ") " &_
    "Created on: " & aCDOTransaction.CreatedOn & vbNewLine &_
    "     Code: " & aCDOTransaction.Code & vbNewLine &_
    "     ID: " & aCDOTransaction.ID & vbNewLine &_
    "     GUID: " & aCDOTransaction.GUID & vbNewLine &_
    "     Pos Code: " & aCDOTransaction.PosCode & vbNewLine &_
    "     Privacy: " & aCDOTransaction.Privacy & vbNewLine &_ 
    "     Recorder: " & aCDOTransaction.Recorder & vbNewLine 
 
  set aLinkedEncounter = aCDOTransaction.LinkedEncounter
  if aLinkedEncounter is nothing then
    aMessage = aMessage & "     Linked Encounter: none" & vbNewLine
  else
    aMessage = aMessage & "     Linked Encounter Id: " & aLinkedEncounter.Id & vbNewLine
  end if            
next    
Profile.MsgBox(aMessage)  
Note:

In Profile Client v8 on User Interface Linked Encounter can be found in Clinical > Medical Record > Encounters > Open Encounter.

Version information

Added in v7.8.0