ISApprovalForm.AgencyId

Description

ID of the agency.

Syntax

object.AgencyId

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 agency code and its ID.

Dim aPatientId 
Dim aForm
Dim aFormInfo
Dim aMessage

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: " & aForm.SideCode & vbNewLine &_
  "Event Date: " & aForm.EventDate & vbNewLine &_
  "Reference: "  & aForm.Reference & vbNewLine 
  
if aForm.AgencyId <> 0 then  
  aMessage = aMessage & "Agency: " &_ 
    Profile.LoadPatient(aForm.AgencyId).SurnameFirstName & " (ID: " &_
    aForm.AgencyId & ")"
end if      
  
Profile.MsgBox(aFormInfo & aMessage)
Note:

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

Version information

Added in v7.8.0