Lessons from automating on-call scheduling at CHU Marrakech

Lessons from automating on-call scheduling at CHU Marrakech
Replacing a manual monthly roster with an automated one sounds simple until you actually sit with the department that owns the current process. Here's what we learned building the on-call (garde) scheduler for CHU de Marrakech's Pôle Adulte.
The rules were never fully written down
The scheduling constraints — fairness across doctors, minimum rest between shifts, seniority-based preferences — existed mostly as institutional knowledge held by whoever built the schedule by hand each month. Getting those rules onto paper, and agreeing on edge cases, took longer than writing the scheduler itself.
Trust is earned by shadowing, not by demoing well
We ran the automated schedule in parallel with the manual one for two full months before anyone relied on it. Every discrepancy between the two got investigated — sometimes the agent was right and the manual process had drifted from the stated rules, sometimes the rules needed a case we hadn't captured.
The data never left the hospital
Doctor names, shift history, and leave records stayed inside the hospital's own environment throughout development, testing, and production. There was no point in the process where exporting a dataset would have made our job faster, so we didn't build that shortcut in.
The result
The Pôle Adulte now generates its monthly roster automatically. The department still reviews and can override it — automation replaced the manual labor, not the department's judgment.
Comments (0)
No comments yet. Be the first to share your thoughts.