ISReferral.Letter

Description

A referral letter (can be linked to an inward referral). A reason letter (a letter to the recipient of the outward referral.)

Syntax

object.Letter

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

Return Value

ISLetter

Example

Display the key words of the referral letter linked to the inward referral, and the key words of the reason letter to the recipient of the outward referral.

Dim aPatient
Dim aReferralsFilter
Dim aReferrals
Dim aReferral
Dim aRefLetter
Dim aLetterInfo
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 & "RefNum" & vbTab & "Letter"

for i = 0 to aReferrals.Count - 1 
  set aReferral = aReferrals.Item(i)
  set aRefLetter = aReferral.Letter
  if aRefLetter is nothing then
    aLetterInfo = " - "
  else 
    aLetterInfo = aRefLetter.KeyWords
  end if
        
  aMessage = aMessage & vbNewLine &_
    aReferral.ReferredOn & "   " & vbTab &_
    aReferral.RefNum & vbTab &_
    aLetterInfo
next 

Profile.MsgBox (aMessage)  
Note:

In Profile Client v8 on User Interface Letter can be found in Patient > Patient Referrals > Open Inward Referral > Referral Letter or Patient > Patient Referrals > Open Outward Referral > Reason Letter.

Version information

Added in v7.8.0