I'm not much of a Morality Nazi, so if it had been me on the other side of that locked door, I would have knocked loudly and addressed the hospitalist to tell him he was needed and that I would come back shortly...then I would have walked away to give him a chance to finish whatever he was doing that I didn't even want to know about. Unless there was a crime being committed, I would have allowed him the privacy to at least put his drawers back on. Personally, I would be completely MORTIFIED to walk in on some hospital hanky-panky, especially if it involved a scandalous affair.
Incidentally, some people like to try and get it on in a semi-public place where there's the danger of being discovered. Yeah, some people like that. Yeah. 'Course I'd never do that.....certainly not. *ahem*