ED Scheduler

Software

ED Scheduler

Residency Scheduling, Solved

All Projects

The chief resident at NYU Long Island Emergency Medicine was building monthly shift schedules by hand — juggling 18 residents across two hospital sites, 10 shift types, night block patterns, rest requirements, and individual time-off requests. The process took days of spreadsheet work each month, and a single missed constraint could cascade into compliance violations.

I built a tool that generates compliant schedules in seconds. It enforces every constraint automatically, flags violations for manual review, and exports directly to the hospital's ShiftAdmin scheduling system.

<5s
Generation Time
320
Assignments / Month
2
Hospital Campuses
30+
Configurable Rules

The Schedule Grid

The calendar view displays an entire month of assignments in a dense, scannable grid. Each row is a shift slot, each column is a day. Residents are color-coded by PGY year — hover over any name to see all of their assignments highlighted across the grid.

Mon 7/6Tue 7/7Wed 7/8Thu 7/9Fri 7/10Sat 7/11Sun 7/12
Adult DayTeam 1R3-AR3-AR3-AR3-A
Team 2R2-AR2-AR2-AR2-DR2-D
Team 3R1-CR1-CR1-CR1-C
Adult NightTeam 1R1-AR1-AR1-A
Team 2R1-BR1-BR1-BR1-B
PedsDayR2-BR2-BR2-BR2-B
MidR2-CR2-CR2-CR2-C
NightR1-DR1-DR1-D
SuffolkDayR3-BR3-BR3-BR3-B
EveningR2-DR2-DR2-D
NightR3-CR3-CR3-CR3-C

Interactive demo — hover to highlight resident assignments

Phased Generation

The scheduler generates assignments in five sequential phases. Night blocks are placed first because they have the tightest constraints — contiguous blocks of 3, 4, or 5 nights depending on PGY year. Day shifts fill around them. The chief resident reviews and approves each phase before the next one runs.

Setup
Nights
3
Day Shifts
4
Princess
5
Peds

Five-phase generation pipeline

Constraint System

33 unique rule sets define the requirements for each rotation type and length combination. The constraint engine enforces rest periods, consecutive day limits, night block patterns, teaching minimums, and weekend guarantees.

12h minimum

Between shift end and next start

7p–7a
12h
7a–7p
5 days max

Maximum consecutive work days

1
M
2
T
3
W
4
T
5
F
S
S
3+3 / 5 / 4

Contiguous night patterns by PGY year

PGY1
PGY2
PGY3

Validation & Audit

After each generation phase, every constraint is checked. Violations are flagged with severity levels — errors that must be acknowledged before proceeding and warnings that can be noted. Every resident gets a detailed audit showing shift counts, night dates, weekend balance, and request status.

Constraint Violations

0/5 acknowledged
R1
Resident R1-APGY1
Adult ED · 4-Week · Mineola

Shift Breakdown

Adult Day11/11
Adult Night6/6
Princess1/1
Peds Day0/0
Teaching0/0
Weekend Days4
Golden Weekends1/1

Requests

Jul 4 · HonoredJul 15 · HonoredJul 10 · Violated

Night Blocks

Jul 7–9, Jul 21–23

Interactive violation acknowledgment and per-resident audit

Technical

Client-side React application with no backend — all scheduling logic and constraint solving runs in the browser. The annual block scheduler is a separate Python constraint solver that generates the year-long rotation schedule across 13 four-week blocks for 18 residents.

ReactTypeScriptViteTailwind CSSPythonConstraint SolvingCloudflare Pages