Is it permissible for a woman to visit the doctor while in her `Iddah (waiting period)?
It is permissible for her to do that during day time, but it is impermissible for her to leave her house at night except for a sound reason. And Allah Knows Best.
Is prayer mandatory on a dying person who goes through a state of unconsciousness, then wakes up?
If he wakes up and was conscious, then he should pray the way/manner he could, but if he wasn't, then he is exempted from obligatory prayer as Allah Says in this regard (What means): "On no soul doth God Place a burden greater than it can bear." [Al-Baqarah/286].
Is permissible to buy/sell with non-Muslim?
Yes buying/selling for a Muslim with non-Muslim is permissible as regards what is lawful.
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.