ISAppointment.InterventionDelete

Description

This function deletes the intervention linked to the selected appointment.

Syntax

object.InterventionDelete Value

Part Attribute Type Description
object Required
The object always implements the ISAppointment interface
Value In, Required
The intervention to delete

Example

Delete the intervention linked to the selected appointment.

Dim aPatient
Dim aProvider
Dim aFilter 
Dim aAppointments
Dim aFirstAppointment
Dim aFirstIntervention 

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)

  if aFirstAppointment.InterventionsCount > 0 then
    set aFirstIntervention = aFirstAppointment.Interventions(0)  
    Profile.MsgBox(aFirstAppointment.InterventionsCount)
    aFirstAppointment.InterventionDelete aFirstIntervention
    Profile.MsgBox(aFirstAppointment.InterventionsCount)
  else
    Profile.MsgBox("There is no Intervention")      
  end if   
  
else
  Profile.MsgBox("There is no appointment")
end if  
Note:

In Profile Client v8 on User Interface Intervention can be found and deleted in Appointment Window > Interventions.

See also

Version information

Added in v8.2.0