The last time I had my menses was in 28/08/2004. After my period had ended, I went to see the doctor. That was a short while before the next period was supposed to start. I went to the doctor because I felt like I was pregnant, which turned out to be correct. According to the doctor, my pregnancy started on 10/9/2004. I went to see the doctor again in 10/11 for check-up. Having examined me, the doctor discovered that the fetus was no longer alive even though it was formed. She advised me to undertake a uterine cleaning surgery within a week at maximum.
I was afraid of having a dead fetus inside my belly. Therefore, I went to the hospital the following day in order to undergo the surgery. This was on the 27th of Ramadan. I am worried that I may have committed a sin for breaking my fast during the remaining three days of Ramadan given that I could have delayed the surgery. I am currently experiencing bleeding and the doctor told me that the fetus was already formed. What should I do? Should I pay an expiation for the days that I have missed? As for prayers, should I currently pray even though I am experiencing bleeding? I would like to inform you that the bleeding that I am having is not due to menstruation; rather it is resulting from the fetus' death, even though it has the color and smell of menses.
All perfect praise be to Allaah, the Lord of the worlds. I testify that there is none worthy of worship except Allaah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and messenger.
There is nothing wrong in your undertaking the surgery in Ramadan in order to take out the dead fetus, since you had to. As for the three days of fasting that you have missed, if you were unable to fast and refrained from fasting because of this reason, then you are not blamed for doing so. This is because you are excused due to your inability to fast. In addition, Allaah permits the sick to break their fast. However, you need to make up the three days that you have missed. Concerning the blood that has been coming out after the surgery, it is neither menstrual nor postnatal blood.
Allaah Knows best.
You can search for fatwa through many choices