All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
Doctors working in the mentioned hospital are considered like providers of water and shepherds with regards to abandoning spending the night at Mina. This is because having an excuse is the reason behind the permissibility of abandoning spending the night at Mina. It is mentioned in Mughni Al-Muhtaj:
One is excused for abandoning spending the night at Mina and is thus not liable to offer anything when he is fearful for himself or his wealth or is missing something that he seeks, like looking for a fleeing servant or exposing a patient to risk because of not caring for him, etc. People with such excuses are considered like providers of water and shepherds with regards to abandoning spending the night at Mina. (2/272)
Allaah Knows best.