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).
A person prays in a certain spot within the rows of the mosque, and gets angry if someone else prayed at his spot. What is the ruling on this behavior?
All Perfect Praise be to Allah The Lord of The Worlds and may His Peace and blessings be upon our Prophet Muhammad and upon all of his family and companions Prophet Mohammad (PBUH) make it prohibited for a Muslim from having/taking a certain spot in the mosque when performing prayers if they arrived and find it occupied, furthermore; it is the religious duty on others (praying people) to offer a piece of advice to alert the ones who don't know, that whoever reaches a spot first at the mosque having a priority/privilege upon others in that spot. And Allah Knows Best.
Is wearing a cap permissible for boys, or girls?
All Perfect Praise is due to Allah, The Lord of The Worlds.
In principle, anything is permissible sol long as there is no Sharia evidence prohibiting it, thus wearing the cap by boys is permissible as long as it isn`t done in imitation of the disbelievers. Moreover, a Muslim woman should avoid all that which attracts the attention of men because whatever leads to the forbidden is forbidden. And Allah Knows Best.
Is it permissible for someone who has forgotten to mention the supplication pertaining to answering the call of nature to say it while in the toilet?
It is disliked for a Muslim to mention Allah while in the toilet, but he/she may recall the supplication in his/her head without uttering it; that is in case he/she had forgotten mentioning it before entering the toilet.