DEV Community

anusha
anusha

Posted on

The AI Receptionist That Recovers a Missed Appointment

A missed appointment usually creates three separate tasks.

Someone has to call the patient. Someone has to find another time. Someone has to send the confirmation.

That is a small workflow until the clinic is busy, the patient asks a medical question, or the call ends before the rescheduling is complete.

I built a synthetic patient-access demo that keeps those steps together. The hospital scheduling console saves the patient's phone number when the appointment is booked. When the visit is marked missed, an AI voice agent calls the patient, confirms identity, explains the missed appointment, offers available times, writes the new booking back, sends an SMS confirmation, and hands a medication question to a nurse.

The video is here: https://youtu.be/JKiVQHmnVTM

The code is here:

https://github.com/team-telnyx/telnyx-code-examples/tree/main/patient-access-hospital-demo

The important part is not the call

It is tempting to describe this as an outbound voice demo. The call is the visible part, but the more important design choice is where the workflow state lives.

The demo has a patient record, an appointment, available slots, call events, SMS delivery states, and an escalation handoff. The voice agent reads from that state and writes back to it. The conversation is one channel into the scheduling workflow, not the workflow itself.

That makes the outcome easy to see:

  • the appointment is marked missed;
  • the agent calls the number saved on file;
  • the patient chooses a new time;
  • the calendar state changes;
  • the confirmation message references the new appointment;
  • the nurse receives the unresolved question with context.

A call that ends halfway through does not erase the scheduling record.

A hard boundary for the AI

The demo includes a deliberately ordinary medical question: can the patient take medication before the appointment?

The agent refuses to advise. It does not improvise a clinical answer, and it does not pretend a scheduling workflow is a medical service. It routes the question to the nurse line with the patient and appointment context attached.

That is the behavior I would want to preserve in a real deployment. Automate the administrative work. Make the escalation explicit. Keep clinical judgment with the care team.

What is under the hood

The sample runs on Telnyx Edge Compute and uses Telnyx voice and messaging capabilities to model the end-to-end workflow. The Edge Compute Agent Runtime is the stateful runtime boundary. Telnyx Voice API handles the programmable voice layer, and Voice AI Agents provide the conversational layer.

The local demo is mock-first, so you can run the story without placing calls or sending messages. Live mode is an explicit operator choice.

Try the flow

Clone the code example, install its dependencies, start the mock demo, open the local console, create an operator account, and book a synthetic appointment. Then choose “Mark missed & auto-call now.”

The interesting moment is the write-back. The patient does not just hear a new time; the scheduling console shows the new appointment, the SMS confirmation advances through its delivery states, and the escalation record preserves the question for the nurse.

The source repository has the complete setup instructions:

https://github.com/team-telnyx/telnyx-code-examples/tree/main/patient-access-hospital-demo

Top comments (0)