However that doesn't mean this is the global optimum. There are probably ways to reduce hand off errors, e.g. by introducing hand off check lists. Sleep deprivation errors on the other hand can only be reduced by reducing sleep deprivation, giving crystal meth to the doctor (probably unethical and unsustainable) and by general poka yoke style changes that will have benefits even when not sleep deprived.
So the global optimum can probably be shifted to somewhere where the doctor is not sleep deprived and the hand off is organized. Which is also more humane towards the doctor.
After eg 6h of work, don't accept any new patients, but finish treating the ones you already have, if possible.
In this case one procedural way to make this better would be to teach doctors to write up anything unusual they notice during the day, and read this list of unusual events during hand-off to the next doctor.
Presumably the constraint here is having an integer number of shifts per 24-hour day - 3x8 hour, 2x12 hour, 1x24 hour and so on.
There are articles on how the early aviation had too much pilot egos and cowboy attitude, and how the aviation industry was able to change that and reduce human errors. And how medicine should learn from them, and maybe already is.
How can we change this culture though? For some reason doctors attract insane lawsuits seeking hundreds of thousands of dollars in damages. People don't seem to be so litigious when they're against rich corporations with lots of lawyers at their disposal.
If this continues, the only possible result is defensive medicine since doctors will need every bit of proof and documentation in order to prove their innocence in the event of a lawsuit.