This function moves the cursor to the first patient in the collection loaded on the basis of the selected filter.
object.Reset
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISPatientIterator interface |
Display the collection of the patients and their IDs loaded on the basis of the selected filter, the number of the patients and the maximum ID in the collection.
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)