How we improved roster scheduling for a Paediatric ward in AHNH


Imagine reducing an 8-hour roster scheduling task to just one second. That’s exactly what we achieved for a bustling paediatric ward.

Dr. Ma, a consultant Paediatrician at Alice Ho Miu Ling Nethersole Hospital, approached us with a scheduling challenge for his ward a few years back.

He was in charge of scheduling for his ward — they rotated this workload between consultants because how time-consuming it was — and it was taking him 8 hours every month.

And it was understandably time-consuming, because their case was really challenging.

The Challenge — Understanding Ward Rules and Regulations

His ward consists of 34 Paediatricians, and the call roster is divided into 5 levels: Intern, 1st Call, 2nd Call, 3rd Call, and Consultant Call (Con Call). Every day, they need one person of each level to stay on-call for 24 hours, which means there are 5 people on-call every day.

Additionally, each person must take at most 1 call every 3 days, to make sure they get enough rest in-between. They also assign a set number of weekday, Saturday, and Sunday calls for each person, to make it fair for everyone.

For annual leaves, their ward also forbids assigning a call one day before the start of the AL.

It already sounds quite complex, right? But the real difficulty is to make calls evenly spread throughout the month.

On average, each doctor takes 1 call every 5-6 days. It would be preferable to keep calls spread out as much as possible, but it was a nightmare for Dr. Ma. During the scheduling, it is fairly possible that you spend hours making the schedule right, just to realize it would break some ward rules if you insist. And if you try to fix one problem, it may also violate other rules.

In such an unpredictable scheduling practice, the only way forward was to guess, brute-force, and start again if it doesn’t work out.

To make things even harder, some doctors also have multiple seniorities. For example, you can have Dr. A, a 1st Call who’s been here for a while, and is ready to take up some 2nd Call duties. This means that not only do we need to space out calls in 1st Call, but also in 2nd Call. This makes things multitudes harder suddenly, because you have to focus your attention on spacing out calls for more than 1 seniority.

Another thing, if you have 2 people that are of similar skill level, they cannot take calls together. For example, assume Dr. B is also a senior 1st Call ready to work as a 2nd Call. If you let both Dr. A and B serve the same day, when they’re called, since they are of similar skill level, they functionally only act as 1 call level, defeating the whole purpose of having multiple levels of calls.

This is why it took Dr. Ma 8 hours (per month!) to schedule. It really isn’t something difficult, but it was tiring, boring, and tedious work.

Dr. Ma had looked into many alternative scheduling apps, but none of them had the feature he needed the most: the ability to auto-fill rosters with a good quality.

The Complications — Potential Pitfalls in Roster Scheduling

What we described was an ideal setting, where there’s no human errors, no ad-hoc changes, etc. But the reality is, you might need to reschedule the entire thing whenever there are any workforce changes.

It isn’t uncommon that newcomers freshly rotate to the AHNH Paediatrics ward with short notice, or an experienced doctor suddenly requires surgery and long-term sick leave. It is not hard to see that disruptions like these could make the previously well-crafted schedule a waste of time, because now you need to spend a few more hours amending the roster to fit the current manpower situation.

It was also hard to forecast manpower shortage in the ward. Before you actually get hands-on with scheduling the roster, there is no way for you to guarantee enough people to handle calls, except for using your instinct. So it was basically guesswork. You may erroneously approve a leave for your colleagues only to later realize that now you have insufficient people for your call duty. While most of the times you can call someone to substitute instead, in exceptional situations, sometimes you are forced to request the colleague to cancel his leave. This could really cause a lot of issues and be detriment to the work culture there.

Finally, there is the element of human errors. Scheduling is tedious work, and checking for mistakes is even more so. No matter how careful you are, there could always be one or two rule violation that goes missed. If they are discovered early, then you could fix it before it becomes a problem. But sometimes, the problem was realized too late and again, you either call back someone, or you bear with the staff shortage for that day. Both are not optimal.

