Overview
Appointment notifications keep patients and nutritionists informed about appointment-related events throughout the appointment lifecycle.Notification Classes
AppointmentCreatedNotification
File:app/Notifications/AppointmentCreatedNotification.php
Purpose: Notifies the nutritionist when a new appointment is created.
Recipient: Nutritionist
Trigger: When a patient books a new appointment
Constructor Parameters:
- Subject: “🗓️ Nueva Cita Agendada - NutriFit”
- Greeting: “¡Hola Dr(a). !”
- Information Included:
- Patient name
- Appointment date (formatted as
d/m/Y) - Appointment time (formatted as
H:i)
- Call to Action: “Ver Detalles” →
/nutricionista/dashboard
AppointmentCreatedForPatientNotification
File:app/Notifications/AppointmentCreatedForPatientNotification.php
Purpose: Confirms appointment creation to the patient with full details.
Recipient: Patient
Trigger: When a patient successfully books an appointment
Constructor Parameters:
- Subject: ”✅ Cita Confirmada - NutriFit”
- Greeting: “¡Hola !”
- Information Included:
- Nutritionist name
- Appointment date (formatted as
d/m/Y) - Appointment time (formatted as
H:i) - Appointment type (Primera Consulta, Consulta de Seguimiento, Control)
- Call to Action: “Ver Mi Cita” →
/paciente/citas/{appointment_id} - Additional Note: Cancellation policy (24 hours advance notice)
AppointmentConfirmedForPatient
File:app/Notifications/AppointmentConfirmedForPatient.php
Purpose: Sends confirmation when appointment status changes to confirmed.
Recipient: Patient
Trigger: When nutritionist confirms a pending appointment
Constructor Parameters:
- Subject: ”✅ Cita Agendada Exitosamente - NutriFit”
- Greeting: “¡Hola !”
- Information Included:
- Nutritionist name (with “Dr(a).” prefix)
- Appointment date
- Appointment time
- Status: Pendiente
- Call to Action: “Ver Mis Citas” →
/paciente/citas - Additional Note: Cancellation policy reminder
AppointmentCancelledByNutricionista
File:app/Notifications/AppointmentCancelledByNutricionista.php
Purpose: Notifies both parties when a nutritionist cancels an appointment.
Recipients: Both nutritionist and patient (different messages)
Trigger: When nutritionist cancels an appointment
Constructor Parameters:
- Subject: “⚠️ Cita Cancelada - NutriFit”
- Greeting: “¡Hola !”
- Message: Confirmation of cancellation
- Information: Date, time, patient name
- Call to Action: “Ver mis Citas” →
/nutricionista/citas
- Subject: “⚠️ Cita Cancelada por Nutricionista - NutriFit”
- Greeting: “¡Hola !”
- Message: Notification that nutritionist cancelled
- Information: Date, time, nutritionist name
- Call to Action: “Agendar Nueva Cita” →
/paciente/dashboard - Additional Note: Apology and invitation to book new appointment
AppointmentCancelledByPatient
File:app/Notifications/AppointmentCancelledByPatient.php
Purpose: Notifies both parties when a patient cancels an appointment.
Recipients: Both patient and nutritionist (different messages)
Trigger: When patient cancels an appointment
Constructor Parameters:
- Subject: “⚠️ Cita Cancelada - NutriFit”
- Greeting: “¡Hola !”
- Message: Confirmation of cancellation
- Information: Date, time, nutritionist name
- Call to Action: “Ir a mi Dashboard” →
/paciente/dashboard
- Subject: “⚠️ Cita Cancelada por Paciente - NutriFit”
- Greeting: “¡Hola !”
- Message: Notification that patient cancelled
- Information: Date, time, patient name
- Note: Time slot is now available for other patients
- Call to Action: “Ver mis Citas” →
/nutricionista/citas
AppointmentRescheduledNotification
File:app/Notifications/AppointmentRescheduledNotification.php
Purpose: Notifies patient when appointment date/time is changed.
Recipient: Patient
Trigger: When appointment is rescheduled to a new date/time
Delivery Channels: mail, database
Constructor Parameters:
- Subject: ”🔄 Tu cita ha sido reagendada - NutriFit”
- Greeting: “¡Hola !”
- Information Included:
- Original date and time (formatted in Spanish)
- New date and time (formatted in Spanish)
- Nutritionist name
- Appointment type label
- Duration: 45 minutes
- Reschedule reason (if provided)
- Call to Action: “Ver Cita” →
/paciente/dashboard
- Uses Carbon’s
locale('es')for Spanish formatting - Format: “dddd, D [de] MMMM [de] YYYY” (e.g., “lunes, 5 de marzo de 2026”)
- Time format: “h:i A” (12-hour format with AM/PM)
AppointmentReminderNotification
File:app/Notifications/AppointmentReminderNotification.php
Purpose: Reminds users about upcoming appointments (24 hours before).
Recipients: Both patient and nutritionist
Trigger: Automated reminder 24 hours before appointment
Constructor Parameters:
- Subject: ”⏰ Recordatorio: Cita Mañana - NutriFit”
- Greeting: “¡Hola !”
- Message: Reminder about tomorrow’s appointment
- Information Included (role-based):
- For patients: Nutritionist name (with “Dr(a).” prefix)
- For nutritionists: Patient name
- Appointment date
- Appointment time
- Call to Action:
- Patients: “Ver Detalles” →
/paciente/citas - Nutritionists: “Ver Detalles” →
/nutricionista/dashboard
- Patients: “Ver Detalles” →
- Additional Note: Punctuality reminder
AttentionCompletedNotification
File:app/Notifications/AttentionCompletedNotification.php
Purpose: Notifies patient when their nutritional attention/consultation is completed.
Recipient: Patient
Trigger: When nutritionist marks attention as completed with diagnosis and recommendations
Constructor Parameters:
- Subject: ”✅ Atención Nutricional Completada - NutriFit”
- Greeting: “¡Hola !”
- Message: Confirmation that nutritional attention is complete
- Information Included:
- Nutritionist name (with “Dr(a).” prefix)
- Appointment date and time
- Recorded weight (kg)
- BMI (formatted to 2 decimals)
- Additional Information: Personalized nutrition plan with diagnosis and recommendations
- Call to Action: “Ver Reporte Completo” →
/paciente/citas/{appointment_id} - Additional Notes:
- Follow recommendations reminder
- Invitation to contact nutritionist with questions
Usage Examples
Send Appointment Created Notification
Send Cancellation Notification
Send Reschedule Notification
Send Reminder (Scheduled Job)
Best Practices
- Always send to both parties when appropriate (cancellations, reschedules)
- Include clear call-to-action buttons to relevant dashboard pages
- Format dates in Spanish using Carbon’s locale features
- Provide context about why the appointment status changed
- Include appointment details (date, time, other party’s name)
- Use emojis consistently for visual identification of notification type
- Handle missing data gracefully using null coalescing operators