I don’t like the example. That’s not just adding another stakeholder, that’s changing the project entirely. There was nothing in the original spec to suggest that this system would be rescheduling patients. This is the kind of feature creep that dooms projects. If I’m writing the inventory system for a wine store, it would be beyond scope for it to make recommendations like “we seem to be out of Pinot Grigio, perhaps you would like to try some Pinot noir instead?” No, I would not.
To make a better example of programmer empathy, one should not implement a patient to staff ratio check as a database constraint. I’ve seen software that worked like this, such that if a nurse tries to call in sick, they get “constraint violation!!!” errors until they first cancel enough appointments.