ISReferral.CaseInit

Description

The case that was initiated by this referral, if applicable.

Syntax

object.CaseInit

Part Attribute Type Description
object Required
The object always implements the ISReferral interface
Restriction: This property is readonly.

Return Value

ISCase

Example

Display some information about the referral, including the name of the case that was initiated by this referral.

Dim aPatient
Dim aReferralsFilter
Dim aReferrals
Dim aReferral
Dim aCaseInit
Dim aCaseInfo
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 Init:"

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

Profile.MsgBox (aMessage)  
Note: A case can be linked to multiple referrals, but it can only be initiated by one referral.

In Profile Client v8 on User Interface Case Init can be found in Patient > Patient Referrals > Open selected Referral > General > Initiation > Case Init field.

Version information

Added in v7.8.0