Appointment reminders are a common feature in scheduling systems. They can reduce missed appointments, but they also introduce privacy and reliability challenges.
A reminder system should send the right message to the right recipient at the right time without unnecessarily exposing sensitive information.
Let's explore the design using a fictional appointment application.
1. Store only the information needed
A basic appointment record might look like this:
const appointment = {
id: "APT-204",
startAt: "2026-11-02T09:30:00+11:00",
status: "confirmed",
reminderSentAt: null
};
The example deliberately excludes a patient's name, phone number, diagnosis, and treatment details. Those details should be handled only where required, with appropriate access controls.
2. Check whether a reminder is due
function isReminderDue(appointment, now, leadTimeMs) {
const appointmentTime = Date.parse(appointment.startAt);
if (!Number.isFinite(appointmentTime)) {
return false;
}
if (appointment.status !== "confirmed") {
return false;
}
if (appointment.reminderSentAt !== null) {
return false;
}
const timeUntilAppointment = appointmentTime - now;
return timeUntilAppointment > 0 &&
timeUntilAppointment <= leadTimeMs;
}
For example, a system might check whether an appointment is within a configured reminder window.
const now = Date.now();
const oneDay = 24 * 60 * 60 * 1000;
console.log(isReminderDue(appointment, now, oneDay));
The sample uses a fixed lead-time window. A real scheduler should run periodically and account for time zones, daylight-saving changes, and delivery delays.
3. Keep message content minimal
A reminder might say:
You have an appointment scheduled for 2 November at 9:30 AM. Please contact the clinic if you need to change your booking.
Avoid including diagnoses, procedures, or other sensitive details in notifications unless necessary and appropriately authorised.
Also consider whether the person has consented to the communication channel and whether shared phones or email accounts could expose the message to others.
4. Prevent duplicate reminders
A simple check in application code is not enough when multiple workers can process the same appointment simultaneously.
A more robust design uses a database transaction or atomic state change. For example, a database can mark a reminder as claimed before a worker attempts delivery.
The process should account for:
- Two workers processing the same appointment.
- Failed message delivery.
- Appointment cancellation or rescheduling.
- Retry limits and backoff.
- Logging without exposing sensitive details.
An idempotency key can help the delivery provider recognise repeated requests, but it does not replace database-level coordination.
5. Protect the system
A production reminder service should use authentication, least-privilege access, encrypted transport, controlled secrets, and suitable retention policies.
It should also record enough operational information to troubleshoot delivery failures without storing unnecessary patient information in application logs.
Requirements depend on the jurisdiction and the system's role. A real healthcare application needs a proper privacy and security review before deployment.
Conclusion
Appointment reminders appear simple, but reliable implementation requires careful scheduling, duplicate prevention, access control, and privacy-aware message design.
These principles also apply to booking platforms, service appointments, consultations, and other systems that communicate with people about scheduled events.
Top comments (0)