<StationStats/>StationStats
The six headline counters: doctors, reception, specialties, queue, visits today, appointments today.
Station Mode is what Solo Mode grows into. A single admin runs the clinic, multiple doctors run their specialties, and reception routes patients through both. Same data model, more knobs.
Most of the product stays the same — same data model, same dashboards, same prescription pipeline. A handful of concepts get added, and a handful of decisions become explicit instead of implicit.
One doctor, one practice
The owner is the practitioner. No assignment needed.
Visit type is the only routing dimension.
Reception adds patients; the doctor takes them in order.
The doctor owns the clinic, the master lists, the brand.
Many doctors, one organisation
A non-clinical owner runs the station. Doctors don't manage themselves.
Cardiology, Pediatrics, Internal Med — every doctor belongs to exactly one.
Every queue item carries a specialtyId. Optionally an assignedDoctorId.
Suspension, password reset, audit logs — admin sees the whole station from one panel.
The first screen the station admin sees on every login. Six headline numbers and one queue breakdown — enough to know whether the day is on track without drilling anywhere.
Numbered annotations on the mockup.
Active doctors, reception staff, specialties, queue, completed today, appointments today. The smallest number that captures the day.
If Cardiology is 8 deep and Pediatrics is empty, you don't need a chart. The breakdown is the chart.
The dashboard is read-only. Every number links into the page where you'd act on it — Doctors, Queue, Performance.
Suspended doctors don't count. Reception sees a separate count that reflects who is actually on shift.
When the queue is empty, the breakdown card swaps to a calm 'No active queue items right now.' message — not a blank table.
<StationStats/>The six headline counters: doctors, reception, specialties, queue, visits today, appointments today.
<QueueBySpecialty/>Breakdown of waiting/in-progress queue items grouped by specialty.
<Today vs. last-week delta (missing)/>Currently absent. Worth adding: each stat with a small delta vs. same weekday last week.
Six numbers and a queue breakdown — the day is or isn't on track.
Cardiology is 8 deep. Click into Doctors or Performance.
Active doctors stat reads 5/7. Two are on leave. Confirm reception is staffed.
Most days, the dashboard is the only page admin opens.
Station admins land here by default. If you've changed the redirect to a Performance page or a custom report, you've added a click for the most-frequent action.
It's a live screen — keep it open all day. The 15s poll keeps the numbers current; closing it loses the operational context.
Improvement: every stat could be a link to the page with a relevant filter applied (e.g. 'Active doctors → /station/doctors?status=active'). Saves a second per inspection.
Specialties and doctors share one page because every doctor must belong to exactly one specialty. The flow is non-negotiable: create the specialty first, onboard the doctor second. The UI enforces it by disabling 'Add doctor' until at least one specialty exists.
Numbered annotations on the mockup.
Specialties are the smaller list (typically 3–8); doctors are larger. Visual hierarchy mirrors quantity.
Add, rename, delete from the same row. No modal for the simplest action; a tiny dialog for rename and a confirm for delete.
Reduces the most common onboarding mistake — adding a doctor before there's anywhere to put them.
Online (green dot) if last seen <90s ago; otherwise relative time. Helps admin spot who's actually on shift.
Suspending preserves the audit trail and the visit history. Deletion is for genuinely-bad-data only — wrong username, test account.
<SpecialtiesCard/>Inline CRUD for specialties — add, rename, delete.
<DoctorsTable/>Roster: doctor, specialty, status, activity, actions.
<DoctorDialog (Add/Edit)/>Single dialog for create and update — specialty, username, email, password.
<PasswordResetDialog/>Targeted password reset for a single doctor.
<Suspend / Activate toggle/>Lock a doctor out without deleting their record.
<Delete confirmation/>Hard delete with explicit warning.
Pediatrics. (Skip if it already exists.)
Pick the specialty, set username, email, initial password.
Outside the app — secure channel. The doctor signs in.
Activity column flips to 'Online' the moment they hit Dashboard.
Suspended doctors keep their visit history attached. Deleted doctors' visits live on as orphans. Suspend the moment they leave; only delete genuine bad data.
Username uniqueness is per-clinic and historical. If 'dr-ahmed' leaves and a new Dr Ahmed joins, give the new one 'dr-ahmed-2' — it preserves the audit trail.
Multi-specialty doctors are rare and complicate routing. If you genuinely need it, model it as two doctor accounts under one person.
Improvement: the initial password is admin-set, which is fine. A 'must change on next login' flag would close the credential-handover gap.
Improvement: a head-of-cardiology role with scope limited to one specialty would let larger stations delegate without giving full admin access.
Improvement: stations onboarding 20+ doctors hit a friction wall at the dialog. A CSV import (specialty, username, email) would compress the first hour.
Reception staff are scoped to the station, not to specialties. A receptionist sees every queue, every appointment, every patient. The page is a slimmer cousin of Doctors — same interaction model, fewer fields.
Annotations on the mockup.
Reception is station-wide by design. Adding a 'specialty scope' would fragment routing without solving a real problem.
Reception accounts are simpler than doctor accounts. No prescription footer, no clinical metadata.
Same green dot, same relative time. Visual consistency with the Doctors page.
Don't suspend overnight; reception accounts are session-scoped. Suspend only when someone leaves the role.
<ReceptionTable/>User · Status · Activity · Actions — same shape as DoctorsTable, minus the specialty column.
<ReceptionDialog (Add/Edit)/>Three fields: username, email, password.
No specialty pre-requisite — unlike Doctors.
e.g. 'reception-mai'. Lowercase, hyphenated convention.
Hand over via secure channel; force change on first login (improvement).
Activity column flips to Online.
Shared accounts kill audit trails. If two staff share a desk, give them two accounts and let them switch — sign-out is one click.
Reception accounts have full patient and queue access. Suspend the moment someone leaves — even mid-day — to keep the audit clean.
Improvement: a station with two physical clinics likely wants reception scoped to one location. Today they all see everything.
Station Mode adds two routing dimensions to every queue item: specialty (always required) and assigned doctor (optional). Together they're enough to support specialty-pool, doctor-pinned, and walk-in flows from the same data shape.
What each numbered region of the diagram is doing.
A queue item without a specialty is unroutable. The form blocks submission until one is picked.
Empty = 'any doctor of this specialty'. Set = pinned to a specific doctor. The same queue table holds both.
When a doctor's queue is empty, they see waiting patients in their specialty without an assigned_doctor — claim by Start.
A patient pinned to dr-ahmed never appears in dr-omar's queue, even if dr-omar is idle and Cardiology is busy.
Appointment also carries (specialtyId, assignedDoctorId). On arrival, the queue item inherits both. Continuity is free.
<SpecialtyPicker (reception)/>Required dropdown on Quick Add and the queue-add form in station mode.
<DoctorPicker (reception, station)/>Optional dropdown — appears once specialty is chosen.
<QueueFilter (reception, station)/>Filter the queue view by specialty + doctor.
<Doctor's queue claim/>Doctor's view of their queue + their specialty pool.
Required. Pediatrics for a 6-year-old.
Pin to dr-sara if the family always sees her, or leave shared.
Lands in dr-sara's queue (if pinned) or the Pediatrics shared pool (if not).
First idle Pediatrics doctor with capacity hits Start. Pinned items are claimable only by their pin.
Pinning is great for continuity (chronic patients, family doctors). Pinning by default kills load-balancing. Reception trains 'shared first' as the rule.
If Cardiology is at 8 and the other specialties are empty, you have a coverage problem — not a software problem. Hire, don't reroute.
Improvement: a 'request consult' action from a doctor's screen would let one doctor pull a colleague mid-visit. Currently a chat-and-shout flow.
Improvement: when a pinned doctor is more than 6 deep and others in their specialty are idle, surface a one-click 'release pin' for late-arriving entries.
Every routing change (pin, unpin, specialty edit) is in /station/audit-logs. Compliance asks; the answer is one query away.
Performance breaks down visits per doctor and per specialty. Drift over a month tells you whether one doctor is silently absorbing all walk-ins.
Part 4 walks the per-doctor and per-receptionist screens — how the routing model from this page actually plays out in their workflow. Part 5 is the admin layer: audit, billing, suspension.
How the doctor and reception screens shift in station mode — what stays the same, what changes, and why.
Read itEvery login, every edit, every prescription — searchable, exportable, regulator-ready.
Analytics dashboards, suspension flows, data retention — the unglamorous load-bearing layer.