Praise be to Allah.
Allaah has permitted the sick to break the fast in Ramadaan and make it up later on, as He says (interpretation of the meaning):
“So whoever of you sights (the crescent on the first night of) the month (of Ramadan i.e. is present at his home), he must observe Sawm (fasts) that month, and whoever is ill or on a journey, the same number [of days which one did not observe Sawm (fasts) must be made up] from other days”
This applies if the sickness is one from which it is hoped that the person will recover. If the sickness is one from which there is no hope of recovery – in the doctors’ opinion – then he may break the fast and feed one poor person for each day.
This has been discussed in the answer to question no. 37761.
If a sick person does not fast, and his sickness is one from which there is no hope of recovery, and he feeds one poor person for each day, then Allaah heals him, he does not have to make up the fasts, because he did what was required of him, and he discharged his duty thereby. See al-Insaaf (3/285).
Shaykh Ibn ‘Uthaymeen (may Allaah have mercy on him) was asked: If a person recovers from a sickness that the doctors previously stated it was impossible to recover from, and that is after several days of Ramadaan have passed, is he required to make up the previous days?
He replied: If a person does not fast in Ramadaan because of sickness for which there is no hope of recovery, either because this is the usual pattern with that sickness or because trustworthy doctors have stated that, then he has to feed one poor person for each day. If he does that, then Allaah decrees that he should be healed after that, he does not have to make up the fasts for which he fed the poor, because his duty was discharged when he fed poor persons instead of fasting.
If his duty has been discharged, then it is not followed by another obligation. This is like what the fuqaha’ (may Allaah have mercy on them) mentioned about a man who is unable to perform the duty of Hajj because of a reason for which there is no hope that it will end, and someone does Hajj on his behalf, then he recovers after that: he does not have to do the obligatory Hajj again. End quote from Majmoo’ah Fataawa al-Shaykh Ibn ‘Uthaymeen (19/126).
We praise Allaah for having healed you and we ask Him for more of His bounty for us and for you.
And Allaah knows best.