Wa `alaykum As-Salamu wa Rahmatullahi wa Barakatuh
Medical treatment is one of the areas in which Islam applies exemptions. If there are no same gender medical personal who can provide service needed, then it is permissible to allow people of other gender to provide such service.
The Islamic rule is: “If a matter became limited (in options) expand (as needed.)”
In general, all medical personal are under a code of ethics to make their work professional and limited to the service needed.
`Awrah or private areas of females should be shown if needed to non-Mahram people in case of medical treatment only in the portion needed. It is also preferable to have another family member with you at that time like your sister or mom.
Almighty Allah knows best.
Views expressed by hosts/guests on this program (live dialogue, Facebook sessions, etc.) are their own and their appearance on the program does not imply an endorsement of them or any entity they represent.