When undergoing an X-ray or cat-scan which requires being alone in a room with the female technician, what should one do to avoid transgressing the prohibition of yichud? Even if one’s wife or friend is with him, they cannot be in the actual room due to harmful radiation.
Depending on the circumstances, if the door is closed but unlocked and the nurses enter the office without waiting for permission to enter; then they are like a shomer. According to some Poskim, it’s not יחוד during regular office hours, even if the nurses will not enter without asking, because of the combination of two factors. One is that the doctor is afraid to do anything that would ruin his name. Secondly, if he takes too long with one patient it will arouse suspicion by the patient or the nurses. Therefore during regular hours when there are other patients or nurses there, it is permitted. After the nurses leave, if she is the last patient, it would be yichud.
Igros Moshe E:H 4-65 (1)