ISApprovalForm.StatusId

Description

The status of the opened approval form.

1 Active
2 Inactive

Syntax

object.StatusId

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 its status.

sub main

  Dim aPatientId 
  Dim aForm
  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 

  aMessage = "Agency Code: " & aForm.AgencyCode & vbNewLine &_
    "Description: " & aForm.Description & vbNewLine &_
    "Date: " & aForm.Date & vbNewLine &_
    "Comment: " & aForm.Comment & vbNewLine &_
    "Event Date: " & aForm.EventDate & vbNewLine &_
    "Reference: "  & aForm.Reference & vbNewLine &_   
    "Status: " & GetStatusDescr(aForm.StatusId)   

  Profile.MsgBox(aMessage) 
end sub         

function GetStatusDescr(aStatus)
  Dim aResult

  Select Case aStatus
    Case 1
      aResult = "Active"
    Case 2
      aResult = "Inactive"       
  End Select
  
  GetStatusDescr = aResult
end function   
Note:

In Profile Client v8 on User Interface Status can be found in Patient > Alter Patient > Approvals > Open selected approval > Status or in Financial > Approvals > Approvals > Open selected approval > Status.

Version information

Added in v7.8.0