book_appointment
Book an available medical appointment slot for a patient. Validates slot availability using patient MRN and booking string, then returns the new appointment ID.
Instructions
Book an available slot for a specific patient.
patient_id is mandatory so a booking can never land on the wrong person's record. The
portal validates the slot at booking time (read-before-write); if the slot is gone you get
a clear error and nothing is booked. Returns the new appointment id on success.
Note: reporting_id defaults to empty. It's unverified whether the API requires it (the
captured bookings carried one from the out-of-scope triage flow); if booking fails citing
it, that's the likely cause.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| patient_id | Yes | MRN of the patient to book for. REQUIRED — never guessed. | |
| reporting_id | No | Reporting/correlation token. Whether the portal requires it is unverified (see NOTES.md); the in-scope search flow has no source for one, so leave empty unless you captured a value. | |
| booking_string | Yes | The `booking_string` of the slot to book (from search_slots). |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| booked | Yes | ||
| clinic | No | ||
| doctor | No | ||
| message | No | ||
| slot_date | No | ||
| appointment_id | No |