ISReferralsFilter.StartFromId

Added in v8.5.0

Description

This filter property is used to load the collection of referrals starting from the specified referral ID.

Syntax

object.StartFromId

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

Return Value

int

Example

Display the number of the referrals loaded on the basis of the selected filter and some information about them.

Dim aPatient
Dim aReferralsFilter
Dim aReferrals, aReferral
Dim aLastId
Dim aTotalCount
Dim i
Dim aMessage

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

aReferralsFilter.StartFromId = 0
aReferralsFilter.MaxCount = 3  'The size of batch

aLastId = 0
aTotalCount = 0  

do
  set aReferrals = Profile.LoadReferrals(aReferralsFilter)

  for i = 0 to aReferrals.Count -1
    set aReferral = aReferrals.Item (i)
    aMessage = aMessage & vbNewLine & "Referral Info:" & vbNewLine &_
      "Referral ID: " & aReferral.ID & vbNewLine &_
      "Referral Created On: " & aReferral.CreatedOn & vbNewLine &_
      "Referral Expiry Date: " & aReferral.ExpiryDate & vbNewLine &_
      "Service Description: " & aReferral.ServiceDescription & vbNewLine
    
    aTotalCount = aTotalCount + 1 
    
      if aReferral.Id > aLastId then aLastId = aReferral.Id 
  next 'i
  aReferralsFilter.StartFromId = aLastId + 1
  aMessage = aMessage & vbNewLine &_
    "----------------------------" & vbNewLine
loop until aReferrals.Count = 0

aMessage = "Referrals Count: " & aTotalCount & vbNewLine & aMessage
Profile.MsgBox(aMessage)  
Note:

In Profile Client v8 on User Interface Referrals can be found in Patient > Patient Referrals.

Version information

Obsolete in v8.5.0