Cancel Appointment
Use the Cancel Appointment screen to stop an appointment request. The Doctor App loads this screen automatically after a period of inactivity or when the doctor manually cancels the appointment.
This screen appears in two cases:
- The app automatically cancels the appointment after a timeout.
- The doctor selects Cancel Appointment from the Appointment Details screen.

This screen includes:
- Automatic expiration logic triggered by inactivity.
- A cancellation form with predefined reasons.
- A conditional Other field that activates a comment box.
- A confirmation banner after cancellation.
- A disabled appointment interface once canceled.
Workflow
Automatic Expiration
- The app sends a new appointment request to the doctor.
- If no action occurs (approve, suggest, decline), the app starts a countdown.
- After the timeout (default: 1 hour), the appointment status becomes
expired
..
Manual Cancellation
- Open the Appointment Details screen.
- Select Cancel Appointment.
- The app displays a dialog:
"Why do you want to cancel the appointment?" - Select a reason:
- I had an emergency.
- I was not aware of the appointment.
- I mistakenly approved.
- Other (please specify).
- If Other is selected, the comment field activates.
- Select Cancel Appointment to confirm.
- A banner appears: "The appointment was canceled by you."
After Cancellation
- The app updates the status to
expired
orcanceled
. - All appointment interactions become disabled.
- A persistent badge displays the new status.
- The doctor is redirected to the Appointment Details screen.
Validations
- Applies expiration after timeout when no action is taken.
- Requires a valid cancellation reason to enable submission.
- Displays the comment field only when Other is selected.
- Blocks further actions after cancellation.
- Disables the appointment for all users after status update.
Actions
- Updates the status to
expired
(auto) orcanceled
(manual). - Sends the selected reason and optional comment to the backend.
- Displays a confirmation banner after successful cancellation.
- Disables the appointment UI.
- Shows a status badge in the appointment detail.
- Redirects the user back to Appointments or Appointment Details.
SDK and API References
- SDK Reference
- API Reference
GET
/profile/appointments/{id}/cancel
Returns the cancellation form for a pending appointment. The form includes predefined reasons, optional comments, and conditional fields (for example, vacation return date). Some reasons may trigger system-level effects such as temporary account deactivation.
UI Element Types
Level | Reference | Type | Value | Placement |
---|---|---|---|---|
1 | title | Title | Why do you want to decline the request? | — |
1 | reason~{enum-name} | Radio | I cannot treat this medical complaint | — |
1 | reason~{enum-name} | Radio | My schedule is full | — |
1 | reason~{enum-name} | Radio | I'm on vacation | — |
1 | date | Date | Until date | — |
1 | note | Extra | Note: The account will be disabled during this period. | — |
1 | reason~{enum-name} | Radio | I cannot prescribe in patient's country | — |
1 | reason~{enum-name} | Radio | Other (please specify) | — |
1 | comments | Edit | Reason | — |
1 | cancel | Button | Decline Request | — |
1 | back | Ghost | Back | — |
PATCH
/profile/appointments/{appointment-id}/cancel/change-reason
Updates the cancellation form when the user changes the selected reason. Applies the update immediately without reloading the appointment page.

POST
/profile/appointments/{appointment-id}/cancel
Cancels a scheduled appointment. Requires a valid cancellation reason and, in some cases, additional data (for example, vacation end date or supporting comment). Only the assigned doctor can submit this request.
Parameters
Name | Type | Required | Description |
---|---|---|---|
reason | Enum | Yes | Cancellation reason. Valid values: can-not-treat-complaint , schedule-is-full , doctor-on-vacation , patient-too-far-away , cannot-prescribe , doctor-had-emergency , was-not-aware-of-appointment , other |
comments | String | No | Optional comment. Required if reason = other . |
until-date | Date | Conditionally | Required if reason = doctor-on-vacation . Indicates return date. |
Errors
Code | Description |
---|---|
WRONG_DATA | The request contains invalid or inconsistent data. |
FIELDS_VALIDATION_ERROR | One or more required fields are missing or invalid. |