Turnos por WhatsApp para centros médicosWhatsApp appointments for medical centers
Sistema de turnos con bot de WhatsApp, recordatorios que liberan el horario si el paciente no confirma y panel de administración para el centro.Appointment system with a WhatsApp bot, reminders that free up the slot if the patient doesn't confirm, and an admin panel for the clinic.
El desafío
En un centro médico cada ausencia es un horario perdido. Los pacientes llaman para pedir turno, se olvidan y no avisan, y la recepción pierde tiempo confirmando por teléfono.
La solución
Un sistema de turnos en tres piezas:
- Bot de WhatsApp: el paciente saca turno solo desde un menú (especialidad, profesional, día y horario), consulta y cancela sus turnos. Recibe un recordatorio antes del turno y, si no confirma, el turno se cancela y el horario queda libre para otro paciente. Incluye una seña con pago simulado.
- Panel de administración para el personal: turnos por día y semana, pacientes, profesionales, especialidades, horarios, ausencias, feriados, obras sociales y equipo con roles. Cuando el centro cancela o reprograma desde el panel, el paciente recibe el aviso por WhatsApp.
- Backend que es el único dueño de las reglas de turnos: el panel y el bot no recalculan nada.
Lo técnico
- API en NestJS con PostgreSQL y TypeORM, multi-clínica: toda consulta se filtra por centro y la doble reserva se bloquea en la base.
- Webhook de Twilio con verificación de firma; el bot vive dentro del backend, sin herramientas intermedias.
- Panel en Next.js con autenticación y roles por Clerk.
- Más de 200 tests unitarios y CI en GitHub Actions.
La demo usa el sandbox de WhatsApp de Twilio y datos de prueba.
The challenge
At a medical center every no-show is a lost slot. Patients call to book, forget and don’t cancel, and the front desk wastes time confirming by phone.
The solution
An appointment system in three parts:
- WhatsApp bot: patients book on their own from a menu (specialty, doctor, day and time), check and cancel their appointments. They get a reminder beforehand and, if they don’t confirm, the appointment is cancelled and the slot is freed for someone else. Includes a deposit with simulated payment.
- Admin panel for the staff: daily and weekly appointments, patients, doctors, specialties, schedules, absences, holidays, health insurers and team roles. When the clinic cancels or reschedules from the panel, the patient is notified on WhatsApp.
- Backend as the single owner of the booking rules: neither the panel nor the bot recalculates anything.
Under the hood
- Multi-clinic NestJS API with PostgreSQL and TypeORM: every query is scoped to the clinic and double bookings are blocked at the database level.
- Twilio webhook with signature verification; the bot lives inside the backend, with no middleware tools.
- Next.js panel with Clerk authentication and roles.
- 200+ unit tests and CI on GitHub Actions.
The demo runs on Twilio’s WhatsApp sandbox with test data.
Versión mobile