In the Name of Allah, Most Gracious, Most Merciful.
All praise and thanks are due to Allah, and peace and blessings be upon His Messenger.
In this fatwa:
In his response to your question, Sheikh Ahmad Kutty, a senior lecturer and Islamic scholar at the Islamic Institute of Toronto, Ontario, Canada, states:
Although men are to treat men and women are to treat women, in case of necessity, it is okay for a male to treat a female or a female physician to treat a male patient.
According to the rules of jurisprudence, things otherwise deemed as impermissible can be rendered permissible because of necessity.
We also know that when Sa`d ibn Mu`adh was injured in the war, the Prophet (peace be upon him) set up a tent for him in the Mosque and appointed a female nurse to take care of him.
Based on these reports, Imam Ash-Shawkani states:
“It is permissible for a woman to treat a male patient when necessary.”
In light of these, if you consider this as an area for you to excel and make a contribution, then you may go ahead. You don’t need to worry about treating male patients – if and when your profession demands it as long as you maintain the necessary safeguards.
Almighty Allah knows best.