This function links an intervention to the selected appointment.
object.InterventionAdd
Value
Part | Attribute | Type | Description |
---|---|---|---|
object |
Required | The object always implements the
ISAppointment interface |
|
Value |
In, Required | The intervention to link to the
appointment |
Link the intervention to the selected appointment.
Dim aPatient
Dim aProvider
Dim aFilter
Dim aAppointments
Dim aFirstAppointment
Dim aRecallVisits, aRecallVisit
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 aRecallVisits = aPatient.LoadRecallVisits(False)
if aRecallVisits.Count > 0 then
set aRecallVisit = aRecallVisits.Item(0)
else
Profile.MsgBox("Patient has no recall visit")
exit sub
end if
set aAppointments = Profile.LoadAppointments(aFilter)
if aAppointments.Count > 0 then
set aFirstAppointment = aAppointments.Item(0)
aFirstAppointment.InterventionAdd(aRecallVisit)
Profile.MsgBox(aFirstAppointment.InterventionsCount)
else
Profile.MsgBox("The patient has no appointment with the provider within the selected date range")
end if
In Profile Client v8 on User Interface Additional Intervention can be found in
.