Skip to main content

Cancel


Use the Cancel Appointment screen to stop an appointment request.
The Doctor App presents this screen when inactivity triggers expiration or when the doctor initiates cancellation from Appointment Details.


This screen includes:

  • Automatic expiration logic based on inactivity.
  • A structured cancellation form with predefined reasons.
  • A conditional Other reason that activates a text box.
  • A confirmation banner after cancellation.
  • A read-only appointment interface after status change.

Workflow

Automatic Expiration

  1. The app opens a new appointment request.
  2. If no action occurs, the expiration timer starts.
  3. After the configured timeout, the appointment state changes to expired.

Manual Cancellation

  1. Navigate to the Appointment Details screen.
  2. Select Cancel Appointment.
  3. The app presents the question:
    Why do you want to cancel the appointment?
  4. Select one of the available reasons:
    • I had an emergency
    • I was not aware of the appointment
    • I mistakenly approved
    • Other (please specify)
  5. If Other is selected, enter a short explanation.
  6. Select Cancel Appointment to confirm.
  7. The app displays a confirmation banner and locks the appointment interface.

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

These scenarios describe how the app validates the Cancel Appointment screen and what the integrator can expect.

ScenarioApp BehaviorSDK OutputExample
The doctor selects Cancel Appointment without choosing a reason.The app disables submission and highlights the required field.Validation error for missing reason.
The doctor selects Other but enters no comment.The app disables submission and highlights the text box.Validation error for missing comment.
The cancellation action occurs after expiration logic activates.The app locks actions and displays an expired state.Page object with disabled action controls.
Inactivity triggers timeout.The app sets the appointment state to expired and presents read-only content.Update set that applies the expired state.
The cancellation workflow detects inconsistent or missing data.The app presents an error section.Error code identifying invalid data.

Actions

These scenarios describe how the app responds to actions on the Cancel Appointment screen and what the SDK returns.

ScenarioApp BehaviorSDK OutputExample
The doctor selects Cancel Appointment with a valid reason.The app applies the cancellation state and displays a confirmation banner.Update set that applies status canceled and logs the reason.
The doctor selects Other and enters a comment.The app accepts the comment and enables the confirmation button.Update set with the comment field and reason identifier.
Automatic expiration triggers.The app sets the appointment to read-only and updates the status to expired.Update set that includes state expired.
The doctor returns from the cancellation popup.The app restores the previous UI without confirming cancellation.No-op update set.
The cancellation request conflicts with an updated appointment state.The app requests a reload before accepting the action.Error such as APPOINTMENT_CHANGED.

Endpoint Resources

Cancel Appointment Screen

PUT 

/profile/appointments/{appointment-id}/cancel

Produces the cancellation popup and presents valid cancellation options.

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

Update Reason​

PATCH 

profile/appointments/{appointment-id}/cancel/change-reason

Updates the selected cancellation reason and refreshes the popup state.

Submit Cancellation

POST 

/profile/appointments/{appointment-id}/cancel

Confirms the selected reason and applies the cancellation state.


Endpoint Summary

EndpointMethodAction TypeFunction
/profile/appointments/{id}/cancelPUTPresentShow cancellation popup
/profile/appointments/{id}/cancel/change-reasonPATCHModifyUpdate selected reason
/profile/appointments/{id}/cancelPOSTApplySubmit cancellatio