ISEncounterFilter.AttendanceID

Description

This filter property is used to load the collection of the encounters linked to the appointments with the specified ID.

Syntax

object.AttendanceID

Part Attribute Type Description
object Required
The object always implements the ISEncounterFilter interface

Return Value

int

Example

Display the number of the encounters loaded on the basis of the selected filter and some information about them.

Dim aPatient
Dim aFilter, aAppFilter 
Dim aAppointments, aAppointment
Dim aEncounters, aEncounter
Dim i, j
Dim aMessage

set aPatient = Profile.SelectPatient
set aAppFilter = Profile.CreateAppointmentFilter
aAppFilter.PatientID = aPatient.ID
set aAppointments = Profile.LoadAppointments(aAppFilter)

set aFilter = Profile.CreateEncounterFilter
aFilter.PatientId = aPatient.ID

aMessage = "The number of Appointments is " & aAppointments.Count & vbNewLine 
   
for i = 0 to aAppointments.Count - 1
  set aAppointment = aAppointments.Item(i)
  aFilter.AttendanceID = aAppointment.Id  

  set aEncounters = Profile.LoadEncounters(aFilter)

  aMessage = aMessage & vbNewLIne &_
    "The Appointment booked on " & aAppointment.BookedTime & " has " &_
    aEncounters.Count & " linked transactions " & vbNewLine   
    
  for j = 0 to aEncounters.Count - 1
    set aEncounter = aEncounters.Item(j)
 
    aMessage = aMessage & vbNewLine &_
      (j + 1) & ") The Patient Name: " &_
      Profile.LoadPatient(aEncounter.PatientId).SurnameFirstName & vbNewLine &_
      "     The Encounter Date: " & aEncounter.Date & vbNewLine &_
      "     POS Code: " & aEncounter.PosCode & vbNewLine &_
      "     POS ID: " & aEncounter.PosID & vbNewLine
  next 'j       
next 'i    
Profile.MsgBox(aMessage)
Note: In Profile Client v8 on User Interface Attendance ID cannot be found.

Attendances can be found in Clinical > Medical Record > Encounters > Open encounter > Encounter Properties > Attend field.

Version information

Added in v7.8.0