# Specs for Appointment communication [TOC] ## Create appointment skip if [appointment.mode= drop-in] skip if [appointment.creator = admin|sp] ### Vacc Appointments > [color=#dd548b] skip if some consent fields required ? 1. **email**('appointment_created_confirmation') with 1 min delay (the reason being it was originally intended to be fired from frontend view that makes no backend call whatsoever) if appointment patient parameters were sent 2. **SMS** "sms.appointments.fluvacc.created_notification.#{business_flow}" with 1 minute delay 3. **SMS** sms.appointments.reminder_just_before for (appointment.begins_at - 1.day) if appointment_patient attributes were sent && (appointment.hours_until_begins > 24) 4. **SMS** sms.appointments.reminder_day_before for appointment.reminder_sms_at if appointment_patient attributes were sent && (appointment.hours_until_begins > 1) ### Others 1. **EMAIL** appointment_created_confirmation if appointment patient parameters were sent 2. **SMS** sms.appointments.created 3. **SMS** sms.appointments.reminder for appointment.reminder_sms_at ## Update appointment ### Vacc Appointments 1. **EMAIL** appointment_created_confirmation with delay of 1 minute if not send so far && if appointment_patient attributes were sent 2. **EMAIL** appointment_changed_confirmation if NO appointment_patient attributes were sent 3. **SMS** sms.appointments.changed_by_user if NO appointment_patient attributes were sent 4. **SMS** sms.appointments.reminder_just_before for (appointment.begins_at - 1.day) if appointment_patient attributes were sent && (appointment.hours_until_begins > 24) 5. **SMS** sms.appointments.reminder_day_before for appointment.reminder_sms_at if appointment_patient attributes were sent && (appointment.hours_until_begins > 1) ### Others 1. **EMAIL** appointment_created_confirmation if not send so far && if appointment_patient attributes were sent otherwise: 2. **EMAIL** appointment_changed_confirmation 3. **SMS** sms.appointments.changed_by_user > [color=#dd548b] 4. **SMS** sms.appointments.reminder (1 hour before appointment) ? Why this stunt with `appointment_created_confirmation` was even needed? Because we didn't want to send stuff in the moment app. is being created but rather at the moment, first patients are being added to the appointment. For clinic flow there's no difference really. ## Cancel appointment skip if [appointment.mode= drop-in] skip if [appointment.creator = admin|sp] 1. **SMS** sms.appointments.cancelled_by_user 2. **EMAIL** appointment_cancelled_confirmation