ISProfilePatientGroup.ContainsPatient

Description

This function checks whether the selected patient is in the group.

Syntax

object.ContainsPatient(aPatient)

Part Attribute Type Description
object Required
The object always implements the ISProfilePatientGroup interface
aPatient In, Required
The patient who is/is not in the group

Return Value

bool

Returns True if the selected patient is in the group.

Example

Display the number of the patient groups loaded on the basis of the selected filter and their names. Check whether the selected patient is in the group.

Dim aFilter
Dim aPatientGroups
Dim aPatientGroup
Dim aMessage

Set aPatient = Profile.SelectPatient
set aFilter = Profile.CreateProfilePatientGroupFilter
aFilter.PatientGroupType = 3 ' spgtAll 
set aPatientGroups = Profile.LoadProfilePatientGroupsByFilter(aFilter)

aMessage = "Patient Groups Count = " & aPatientGroups.Count & vbNewLine 
  
for i = 0 to aPatientGroups.Count - 1
  set aPatientGroup = aPatientGroups.Item(i) 
  aMessage = aMessage & vbNewLine & (i + 1) & ") " & aPatientGroup.Name &_
    ", the patient " & aPatient.SurnameFirstName &_ 
    " is in the group: " & aPatientGroup.ContainsPatient(aPatient)                                
next      

Profile.MsgBox(aMessage)  
Note:

In Profile Client v8 on User Interface Contains Patient can be found in Organisation > Work Centre > Clinical > Groups > Patients in Group.

See also

Version information

Added in v7.8.0