ISPatientFilter.HavingCareTeamMember

Description

This filter is used to load the collection of patients who has the selected provider with the selected role in the care team.

Syntax

object.HavingCareTeamMember aProviderID, aCareTeamRoleCode

Part Attribute Type Description
object Required
The object always implements the ISPatientFilter interface
aProviderID In, Required
int
ID of the provider
aCareTeamRoleCode In, Required
string
The code of the care team role

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
aProviderID = Profile.LoadProvider("MM").ID
aCareTeamRoleCode = "UP"
set aFilter = Profile.CreatePatientFilter
aFilter.HavingCareTeamMember aProviderID, aCareTeamRoleCode
                  
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 Care Team can be found in Patient > Alter Patient > Care Team or in Clinical > Medical Record > Care Team.

Version information

Added in v7.8.0