Client work · Case study
Scheduling a trauma department, made calm.
A Level 1 trauma department in the Northeastern US was running a demanding, rule-heavy call schedule on spreadsheets, texts and memory. We built them their own scheduling software: a main screen for the person who builds the month, and a calm, phone-first portal for the attendings (the department’s senior doctors) who live by it. It's fitted to how the department actually works: its rules, its handovers, its people.
Act 1 of 3
Build the month.
For the person who builds the schedule: a fair draft in one click, every rule checked, everyone's share in the open and every holiday covered.
OPERATOR
The whole department, one glance.
Month status, the decisions waiting on you and a week of coverage, all on one calm screen.
OPERATOR
A fair month, drafted for you.
Hit Generate and get a complete, rule-checked schedule with a balance score you can defend.
The math behind Generate ↓OPERATOR
Your rules, enforced automatically.
Hard limits, preferences, pairings and weekend caps are written once and checked on every draft. Each one is a line of math underneath.
See a rule become an equation ↓ATTENDING
Fair, and you can see it.
Your share of weekends, calls and holidays, next to the group. The same share the solver aims every attending at.
ATTENDING
Holidays, handled.
You're off. Coverage is handled. Every holiday of the year and who's covering it, with yours highlighted so there's never any doubt.
Act 2 of 3
When it breaks.
People get sick, ask for time off and swap. Each break is handled in a few taps, and nothing changes quietly.
ATTENDING
Just say it.
Type "I'm off the week of Thanksgiving", see the dates it understood, then send. Only the dates are shared.
OPERATOR
See the hole before you approve it.
Every time-off request shows exactly which shifts it would leave open, and who can cover them.
ATTENDING
Out sick? Two taps.
Pick the day and send. Scheduling is texted the moment you send it, and no medical information is shared. Built for the hour nobody wants to make a phone call.
OPERATOR
Every change, accounted for.
Each revision is versioned and compared with the last, so nothing changes quietly.
Act 3 of 3
What it feels like.
For the attendings who live by it: who's on in one second, the next shift as a sentence, and every shift in the calendar they already use.
ATTENDING
Who's on, in one second.
The department board opens on today, with no login and no app: who's on call, ICU, floor and back-up. The night's call hands to the day's at seven, and the board says so.
ATTENDING
When do I work next?
Open the portal and the answer is the headline, along with your weekend, your next two weeks and your longest break.
HERO FEATURE
A swap lands before anyone's awake
Your shifts on your phone. Subscribe once.
Every call, ICU week and floor day lands in the calendar you already use, and approved swaps and sick-day covers update themselves.
Your shifts on your phone
Subscribe once. Approved swaps and sick-day covers follow on their own — the portal is always current.
Nothing moved. And you can see that.
Every published month carries its version, and revised months say so. The call hands over at seven, exactly where the board said it would.
Under the hood
The math behind a fair month.
Behind Generate is a free scheduling tool from Google (OR-Tools). Each department rule becomes something the computer checks, and among the schedules that break no rule it looks for the fairest. Technically it is a constraint model solved with CP-SAT, the open-source solver in OR-Tools: every rule becomes a line of math, and fairness becomes the thing the solver minimises.
Sized for a month like the demo. Arithmetic, not results.
- 01 · RULES BECOME MATHΣp xd,s,p = 1Every hard rule is a constraint. A board that breaks one doesn't exist to the solver.
- 02 · FAIRNESS IS THE GOALmin Σp |Lp − Tp|Among legal boards, find the one closest to everyone's fair share.
- 03 · OPEN-SOURCE SOLVEROR-Tools CP-SATPublic tools do the searching. The department's rules stay theirs.
The rulebook, written as math
Hard rules are constraints: a board that breaks one doesn't exist as far as the solver is concerned, which is why a month that breaks one is refused. Preferences are penalties: they can bend, and bending them has a visible cost.
Simplified for the page. Rule ids match the demo rulebook; weights aren't shown.
TRY A TINY ONE
Six attendings, one week, three seats.
Change a rule and the week is solved again, live in your browser. Set the weekend cap to 0 and watch it refuse.
Demo initials, toy rules. This toy searches seat by seat and backs out of dead ends. CP-SAT goes much further: it propagates constraints, learns from each conflict, and can prove a board is optimal or that none exists.
Public tools, private rules.
Most of what makes this work is free, open and well-tested. The custom part is small and specific: this department's rules, roster and handover, fitted onto public building blocks.
- PUBLIC · SOLVEROR-Tools CP-SATGoogle's open-source (Apache 2.0) constraint solver does the searching. We write the department's rules as its constraints.
- PUBLIC · STANDARDiCalendar, RFC 5545The open standard behind Subscribe once. One feed works in Apple Calendar and Google Calendar, with no app to install.
- PUBLIC · DATAIANA time-zone databaseShifts are stored in local time. When the clocks go back on Sun, Nov 1, that night's call still runs 7:00 to 7:00, all 25 hours of it.
- PUBLIC · RULESHoliday calendarsThanksgiving is the fourth Thursday of November. Holidays are worked out from their rules, so nobody has to type them in each year.
- PRIVATE · THEIRSThe rulebook, the roster, the handoverWe wrote these with the department. It holds initials and dates only, with no patient information.
Imagine That AI
How we built it
Imagine That AI is two people, Alberto and Emilio, directing a team of AI agents. That means bespoke software at a pace and price that used to need a full dev shop.
We scoped this project around the department itself: we sat with how the schedule is really built, wrote their rules down as code, and designed for the moments that matter, like the handover, the sick call and the holiday. No templates and no off-the-shelf compromises.
The software holds initials and dates only, with no patient information.
Want something like this for your business?
We build software and AI workflows around how your team actually works.