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 having brotherly ties between a strange man and a strange woman, and is the former considered a Mahram (unmarriageable) to the latter?
Such a relation between a strange man and a strange woman is forbidden in Islam because it involves forbidding what Allah has allowed by marriage, and allowing what Allah has forbidden such as looking and the like. Such a relation doesn`t render any act lawful between them, thus they are forbidden to look at each other, have a Khulwah (seclusion), and travel together.
Is prayer nullified by having thoughts while performing it?
Prayer isn`t nullified by having thoughts while performing it, provided that the praying person offers all of its pillars and meets all of its conditions. However, the reward decreases significantly in the absence of reverence since a praying person is rewarded according to the attentiveness of his/her heart during prayer.
What is the ruling on a man leading his sisters in obligatory prayer, or Taraweeh prayer (Night prayer in Ramadan)?
The prayer of the man who leads his wife, or sisters in prayer is valid, but it is more rewarding for him to offer obligatory prayer in the mosque. And Allah Knows Best.