ISAppointment.IsDeleted

Description

This function checks whether the selected appointment is deleted.

Syntax

object.IsDeleted()

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

Return Value

bool

Returns True if the selected appointment is deleted.

Example

Display IsDeleted for the appointment.

Dim aPatient
Dim aProvider
Dim aFilter 
Dim aAppointments
Dim aFirstAppointment
Dim aDeletedApp
Dim aDeletedAppId

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)
Profile.MsgBox("App Count = " & aAppointments.Count)
if aAppointments.Count > 0 then
  set aFirstAppointment = aAppointments.Item(0)
  aDeletedAppId = aFirstAppointment.Id
  Profile.MsgBox(aFirstAppointment.IsDeleted)   
  aFirstAppointment.SetDeleted
  aFirstAppointment.Save
end if

set aAppointments = Profile.LoadAppointments(aFilter)
Profile.MsgBox("App Count = " & aAppointments.Count)

set aDeletedApp = Profile.LoadAppointment(aDeletedAppId)

Profile.MsgBox(aDeletedApp.IsDeleted)
Note:

In Profile Client v8 on User Interface Is Deleted cannot be found.

Version information

Added in v7.8.0