Skip to main content

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

  1. The app sends a new appointment request to the doctor.
  2. If no action occurs (approve, suggest, decline), the app starts a countdown.
  3. After the timeout (default: 1 hour), the appointment status becomes expired..

Manual Cancellation

  1. Open the Appointment Details screen.
  2. Select Cancel Appointment.
  3. The app displays a dialog:
    "Why do you want to cancel the appointment?"
  4. Select a reason:
    • I had an emergency.
    • I was not aware of the appointment.
    • I mistakenly approved.
    • Other (please specify).
  5. If Other is selected, the comment field activates.
  6. Select Cancel Appointment to confirm.
  7. A banner appears: "The appointment was canceled by you."

After Cancellation

  • The app updates the status to expired or canceled.
  • 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) or canceled (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

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

LevelReferenceTypeValuePlacement
1titleTitleWhy do you want to decline the request?
1reason~{enum-name}RadioI cannot treat this medical complaint
1reason~{enum-name}RadioMy schedule is full
1reason~{enum-name}RadioI'm on vacation
1dateDateUntil date
1noteExtraNote: The account will be disabled during this period.
1reason~{enum-name}RadioI cannot prescribe in patient's country
1reason~{enum-name}RadioOther (please specify)
1commentsEditReason
1cancelButtonDecline Request
1backGhostBack

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.