All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and Messenger.
It is permissible for a Muslim woman to work as a doctor, and it may even be recommended or obligatory when she needs it or the society is in need of female doctors. Her work may be obligatory, even if she does not need to work, if the society needs female doctors, especially if she is an OB/GYN specialist. Jaabir ibn ‘Abdullaah said:
A man was stung by a scorpion while we were sitting with the Messenger of Allaah, sallallaahu ‘alayhi wa sallam. A man stood up and said, "Should I recite Ruqyah (curing through reciting Quran or invocations) over him, O Messenger of Allaah?' The Prophet, sallallaahu ‘alayhi wa sallam, said: 'He among you who is capable of being useful to his brother, let him do that.'" [Muslim]
The following is stated in Al-Mawsoo‘ah Al-Fiqhiyyah (The Fiqh Encyclopedia):
As for practicing medicine, it is permissible in principle. It may be recommended if the person intends thereby to follow the example of the Prophet, sallallaahu ‘alayhi wa sallam, who encouraged Muslims to practice medicine, or intends to help Muslims. Allaah, the Exalted, says (what means): {And whoever saves one—it is as if he had saved mankind entirely.} [Quran 5:32] The Prophet, sallallaahu ‘alayhi wa sallam, said: "He among you who is capable of being useful to his brother, let him do that." However, if someone in specific is needed to practice medicine either due to the lack of other doctors (in his specialty) or based on an established contract, then he is obliged to practice medicine in this case.
If this female doctor is treating women, then the ruling is obvious. However, if she is treating men as well, then there has to be a necessity or a need in order for her job to be permissible. For example, if there is a male patient who is in need of treatment and there is no male doctor to treat him and it becomes necessary for a female doctor to attend to his treatment. Muslim women, during the lifetime of the Prophet, sallallaahu ‘alayhi wa sallam, would treat the injured soldiers according to this principle.
Imaam Ash-Shawkani commented on the Hadeeth of Anas which reads, "The Messenger of Allaah, sallallaahu ‘alayhi wa sallam, used to go to battle with Umm Sulaym and other women with her from the Ansaar, and they would give water and attend to the wounded." [Muslim] He said:
This Hadeeth is evidence that it is permissible for a Muslim woman to offer treatment to a non-Mahram (permanently unmarriageable) man in case of necessity ... The same applies to the woman while transporting the dead and injured; she should not directly touch them when she can treat him without doing so.
This means that if the female doctor has to treat a male patient because of necessity, then such necessity is to be addressed proportionately. She should not touch his body unless it is necessary and inevitable. She should not look at his body parts that are considered ‘Awrah (what should be covered) except for the very spot that needs treatment.
In conclusion, it is permissible, and may be recommended or even obligatory, for a female doctor to treat women. If non-Mahram men are present during the treatment, then she has to conceal the body parts that are obligatory to be concealed in their presence. If she has to reveal part of her arm for a treatment necessity, then there is no harm in that.
Ibn Qudaamah said,
Chapter on what is permissible to be seen by non-Mahram men: It is permissible for a male doctor to check whatever parts of her (the woman's) body that the medical examination warrants for this is considered a necessity ... It is permissible for a male witness to look at the face of a woman concerning whom he is testifying.
When a man enters into a commercial transaction or a hiring/leasing contract with a woman, he is allowed to look at her face so that he can know how she looks so that he can later identify her for the judge if a dispute occurs between them that needs to be settled by the court. It was reported on the authority of Ahmad that this is disliked for young women but not for elderly ones. Perhaps he deemed it disliked for those who fear Fitnah (temptation) or for who can dispense with such transactions. However, in case of necessity and when arousal of sexual desire is not feared, there is no harm in looking at the woman's face in this case. [Excerpted from Al-Mughni with slight modifications]
If it is permissible to look at a woman's face in commercial transactions because of the need to do so, then it is permissible to look at the woman's hands during medical treatment and surgical procedures with greater reason.
Allaah Knows best.