This function adds secondary criteria when searching free appointment slots to book.
object.AddSecondaryAppointment()
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISAppointment interface |
Display the number, the reason description and the date of the appointment found by secondary search criteria.
Dim aPatient
Dim aProvider
Dim aFilter
Dim aAppointments
Dim aFirstAppointment
Dim aSecondaryAppointment
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 aSecAppointmnent = aFirstAppointment.AddSecondaryAppointment
aSecAppointmnent.ReasonDescription = "Headache"
aSecAppointmnent.BookTime = #01/01/2019#
aSecAppointmnent.Save
set aSecondaryAppointments = aFirstAppointment.SecondaryAppointments
aMessage = "Appointments Count = " & aSecondaryAppointments.Count
for i = 0 to aSecondaryAppointments.Count - 1
set aSecondaryAppointment = aFirstAppointment.SecondaryAppointments.Item(i)
aMessage = aMessage & vbNewLine &_
aSecondaryAppointment.ReasonDescription & " " &_
aSecondaryAppointment.BookTime
next
Profile.MsgBox(aMessage)
else
Profile.MsgBox("aAppointments.Count = 0")
end if
In Profile Client v8 on User Interface Secondary Criteria can be found and added in
.