Visit states from draft booking to completed consultation, who moves each step, O-/W- tickets, and the automatic clean-up jobs.
Visits
A visit (appointment) is the main record that moves through the hospital. Every department works on the same visit.
Visit states
| State | Patient sees | Next allowed states |
|---|---|---|
| Draft | Draft · Unpaid | Paid, Cancelled |
| Paid | Paid · Awaiting Check-In | Checked in, Cancelled, No-show |
| Checked in | Checked In | In queue, Cancelled, No-show |
| In queue | In Queue | With doctor, Cancelled, No-show |
| With doctor | With Doctor | Completed, Cancelled |
| Completed | Completed | — (final) |
| Cancelled | Cancelled | — (final) |
| No-show | No Show | — (final) |
Pay & Check-In moves a visit from Draft through Paid and Checked in to In queue in one step. A free follow-up starts as Paid.
Who moves the visit
| Step | Who |
|---|---|
| Create draft booking | Patient (manual or AIDO), reception (walk-in) |
| Pay & Check-In | Receptionist, Org Admin |
| Pre-screening (once, after check-in) | Patient |
| Vitals and Move to Doctor | Nurse, Org Admin |
| Complete Visit | The assigned doctor |
| Cancel (draft or paid only) | Patient (before check-in) or reception (with a reason) |
Tickets
- O- for booked (online) patients and W- for walk-ins, issued at check-in.
- Lab uses LAB- tickets, radiology IMG- tickets, and the pharmacy kiosk A- tokens.
Automatic clean-up (nightly, Riyadh time)
- Unpaid drafts are cancelled at shift end (pilot 17:00) or when their slot time has passed.
- Stale visits: after the appointment day, visits still With doctor become Completed; visits still Paid, Checked in or In queue become No-show.