Question :

Is it permissible for the doctor to uncover the hair of a female patient out of necessity?

The Answer :

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).