ISApprovalsFilter.CaseID

Description

This filter property is used to load the collection of the approvals with the specified ID of the case attached.

Syntax

object.CaseID

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

Return Value

int

Example

Display the number of the approvals loaded on the basis of the selected filter, some information about them, including the cases attached.

Dim aResult
Dim aPatientID
Dim aCaseID
Dim aFilter
Dim aApproval
Dim aApprovals
Dim aMessage
Dim i

aResult = Profile.Lookup_PatientCaseSearch(aPatientId, aCaseId, _
  "Select Case for search", true)
  
if not aResult then exit sub 

set aFilter = Profile.CreateApprovalsFilter
aFilter.Patient = Profile.LoadPatient (aPatientId)
aFilter.CaseID = aCaseId 
set aApprovals = Profile.LoadApprovals(aFilter)

aMessage = "Approvals Count = " & aApprovals.Count
for i = 0 to aApprovals.Count - 1
  set aApproval = aApprovals.Item(i)
  aMessage = aMessage & vbNewLine & "The approval for " & aFilter.Patient.SurnameFirstName &_
    " was added on " & aApproval.DateTimeAdded 
  if aApproval.CaseID <> 0 then
    set aCase = Profile.OpenCase(aApproval.CaseID) 
    aMessage = aMessage & vbNewLine & "       - The case '" & aCase.CaseTitle &_
      "' was opened on " & aCase.OpenedOn & vbNewLine 
  end if      
next      

Profile.MsgBox(aMessage)
Note:

In Profile Client v8 on User Interface ID cannot be found, but Case can be found in Patient > Alter Patient > Approvals > Attachments > Case or in Financial > Approvals > Approvals > Attachments > Case.

Version information

Added in v7.8.0