ISPatientLookupParam.MaxCount

Description

This lookup parameter property is used to load the maximum number of the patients. The maximum number is determined by the user.

Syntax

object.MaxCount

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

Return Value

int

Example

Display the number of the patients loaded on the basis of the selected Lookup Parameter and their full names.

Dim aParam
Dim aList
Dim aPatientLookupItem 
Dim aLookupType
Dim aMessage 

Set aParam = Profile.MakePatientLookupParam 'ISPatientLookupParam
aParam.IsStartsWith = True 
aParam.Value = "s,s" 'Surname,First name
aParam.OnlyActive = 1 'spasAll
aParam.MaxCount = 10
 
aLookupType = 23 'patient lookup 
set aList = Profile.LoadLookupList2(aLookupType, aParam)  'ISPatientLookupItem collection

aMessage = "Patients Count = " & aList.Count & vbNewLine & vbNewLine  

for each aPatientLookupItem in aList 
  aMessage = aMessage & "Name: " & aPatientLookupItem.Name & vbNewLine  
next
  
Profile.MsgBox(aMessage) 
Note: This lookup parameter property cannot be used without the lookup parameter properties with the inserted values.

Version information

Added in v7.8.0