← Back to portfolio

In production

Physician duty roster

A system that builds a month of night duties from physicians' day-off requests and duty rules. It is in actual use at Ogaki Municipal Hospital. The demo on this page recreates the approach with fictional data.

For demonstration only, with fictional data. It is implemented separately from the system in actual use and must not be used for real scheduling decisions.

The problem
A duty roster has to satisfy many conditions at once: day-off requests, rest between night duties and a fair number of duties for everyone. By hand it takes hours every month, and imbalances and oversights creep in.
In production
It is used to build physicians' duty rosters at Ogaki Municipal Hospital. It produces the roster every month in a real hospital, and keeps improving with feedback from the people who use it.
My role
Requirements, design, implementation and operation.
Technology in the real system
Next.js, TypeScript, Python (the scheduling engine), AWS
How this demo differs
This demo is a small implementation written from scratch for display. It computes only the three prepared scenarios, with 12 physicians and one duty type. The real system handles more duty types and per-physician conditions.

Demo

Day-off requests are spread out. Every rule can be kept.

Rules

  • No duty on a requested day off
  • No duty on the two days after a night duty
  • At most 3 night duties per physician per month
  • At most 1 weekend or holiday night per physician (target)

Day-off requests

  • Dr. A: Nov 7–8 (Personal)
  • Dr. C: Nov 14 (Personal)
  • Dr. E: Nov 1–2 (Personal)
  • Dr. H: Nov 28–29 (Personal)
  • Dr. K: Nov 3 (Personal)

Night duties, November 2026

0 violations · 0 warnings

For demonstration only, with fictional data. It is implemented separately from the system in actual use and must not be used for real scheduling decisions.

Sun
Mon
Tue
Wed
Thu
Fri
Sat
  • Weekend / holiday
  • Warning
  • Violation

Violations and warnings

No violations or warnings.

Per-physician totals

PhysicianNightsWeekend / holidayDays off requested
Dr. A312
Dr. B310
Dr. C311
Dr. D310
Dr. E312
Dr. F310
Dr. G210
Dr. H212
Dr. I210
Dr. J210
Dr. K211
Dr. L200