book_appointment
Books a patient appointment with a doctor, verifying availability first and queuing a reminder for 24 hours beforehand. If the slot is taken, offers nearest alternative openings.
Instructions
Book an appointment and queue a reminder for 24 hours beforehand.
Call check_availability first and offer the caller a real opening. Read the
returned confirmation back to them.
The slot must be free, inside the doctor's working hours, and aligned to their appointment grid. If it is taken, the error names the nearest alternatives — offer those rather than repeating the request.
Args: patient_id: From find_patient or register_patient. doctor_id: From list_doctors. starts_at: Clinic-local ISO 8601, e.g. '2027-01-25T18:00'. Not UTC. reason: Why they are coming, in the caller's own words.
Example: book_appointment(patient_id=1, doctor_id=1, starts_at="2027-01-25T18:00", reason="diabetes follow-up")
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reason | Yes | ||
| doctor_id | Yes | ||
| starts_at | Yes | ||
| patient_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||