Many hospital booking flows lose patients at the same place. The patient picks a doctor, chooses a slot, types their details and reaches the OTP step. Then something quiet goes wrong: the SMS arrives late, the patient switches apps to read it, comes back to a reset page, and the slot they chose is gone. They do not file a complaint. They call another hospital.
This teardown is for hospital digital heads, web product owners and developers who run or build online booking. It looks at the three mechanisms that cause most step-three losses: hold timers, OTP verification and the mobile back button. It is a method, not a set of results. We do not publish a benchmark for abandonment at each step because it depends on the audience, device mix and doctor demand. What you get is what to log, how to read the logs and what to change.
It assumes the basics from appointment booking optimisation and the form-level fixes in accessible clinic appointment forms. Here we focus on the state machine behind the form.
Map the flow as states, not screens
Draw the booking as states with timers, not as a sequence of pages. A typical flow has these states:
- Browsing: slots visible, nothing reserved.
- Held: the patient selected a slot; the system has reserved it for a limited time.
- Details entered: patient name, phone and reason are filled.
- Verifying: an OTP has been sent to the phone; waiting for entry.
- Confirmed: the booking exists in the scheduling system.
- Expired or released: the hold lapsed or the patient abandoned.
The bug pattern is nearly always a mismatch between the timer that governs the Held state and the real time the later states take. A 5-minute hold is fine if the patient types quickly and the SMS arrives in seconds. It is a trap if a first-time patient on a slow mobile connection takes 4 minutes to fill the form and the OTP takes another 90 seconds. (These numbers are hypothetical, chosen to illustrate the arithmetic.)
Failure one: the hold timer starts at the wrong moment
Ask three questions of your current flow.
- When does the timer start? At slot selection, at form open, or at OTP request? A hold that starts at selection covers all the time the patient spends reading, typing and verifying.
- Is it visible? A hidden timer produces a surprise failure at the final step. A visible countdown produces anxiety, but also warning. If you show one, show it from the start and say what happens at zero.
- Does it extend? Extending the hold when the patient requests an OTP, or when they resend one, aligns the timer with the real task. Cap the total extension so one patient cannot hold a slot indefinitely.
A sound rule is to set the initial hold from measured completion time, not from instinct. Compute the 90th percentile of time from slot_selected to otp_verified for patients who did complete, then set the hold above that with a margin. Extend by a fixed amount on OTP request, and release the slot promptly on explicit abandonment (closing the tab cannot be detected reliably, so rely on the timer).
Also decide what an expired hold does. The worst outcome is a generic error at the end of a long form. A better one preserves the patient's typed details, shows the next free slots with the same doctor, and lets them select one without retyping.
Failure two: the OTP step
OTP verification protects against fake bookings, and it is also the point where the patient leaves your page. Four things commonly go wrong.
Delayed or missing SMS. Delivery depends on the SMS gateway and the carrier. You cannot control the carrier, but you can measure the delay: log otp_requested and otp_verified timestamps and look at the distribution, not the average. A long tail means a group of patients are sitting on a countdown they cannot beat.
Resend design. If "resend" is disabled for 60 seconds and the hold expires in 90, the patient has almost no recovery path. If resend generates a new code, the old code should either stay valid for a short overlap or fail with a clear message; otherwise a patient who types the first code that finally arrived is told it is wrong.
Switching apps. On a phone the patient may leave the browser to read the SMS. Mobile browsers can discard or reload the page in the background, and form state is lost. Where possible, let the page recover its state from the server using the booking attempt's ID.
Typing errors in the code. Use a numeric keypad (inputmode="numeric") and the HTML autocomplete="one-time-code" attribute, which lets browsers offer the code from a received SMS. MDN's page on the WebOTP API explains the further option of reading the code directly. It needs HTTPS, the last line of the SMS to be formatted as @your-domain #123456, and it has limited browser availability, so treat it as an enhancement with the autocomplete attribute as the fallback. Google's guide to SMS OTP forms walks through the same pattern.
Also consider whether OTP should come before or after the slot is held. If a patient must verify a phone before they see slots, the hold timer can start later and be shorter. The trade-off is one more step before any reward.




