This function checks if the patient with the specified ID is in the collection loaded on the basis of the selected filter.
object.ExistsPatientId(aId)
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISPatientIterator interface |
|
aId |
In, Required | int |
ID of the patient to check |
bool
Display ExistsPatientId for the collection of the patients loaded on the basis of the selected filter.
Dim aIterator
Dim aFilter
Dim aCount
Dim aId
Dim aExistsPatientId
Dim aMaxID
Dim aCanProcessItem
Dim aPatient
Dim aMessage
Set aIterator = Profile.CreatePatientIterator
set aFilter = Profile.CreatePatientFilter
aFilter.Folder = "A1234"
aIterator.Open(aFilter)
aCount = aIterator.Count
aId = 8021
aExistsPatientId = aIterator.ExistsPatientId(aId)
aMaxID = aIterator.MaxID
aMessage = "Patients Count = " & aCount & "; " & "the patient with ID " & aId &_
" is in the list: " & aExistsPatientId & "; " & "max ID: " & aMaxID & 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)