While I was praying my daughter 3 months of age started choking there was no one at home except for me so I had to stop my prayer to come to her aid is this haram what I had done or in emergency cases like this is it okay to stop your prayer.
What you did was not haraam and was not a sin in fact it was obligatory (waajib) upon you, because this comes under the heading of saving lives which is encouraged in Islam.
Allaah says (interpretation of the meaning):
“… and if anyone saved a life, it would be as if he saved the life of all mankind …” (al-Maa’idah 5:32)
It was reported from Ibn ‘Abbaas, from Murrah al-Hamadaani, from ‘Abd-Allaah and from a number of the Companions of the Messenger of Allaah concerning the Tafseer of this aayah: “…and if anyone saved a life means, saved someone from death, it would be as if he saved the life of all mankind in the eyes of the person whose life was saved.” (Tafseer al-Tabari, 6/199)
Saving the life of a person whose life is protected in sharee’ah is obligatory (waajib) on whoever is able to do so. Saving a life is one of the five essentials which Islam came to protect (they are, life, sanity, wealth, religion and lineage). With regard to the prayer, you have to repeat it after you have helped the child.
The scholars said: it is obligatory to stop one's prayer in order to save a negligent person from a fatal accident.
For example, if you are praying and you see a snake approaching a man who is sitting down and has not noticed it. If it is heading for him, you have to stop your prayer and tell him so that he will not be bitten, possibly fatally. Or if you see a blind man walking in front of you whilst you are praying, and he is heading towards a well, and you are afraid that he may fall into it, then you have to stop your prayer and save him from that fatal accident, even if this means stopping your prayer.
The same applies in cases of fire, etc.