Cancel Appointment

Overview

cancel_appointment cancels an existing appointment via the FHIR $cancel operation. An LLM/agent should call this tool when a patient wants to cancel a previously booked appointment. It requires the appointment_id and a cancellation_reason_code (obtained from get_cancel_reasons), and returns confirmation of whether the cancellation succeeded.

Required Parameters

appointment_id (string)

  • The appointment ID stored in the system (from get_appointments or schedule_appointment).

cancellation_reason_code (string)

  • The cancellation reason code (from get_cancel_reasons).

Optional Parameters

debug (boolean)

  • Default: false
  • Whether to display debugging information.

Returns

Returns a CancelAppointmentResult object with:

  • appointment_id (string, optional) — The cancelled appointment ID.
  • success (boolean, optional) — Whether the cancellation succeeded.
  • Also includes the shared base result fields: result, error, urls, meta, and debug (the latter two populated only when debug=true). The cancel_reasons field defined on this same model is only populated by get_cancel_reasons, not by this tool.

Notes

  • This tool is the final step of the cancellation flow: get_appointmentsget_cancel_reasonscancel_appointment.


Did this page help you?