Sheikh ‘Atiyyah Saqr, former head of Al-Azhar Fatwa Committee, states the following: “First of all, it is not allowed for a Muslim woman to uncover any part of her body, with the exception of her face and hands, in front of a non-mahram man, whether he is a Muslim or a non-Muslim.
However, when it comes to medicine, the issue is different. The majority of Muslim jurists maintain that when a Muslim woman becomes ill and is compelled to go to a doctor, she should first of all go to a Muslim woman doctor to treat her. However, if there is no female Muslim doctor, she should go to a female non-Muslim doctor.
On the other hand, if there is no female non-Muslim doctor to treat her, she may go to an honest male Muslim doctor. If there is no male Muslim doctor to treat her, she is allowed to go to a male non-Muslim doctor, but this should be the last resort.
As far as treating women is concerned, doctors are not allowed to uncover any part of the woman’s body unless it is necessary. This may simply explain the reason why Islam gives women priority to treat women and not vice versa.
Also, we have to bear in mind that, the issue of treating women is bound by necessity. Men are only allowed to treat women within certain confined limits.”

Shedding more light on the issue, Dr. Husam Ad-Din ibn Musa `Afana, professor of the Principles of Islamic Jurisprudence at the University of Jerusalem, states the following:

“It is to be noted above all that Islam encourages covering one’s `Awrah (private parts) except in some exceptional cases that necessitate uncovering the `Awrah. When the woman falls sick and becomes in need of medical examination, she should consult a female doctor. She is permitted, in no way, to seek the help of a male doctor unless she cannot find a female doctor or the female doctor is unable to treat her case. In this case, a woman can be examined by a male doctor. However, the following restrictions are to be adhered to:

Firstly: A male Mahram (unmarriageable relative) or the husband of the woman should be present during the medical examination to respect the rule of Khalwah.

Second: The examination should be focused only on the ailing part of the woman’s body.

In this regard, Imam Al-Ghazali, may Allah bless his soul, says: “The necessity that makes covering the `Awrah permissible should be considered. So that, the pride and the honor of the person concerned is not violated.”

Thirdly: In carrying out the medical checkup, the doctor should have fear of Allah in all his acts.

Fourthly: When there is a need for the woman to seek the medical examination of a male doctor, she should choose a trustworthy, honest and religious doctor.

By the same token, a male patient is not permitted to be examined by a female non-Mahram doctor, except in case of the lack of the male doctor or his inability to render the job. This view is supported by many evidence in Shari`ah.”