It is necessary for Muslim community to have female medical and pharmaceutical experts who can serve our females' medical and pharmaceutical needs. In case of the need can not be fulfilled by male experts, it can be compulsory on females who can, to study and meet the need.
In general, we encourage our Muslim females to go in every career which is required by our community as far as the female is observing proper Hijab and keeping herself away from mixing with sinful people and sinful acts.
If it is within the ethical framework of the doctor's work, and there are no legal impediments, taking into consideration the interest of the patient, then there would not be any shar'i problem.
And Allah knows best.