Praise be to Allah.
This question covers three topics:
1-The ruling on a pregnant woman breaking her fast in Ramadaan
2-How a miscarriage in Ramadaan affects a woman’s fast
3-The ruling on making up fasts after Ramadaan
With regard to the pregnant woman: it is permissible for her not to fast if she fears some harm which she thinks will most likely affect her and/or her baby. Breaking the fast becomes obligatory if she fears that she may die or be severely harmed if she fasts. In that case she has to make up the fast later on but she does not have to pay the fidyah. This is according to the consensus of the fuqaha’, because Allaah says (interpretation of the meanings):
“And do not kill yourselves”
“and do not throw yourselves into destruction”
The scholars are similarly agreed that it is not obligatory to pay the fidyah in this case, because a woman in this case is like one who is sick and one who fears for his life.
If the woman fears for her baby only (and not for herself), then some of the scholars are of the view that it is permissible for her to break her fast, but they say that she must make up the fast later on and pay the fidyah (which means feeding one poor person for each day not fasted), because of the report narrated from Ibn ‘Abbaas concerning the verse (interpretation of the meaning):
“And as for those who can fast with difficulty, (e.g. an old man), they have (a choice either to fast or) to feed a Miskeen (poor person) (for every day)”
Ibn ‘Abbaas said: This is a concession allowed to old men and women, who can only fast with difficulty; they are allowed to break the fast and to feed one poor person for each day of fasting missed. This also applies to pregnant and nursing women, if they are afraid.” Abu Dawood said: “i.e., if they are afraid for their children, they may break the fast.” (Narrated by Abu Dawood, 1947; classed as saheeh by al-Albaani in al-Irwa’, 4/18, 25).
(See al-Mawsoo’ah al-Fiqhiyyah, 16/272)
Hence it is clear that if fasting will cause great harm to a woman or to her baby, she is obliged to break the fast, on condition that the doctor who states that fasting will cause harm is a doctor who can be trusted.
This has to do with breaking the fast during Ramadaan. With regard to ‘Aashoora, fasting on this day is not obligatory, according to scholarly consensus; rather it is mustahabb, and it is not permissible for a woman to observe a naafil fast when her husband is present, except with his permission. If he tells her not to fast then she has to obey him, especially if that is in the interests of the foetus.
With regard to miscarriage: “If the matter is as mentioned, that the miscarriage occurred in the third month of pregnancy, then the blood that comes out is not considered to be the blood of nifaas (bleeding following childbirth), rather it is the blood of istihaadah (non-menstrual vaginal bleeding), because what the woman passed was a clot (‘alaqah) in which there were no human features. On this basis, she should pray and fast even if she sees some blood, but she should do wudoo’ for each prayer, and she has to make up the days when she did not fast and the prayers that she missed.”
(See Fataawa al-Lajnah al-Daa’imah, 10.218)
With regard to the fasts that she has missed: “Everyone who owes fasts from Ramadaan has to make them up before the next Ramadaan. He may delay that until Sha’baan. But if the next Ramadaan comes and he has not made them up and had no excuse for that, then he is guilty of sin and he has to make them up as well as feeding one poor person for each day, as was stated by a number of the Companions of the Prophet (peace and blessings of Allaah be upon him). The amount to be given is half a saa’ of the local staple food for each day, which may be given to a number of poor persons or to one. But if a person had an excuse for delaying making up the fasts, because he was sick or was travelling, then all he has to do is to make up the missed fasts, and he does not have to feed the poor, because of the general meaning of the verse (interpretation of the meaning):
‘but if any of you is ill or on a journey, the same number (should be made up) from other days’
And Allaah is the Source of strength.”
(Fataawa al-Shaykh Ibn Baaz, 15/340)