Skip to content

Case Study

On-Call Scheduler

Builds a fair surgeon and PA on-call calendar from the practice's own rules, time off, and holiday history.

Built for
A surgical practice
Status
Live
Year
2026
Capabilities
Custom Apps / AI Agents / Data Systems
On-Call Scheduler interface

The Problem

Building an on-call calendar for a surgical practice means balancing a lot at once. Surgeons and PAs have different eligible days. PAs are usually paired with a particular surgeon. Weekends and holidays have to rotate fairly over years, not just months. Approved time off has to be respected.

Doing that by hand in a spreadsheet takes hours. It's hard to defend when someone asks why they got Thanksgiving again, and one PTO request can mean redoing everything.

The Approach

We turned the practice's unwritten rules into rules the software can read and enforce. Admins manage providers, time off, holidays and scheduling rules in one place. The scheduler builds the calendar from those inputs, and nobody has to drag names into cells.

Monthly on-call calendar showing surgeon and PA assignments color-coded by provider
The published schedule. Each surgeon and PA gets a color, with filters by role and a PTO overlay.

How It Works

  • Rules engine. Each rule is typed and weighted: fairness targets, minimum gaps between shifts, count and consecutive-shift limits, PA–surgeon pairing and eligibility. Admins can make a rule a hard constraint or a softer preference.
  • Constraint solver. A Python service uses Google OR-Tools (CP-SAT) to solve the whole date range at once, instead of filling it one day at a time. It can return several candidate schedules for the admin to compare.
  • Holiday memory. Holiday assignments go to a permanent history, so rotations stay fair across years, not just within one.
  • AI assist. Claude drafts new rules from plain-English descriptions, checks existing rules for conflicts, and answers questions about why a schedule came out the way it did.
Scheduling rules list with categories, weights, and enable toggles
Scheduling rules, each with a category, a weight and an on/off switch. They can be written by hand or drafted with AI.

Product Experience

The dashboard shows what needs a decision: pending time-off requests, unassigned holidays and messages. Everything else stays out of the way until it's needed.

Admin dashboard with pending requests, counts, and an inbox
The admin dashboard: what's waiting, and one click to deal with it.
Holiday coverage page with per-provider fairness bars
Holiday coverage, with a fairness bar for each provider for the year.

Technical Build

React and Vite on the front end, Supabase (Postgres, auth and row-level security) for data, and Netlify Functions for the AI features. The solver runs as a separate FastAPI service so heavy scheduling runs don't block the app. Every schedule run is logged and replaced runs are kept, so any published calendar can be traced back to the run that produced it.

Outcome

Live and in use. The practice's admins build and publish their real on-call schedules in it, and development continues alongside them. Names and figures in these screenshots are sample data.

Let's Talk

What do you hate doing?

Tell us about the spreadsheet, manual process, disconnected system, repetitive task, or workflow that drives you nuts. We'll start there.

Bring Us a Problem →