ISCasePayer.GuarantorId

Description

ID of the guarantor.

Syntax

object.GuarantorId

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

Return Value

int

Example

Display the number of the cases, their titles, opening dates and some information about the payers, including the full names of the guarantors.

Dim aPatient 
Dim aFilter
Dim aCases, aCase
Dim aCasePayer
Dim i
Dim aMessage
  
Set aPatient = Profile.SelectPatient
set aFilter = Profile.CreateCasesFilter
aFilter.Patient = aPatient
set aCases = Profile.LoadCases(aFilter)

aMessage = "The number of the cases for " & aPatient.SurnameFirstName &_ 
  " = " & aCases.Count 
  
for i = 0 to aCases.Count -1
  set aCase = aCases.Item(i)
  aMessage = aMessage & vbNewLine & (i + 1) & ") " & aCase.CaseTitle &_ 
    " was opened on " & aCase.OpenedOn & vbNewLine 
  
  set aCasePayer = aCase.CasePayer
  if not aCasePayer is nothing then 
    aMessage = aMessage &_
      "  BPay Detail: " & aCasePayer.BPayDetail & vbNewLine &_
      "  Allow Reconcile: " & aCasePayer.AllowReconcile & vbNewLine &_
      "  BPay Reference: " & aCasePayer.BPayReference & vbNewLine &_
      "  Occupation Description: " & aCasePayer.OccupationDescription & vbNewLine &_
      "  Payment Detail 2: " & aCasePayer.PaymentDetail2 & vbNewLine &_
      "  Payment Detail 3: " & aCasePayer.PaymentDetail3 & vbNewLine &_
      "  Guarantor: " & Profile.LoadPatient(aCasePayer.GuarantorId).SurnameFirstName & vbNewLine &_
      "  Work Name: " & aCasePayer.WorkName & vbNewLine &_
      "  Work City: " & aCasePayer.WorkCity & vbNewLine &_
      "  Work Code: " & aCasePayer.WorkCode & vbNewLine &_
      "  Work Country: " & aCasePayer.WorkCountry & vbNewLine &_
      "  Work Phone: " & aCasePayer.WorkPhone & vbNewLine &_
      "  Work Street: " & aCasePayer.WorkStreet & vbNewLine &_                                                        
      "  Work Suburb: " & aCasePayer.WorkSuburb & vbNewLine
    if aCasePayer.PayerId > 0 then  
      aMessage = aMessage &_
        "  Payer name: " &_
        Profile.LoadPatient(aCasePayer.PayerId).SurnameFirstName & vbNewLine 
    end if        
  else
    aMessage = aMessage &_
      "  Case payer: Unassigned" & vbNewLine        
  end if
next 'i      

Profile.MsgBox(aMessage)  
Note:

In Profile Client v8 on User Interface Guarantor ID cannot be found, but Guarantor can be found in Organisation > Work Centre > Work > Cases > Edit Case > Administrative > Financial > Guarantor.

Version information

Added in v7.8.0