ISPatientFilter.SearchStringMode

Description

This filter is used to load the collection of patients whose first names, last names, preferred names or national numbers contain the specified character string or are equal to it.

Syntax

object.SearchStringMode

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

Return Value

TSPatientSearchStringMode

Example

Display the number of the patients loaded on the basis of the selected filter, their full names and IDs.

Dim aIterator  
Dim aFilter  
Dim aCount
Dim aCanProcessItem
Dim aPatient
Dim aMessage

Set aIterator = Profile.CreatePatientIterator
set aFilter = Profile.CreatePatientFilter  
aFilter.SearchString = "S"   
aFilter.SearchStringMode = 1                        
aIterator.Open(aFilter)
aCount = aIterator.Count

aMessage = "Patients Count = " & aCount & vbNewLine & vbNewLine
 
aMessage = aMessage & "Selected Patients: " & vbNewLine
aIterator.Reset
aCanProcessItem = aIterator.Next

i = 1
do while aCanProcessItem 
  set aPatient = aIterator.Patient
  aMessage = aMessage & vbNewLine & i & ")  " &_
   aPatient.FirstName & " " & aPatient.LastName &_
   " ( " & aIterator.PatientId & " ) "
  i = i + 1
  aCanProcessItem = aIterator.Next
loop

Profile.MsgBox(aMessage)  
Note:

In Profile Client v8 on User Interface First Name can be found in Patient > Alter Patient > General > First Names field, Last Name can be found in Patient > Alter Patient > General > Last Name field, Preferred Name can be found in Patient > Alter Patient > Personal > Preferred field, National Number can be found in Patient > Alter Patient > General > NHI field (for New Zealand), Patient > Alter Patient > General > PHN field(for Canada) or in Patient > Alter Patient > General > Medicare field.

Version information

Added in v8.2.0