150 likes | 298 Vues
Doctor Scheduling at Baystate Hospital. Rohan Khatau Claudio Stefan . Background. Baystate Hospital in Springfield, MA compiles a quarterly schedule assigning doctors to specific shifts They have one person in charge of the schedule who follows a general guideline and fills it in manually
E N D
Doctor Scheduling at Baystate Hospital Rohan Khatau Claudio Stefan
Background • Baystate Hospital in Springfield, MA compiles a quarterly schedule assigning doctors to specific shifts • They have one person in charge of the schedule who follows a general guideline and fills it in manually • Will acquire computer software at the end of this month • Our Task: scheduling for the month of June
Problem Details • Assignment Problem with three types of doctors: • Clinicians • Hospital Educators • Dedicated Nocturnists • Each set of doctors has its own specific shifts and constraints • FTE (some work part time and some are full time) • Clinicians can work day or night shifts • Educators only work during the day • Dedicated Nocturnists only work the overnight shift
Shifts • For weekdays: • Eleven Clinician shifts, ten from 8am to 4pm and one from noon to 4pm • Eight Hospital Educator shifts, all from 8am to 4pm • Two overnight shifts • For weekends: • Ten clinician shifts (all from 8am to 4pm) • Five Educator shifts • Two overnight shifts
Some Important Rules and Constraints • Maximum Number of shifts in a row is seven • Maximum Number of overnights in a row is four • Weekend Work is two weekends a month (only for Clinicians) • If a physician worked overnight, the only shift he or she can work the following day is another overnight shift • It is preferred that a physician works the same shift as much as possible during the seven day span • All doctors are limited to one shift per day…
Our Task • Find a solution to this assignment problem using Integer programming • See what we could do to improve the schedule using Baystate’s specific constraints • See if academic scheduling methods are practical in a hospital environment
Methodology • Integer program to solve the assignment problem (solved using ampl) • Define Binary Variable: • X[i,j,k] = 1 if doctor i works shift j during day k 0 otherwise • i indexes doctors (44 doctors in total) • j indexes shifts (21 weekday shifts) (17 weekend shifts) • k days (30 total for June)
Methodology • Constraints will make sure that only one doctor will be assigned to each shift on each day • For the objective function, we added a bonus variable: • bonus[i,j,k] = 7*(X[i,j,k]+X[i,j,k+1] +X[i,j,k+2] +X[i,j,k+3] +X[i,j,k+4] +X[i,j,k+5] +X[i,j,k+6]) • this will keep track of days in which the physicians worked the same shift and assign a large bonus for those respective days • Objective Function: max ∑ ∑ ∑ bonus[i,j,k] days shifts doctors
Constraint Overview • Seven Days in a Row: • ∑ (X[i,j,k] + X[i,j,k+1] + X[i,j,k+2] … + X[i,j,k+6] + [i,j,k+7]) <=7 shifts for all i and k • Four Nights in a Row for Nocturnists: • ∑ (X[i,j,k] + X[i,j,k+1] + X[i,j,k+2] + X[i,j,k+3] + X[i,j,k+4]) <= 4 Night shifts for all i in Nocturnists, k in Days • Cannot Work a Day Shift Following an Overnight Shift: • ∑ X[i,j,k] + ∑ X[i,j,k+1] <= 1 Night shifts Day shifts for all Clinicians on all days
Sample Code (from .mod file) var bonus1{i in allDoctors, j in allShifts, k in allDays} >= 0 <=50 integer; var X{i in allDoctors, j in allShifts,k in allDays} >=0 <=1 integer; maximize objectiveDays: sum {i in allDoctors,j in allShifts, k in bonusDays1} bonus1[i,j,k]; subject to shiftAndDayConstraint {j in allShifts, k in weekDays}: sum{i in allDoctors} X[i,j,k] = 1; subject to shiftAndDayConstraint2 {j in weekEndShifts, k in weekEnds}: sum{i in allDoctors} X[i,j,k] = 1; subject to shiftAndDayConstraint3 {j in weekDayShifts, k in weekEnds}: sum{i in allDoctors} X[i,j,k] = 0; subject to shiftAndDayConstraint4 {j in nightShifts, k in allDays}: sum{i in allDoctors} X[i,j,k] = 1; subject to bonusConstraint1 {i in allDoctors, j in allShifts, k in bonusDays1}: (bonus1[i,j,k] = 7*(X[i,j,k]+X[i,j,k+1]+X[i,j,k+2]+X[i,j,k+3] +X[i,j,k+4]+X[i,j,k+5]+X[i,j,k+6])); subject to FTEConstraint {i in allDoctors}: sum{j in allShifts,k in allDays} X[i,j,k]<= FTE[i]; subject to nocturnistConstraint1 {i in nocturnists, k in allDays}: sum{j in nightShifts} X[i,j,k] <= 1; subject to nocturnistConstraint2 {i in nocturnists}: sum {j in dayShifts,k in allDays} X[i,j,k] = 0; subject to CHMPnightConstraint {i in CHMPs}: sum {j in nightShifts, k in allDays} X[i,j,k] <= 1; subject to CHMPshiftConstraint {i in CHMPs}: sum {j in educatorShifts, k in allDays} X[i,j,k] = 0; subject to HospEdNightConstraint {i in educators}: sum {j in nightShifts, k in allDays} X[i,j,k]=0;
Sample Code subject to HospEdshiftConstraint {i in educators}: sum {j in chmpShifts, k in allDays} X[i,j,k]=0; subject to doctorAndDayConstraint {i in allDoctors, k in weekDays}: sum {j in allShifts} X[i,j,k] <=1; subject to doctorAndDayConstraint2 {i in allDoctors, k in weekEnds}: sum {j in weekEndShifts} X[i,j,k] <=1; #each doctor has to work at most one shift every day subject to consecutvieDaysConstraint {i in allDoctors, k in consecutiveDays}: sum {j in allShifts} (X[i,j,k]+X[i,j,k+1] +X[i,j,k+2]+X[i,j,k+3]+X[i,j,k+4]+X[i,j,k+5]+X[i,j,k+6] + X[i,j,k+7])<=7; #every doctor is only allowed to work at most 7 seven days in a row #you need the last term because there should be a break between the shifts subject to weekEndConstraint {i in CHMPsandEducators}: sum {j in weekEndShifts, k in weekEnds} X[i,j,k] <=4; #doctors are allowed at most one weekend of work subject to RougemontDaysConstraint {k in RougemontDays}: sum {j in nightShifts} X["Rougemont",j,k] = 1; subject to EnriquezDaysConstraint {k in EnriquezDays}: sum {j in nightShifts} X["Enriquez",j,k] = 1; subject to FloresDaysConstraint {k in FloresDays}: sum {j in nightShifts} X["Flores",j,k] = 1; subject to PalacioDaysConstraint {k in PalacioDays}: sum {j in nightShifts} X["Palacio",j,k] = 1; #constraints for the nocturnists - what specific days they are working on subject to dayAfterOvernight {i in CHMPs, k in overnightDays}: (sum {j in nightShifts} X[i,j,k] + sum{j in dayShifts} X[i,j,k+1]) <= 1; #no doctor will have a shifts following his overnight visit
The IP Solution • Benefits: • Much more efficient than “pencil and paper” method • Ensures that all constraints, if defined properly, are satisfied • Enables one to identify inconsistent and redundant constraints • One can write a simpler program and use it as a starting point for manual scheduling • Shortcomings: • Less Flexible than the manual method • Some Constraints are difficult to define and implement • Output is difficult to interpret • Need specialist to adjust and run the program
Thanks to the Baystate Hospital staff, especially Carmen Curry