Sheikh Mohamed El-Moctar El-Shinqiti, Director of the Islamic Center of South Plains, Lubbock, Texas, states: “In principle, a Muslim is to avoid physical contact with opposite gender, unless he/she is one’s spouse or unmarriageable kin (mahrem). Also, khulwa (a man and a woman being in a closed area by themselves and away from the view of others) is forbidden in Islam.
However, medical profession is usually subject to necessary circumstances that would warrant departure from the original rule. Therefore, looking after patients, male and female, is a human necessity and a moral duty that outweigh the Islamic ethics of gender relations. This is more applicable to non-Muslim countries where people are not familiar with Islamic teachings and ethics.
Having said that, as necessity is judged according to the circumstances that permit it, a medical professional is not allowed to go beyond what is deemed necessary.”