Regarding leaving the mask on, I think it was in JLA that they had a member of hospital staff mention "The code of the cape" or something like that.
It's an unofficial code held by medical staff, as a professional courtesy towards people who save lives on a regular basis, to make no effort to remove the mask of an injured costumed hero (unless medically required), make no attempt to uncover their identity whilst in their care, or acknowledge they might have recognised them should they do so.
Though there is a Golden Age story which has Batman seeking help from a Doctor with a seriously injured Robin. The Doctor has to remove the mask to help check his recovery, and Batman notes that it was worth the Doctor learning Robin's ID to save his life, to which the Doctor points out he learned no such thing. All he knows is that Robin is a dark haired boy, like thousands of others in Gotham.