ISAppointmentServices.Item

Description

Each of the services within the collection.

Syntax

object.Item(aIndex)

Part Attribute Type Description
object Required
The object always implements the ISAppointmentServices interface
aIndex In, Required
int
The index of the appointment service
Restriction: This property is readonly.

Return Value

ISAppointmentService

Example

Display each of the appointment services within the collection.

Dim aPatient
Dim aProvider
Dim aFilter 
Dim aAppointments
Dim aFirstAppointment
Dim aAppointmentServices
Dim aFirstAppService

Set aPatient = Profile.SelectPatient
set aProvider = Profile.LoadProvider("PROV")
set aFilter = Profile.CreateAppointmentFilter

aFilter.ProviderID = aProvider.Id
aFilter.PatientId = aPatient.Id
aFilter.DateFrom = #01/01/2018#
aFilter.DateTo = #01/01/2019#

set aAppointments = Profile.LoadAppointments(aFilter)

if aAppointments.Count > 0 then

  set aFirstAppointment = aAppointments.Item(0)
  set aAppointmentServices = aFirstAppointment.Services
  
  if aAppointmentServices.Count = 0 then
    Profile.MsgBox("No Services!")
  else
    set aFirstAppService = aAppointmentServices.Item(0)
    Profile.MsgBox("First Appointment Service Id = " & aFirstAppService.Id)  
  end if

end if  
Note: This is a zero based array, so the first item is at (0).

In Profile Client v8 on User Interface Services can be found in Appointment Window > Services.

Version information

Added in v8.1.0