Every single issue we listed above could cause the call roster to be unusable, forcing you to spend yet a few more hours on it.

The Solution — How we reduced scheduling time and eliminated human errors for Dr. Ma

We think this is not okay. Doctors should be spending time seeing patients, not fixing duties. Plus, paying a medical expert to solve such a mundane problem is probably a waste of both time and money. That’s why we’ve set out to help Dr. Ma with this problem.

We researched a lot on the ways to schedule, and eventually settled with Operations Research (OR) tools. These are highly specialized mathematical modelling tools that could solve highly complex constraint problems. Specifically, it allows us to get the optimal solution with certain variables under certain constraints.

What we’ve done is that we turned Dr. Ma’s scheduling problem into a mathematical model, with the calls as binary variables, the rules as mathematical constraints, and we invented a way to formulate the notion of “spacing out calls” into something we could optimize mathematically. The fancy technical term for this model is called a Mixed Integer Linear Programming (MIP), and I covered how to make one in my e-book which you could get for free on https://8-hours.com.hk/e-book.

To attack this problem, we employed a 3-dimensional indexed binary variable object to capture the person, date, and level of seniority in one single object. This approach is 1 dimension higher than the approach I taught in the e-book (because Dr. Ma’s case is harder than the trivial ones), and allowed us to capture shifts of different seniorities as well.

We went over very specific constraints, including to forbid doctors with 2 overlapping levels to schedule together (for Dr. A and B’s case), as well as fixing each person’s assigned number of calls in their specific seniority, as well as spacing them out as much as possible.

We eventually ended up with an algorithm that could take all of Dr. Ma’s constraints and objectives into account.

It takes under 1 second to run, and generates the best solution for his ward specifically.

We know it is the best, because we could prove it mathematically.

Here is a demo of a call roster. Note how every one has an equal distribution of shifts, most separated by 5-6 days. This is a fair roster that also fulfills leave requests (but they’re not shown in this table).

Doctor names replaced by dummy names, note some overlap between 1st and 2nd call.

Even better, we also use it to simulate the call roster for approving ALs. So, if you approve an AL that would prove to cause the ward to have staff shortage, the solver would diagnose it as “infeasible” and analyze the conflicting constraints. This way, Dr. Ma could predict staff shortage scenarios with certainty, eliminating the guesswork. With the algorithm, they could also generate new rosters on the fly if a newcomer suddenly joins, as it takes literally just seconds.

Dr. Ma has personally told me that their department used to take about 1 week to schedule a workable roster before it was published. With our algorithm, it now takes 1 night (or less).

Our takeaways from working with Dr. Ma

Our work with Dr. MA highlighted lots of learnings from our side:

  • The importance of spacing out calls across the month.
  • The importance of avoiding calls with doctors of similar skillset and experience.
  • Optimizing the model to producing results in under 1 second, compared to 8 hours.

This is why we thought it would be nice to share this case study to other doctors. It truly highlights the nuances of all aspects that goes into a good call roster, including all the details about scheduling with overlapping seniorities, making calls fair, and much more.

We’re grateful for clients like Dr. Ma who are willing to communicate in-depth his difficulties with scheduling, and trust us enough to let us help them digitalize the process of roster scheduling.

Want to work with us or learn how to implement this method for your ward?

  • E-book: As much as I wanted to share the technical details of formulating the model, it always seemed too technical for an article to handle. That’s why I wrote an e-book to delinate the process at https://8-hours.com.hk/e-book. I teach how to set up a basic mathematical model in that book.
  • Our Rostering Software: If you find your case too hard, or don’t have the time to learn a brand new set of skills, you can work with us directly through https://8-hours.com.hk/contact. We offer custom-built algorithms as a service, so you could generate rosters specifically suited for your ward. We also host your algorithm as a web application, so you could generate rosters from just about anywhere.


Join Our Newsletter

Subscribe to gain weekly insights for roster scheduling!