When you click Auto-Fill, the computer looks at the week's surgical timetable, checks who is available, and assigns every doctor to every session for the week. It won't leave any working session blank, and it won't touch anything you've already filled in manually.
What counts as unavailable
The computer treats a doctor as unavailable for any session where they have:
- Annual leave, sick leave, study leave, or any other leave code
- A public holiday — and if any doctor has a public holiday marked on a given day, that entire day is skipped for everyone
Filling clinical sessions first
Clinical sessions are filled before anything else. Not all sessions are equally important — they are ranked:
- Must-fill — covered first, no exceptions
- Should-fill — covered next, treated as near-essential
- Nice-to-have — only attempted once the above two are done; may remain unfilled if there aren't enough people
When deciding who to assign, the computer:
- Only assigns a doctor to a location they are approved and trained for — there are no exceptions or workarounds to this
- Fills the hardest-to-cover sessions first (those with the fewest eligible doctors available)
- For locations that require the same doctor all day (e.g. OR2, OR3, OR4, OR5, ACHD, OR1-T, OR1-LE), it locks that doctor into both morning and afternoon at the same time — it will never split these across two different doctors
- In weeks that have OR1-T (Tuesday) and OR1-LE (Friday), it strongly tries to assign different doctors to each of those two lists
- If the first attempt can't cover everything, the computer tries shuffling existing assignments to see if a different arrangement allows the missing session to be filled
Filling the remaining empty sessions
Once all clinical sessions are covered, any doctor who still has empty sessions gets assigned a support activity. This happens in a specific order:
- Meetings (MTG) — if the surgical timetable says a meeting is required that session, one doctor is assigned to it first
- Second supervisor (S2) — assigned to a small number of eligible senior doctors who meet strict criteria
- Non-clinical day (NCD) — fills all remaining empty sessions; senior cardiac anaesthetists are processed first, then ORL anaesthetists, then everyone else
- Final sweep — any session still empty after all of the above gets an NCD to ensure no working cell is ever left blank
One important rule: NCD is never placed in a session where a clinical requirement is still unfilled — the computer won't paper over a clinical gap with a non-clinical code.
How fairness is built in
This week:
- Clinical sessions are spread as evenly as possible across the team
- Non-clinical sessions (NCD, support) are also spread evenly
- Doctors already doing a heavy clinical week are prioritised to receive at least one NCD session
Over the whole year:
- The computer looks back at all previous weeks to see who has done the more specialised sessions (OR1-T, OR1-LE, cardiac lists)
- It prefers giving those sessions to whoever has done them least recently
- Cardiac list fairness is calculated proportionally — based on how many cardiac sessions a doctor has done relative to their total clinical sessions, not just a raw count
Daily pattern preferences:
- The computer tries to avoid giving a doctor two different clinical locations in the same day — continuity is preferred
- It avoids pairing a cardiac doctor and ORL doctor in ways that don't make clinical sense on the same day
- If a doctor is doing a cardiac list, it softly prefers they were in the building the day before
- Doctors doing cardiac lists on Wednesday afternoon are preferentially given a meeting or NCD on Wednesday morning
Finding the best result
Rather than producing one roster and going with it, the computer makes 300 different versions — each valid, but with slightly different choices when multiple doctors are equally eligible. It scores every version and keeps the best one.
It then runs a further 300 "what if?" tests on the winner: it picks two doctors in the same session, imagines swapping their assignments, and checks if that would improve the overall score. If yes, the swap is kept. If no, it's undone.
The end result
Every session is filled. The most important clinical needs are covered before anything else. Specialist sessions are distributed fairly based on recent history. No doctor is left with a blank session. And anything you filled in manually is left exactly as you left it.