ISApprovalForm.CaseID

Description

ID of the linked case.

Syntax

object.CaseID

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

Return Value

int

Example

Display some information about the opened approval form, including the linked case and its ID.

Dim aPatientId 
Dim aForm
Dim aFormInfo
Dim aMessage
Dim aCase

aPatientId = Profile.SelectPatient.Id

set aForm = Profile.GetApprovalForm(0, aPatientId)

if aForm is nothing then
  Profile.MsgBox("Approval Form is not opened")
  exit sub 
end if 

aFormInfo = "Agency Code: " & aForm.AgencyCode & vbNewLine &_
  "Description: " & aForm.Description & vbNewLine &_
  "Date: " & aForm.Date & vbNewLine &_
  "Comment: " & aForm.Comment & vbNewLine &_
  "Side Code 3: " & aForm.SideCode3 & vbNewLine &_
  "Event Date: " & aForm.EventDate & vbNewLine &_
  "Reference: "  & aForm.Reference & vbNewLine   
  
if aForm.CaseID <> 0 then
  set aCase = Profile.OpenCase(aForm.CaseID) 
  aMessage = aMessage & vbNewLine & "The case '" & aCase.CaseTitle &_
    "' (ID: " & aCase.ID & ") was opened on " & aCase.OpenedOn & vbNewLine 
end if           
    
Profile.MsgBox(aFormInfo & aMessage) 
Note:

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

Version information

Added in v7.8.0