ISReferral.CaseParent

Description

The case the referral is linked to.

Syntax

object.CaseParent

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

Return Value

ISCase

Example

Display some information about the referral, including the name of the case the referral is linked to.

Dim aPatient
Dim aReferralsFilter
Dim aReferrals
Dim aReferral
Dim aCaseParent
Dim aCaseParentInfo
Dim aMessage

Set aPatient = Profile.SelectPatient
set aReferralsFilter = Profile.CreateReferralsFilter

aReferralsFilter.Patient = aPatient.Id

set aReferrals = Profile.LoadReferrals(aReferralsFilter)
aMessage = aMessage & "Refferals Count = " & aReferrals.Count

aMessage = aMessage & vbNewLine &_
  "Referred on:" & vbTab & "Refferred to:" & vbTab & "Case Parent:"

for i = 0 to aReferrals.Count - 1 
  set aReferral = aReferrals.Item(i)
  set aCaseParent = aReferral.CaseParent
  if aCaseParent is nothing then
    aCaseParentInfo = " - "
  else 
    aCaseParentInfo = aCaseParent.CaseTitle
  end if
        
  aMessage = aMessage & vbNewLine &_
    aReferral.ReferredOn & "   " & vbTab &_
    aReferral.ReferedToAsString & vbTab &_
    aCaseParentInfo
next 

Profile.MsgBox (aMessage)  
Note: This is different to the concept of the case initiated by the referral. For example, a referral may be linked to a case, but may not have been the source of the case itself, in which case, the case will be linked to the referral in this field, but not in the Case Init field.

In Profile Client v8 on User Interface Case Parent can be found in Patient > Patient Referrals > Case Name or Patient > Patient Referrals > Open selected Referral > General > Status > Case field.

Version information

Added in v7.8.0