Should a prayer performer who forgets to offer the middle Tashahod (saying ash-hadu anala ilaha ila-alah) offer Sujood As-Sahw (prostration of forgetfulness)?
He/she should offer two prostrations of forgetfulness at the end of the prayer. And Allah Knows Best.
Is it permissible for the doctor to uncover the hair of a female patient out of necessity?
It is only permissible for him to do so when there is no female doctor, and he should examine the patient in the presence of one of her Mahrams (unmarriageable kin).
What is the ruling on ablution if vaginal discharge is expelled, and is it impure?
If these discharges exit from the external genitalia (apparent part of the vagina), they are not impure and do not invalidate ablution. If they exit from the internal part, they are impure and do invalidate ablution. If it is uncertain whether they are from the internal or external part, they are not impure and do not invalidate ablution.
The apparent part is what becomes visible when sitting, and what the husband's penis reaches during intercourse is considered part of the apparent. The internal part is what is beyond that. And Allah the Almighty knows best.
What is the ruling on determining the sex of the baby whether through killing the female spermatozoa, or any other way in order to have a male?
If it is done through having a certain type of food, taking a certain type of medication, or organizing the time of the marital relation, then it is permissible.