This function returns the patient's encounters with attendance.
object.WithAttendance(aAttendanceID)
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISPatientEncounters interface |
|
aAttendanceID |
In, Required | int |
ID of the attendance |
Display the number of the patient's encounters with attendance, their dates and contacts.
Dim aPatient
Dim aEncounters
Dim aEncounter
Dim aAttendanceID
Dim aContact
Dim aMessage
Set aPatient = Profile.SelectPatient
if aPatient.LastActiveAttendance is nothing then
Profile.MsgBox("No active attendance")
exit sub
end if
aAttendanceID = aPatient.LastActiveAttendance.ID
set aEncounters = aPatient.Encounters.WithAttendance(aAttendanceID)
aMessage = "The number of encounters with attendance = " & aEncounters.Count
for i = 0 to aEncounters.Count - 1
set aEncounter = aEncounters.Item(i)
aMessage = aMessage & vbNewLine & aEncounter.date
if aEncounter.Contacts.Count <> 0 then
for each aContact in aEncounter.Contacts
aMessage = aMessage & vbNewLine & " -Contact Subject: " & aContact.Subject
next
end if
next
Profile.MsgBox(aMessage)
In Profile Client v8 on User Interface Encounters can be found in
.