Fasting in Ramadan is an obligation upon every accountable Muslim, and no one is excused from fasting at the time of fasting except for those who have valid excuses such as the sick. There is a unanimous agreement among Muslim scholars that a Muslim is allowed not to fast in Ramadan if he or she is sick.
The Islamic Religious Council of Singapore issued the following fatwa: Scholars have unanimously agreed that a patient is allowed not to fast, as Allah, Exalted be He, says: (Whosoever of you is sick or on a journey, (let him fast the same) number of other days. Allah desireth for you ease; He desireth not hardship for you) (Al-Baqarah 2:185). Based on both the Glorious Qur’an and the unanimity of Muslim scholars, a Muslim is allowed not to fast in Ramadan if he or she is sick.
The Muslim is allowed to abstain from fasting when fasting is feared to bring about harm. Should a healthy person fear to fall ill because of fasting, he is permitted not to fast. This could be determined through two ways: either via personal experience or on account of the advice of a reliable doctor whose knowledge and honesty is trusted. So should a trustworthy (preferably Muslim) doctor warn a patient that fasting would harm him, the patient is allowed not to fast. Besides, if a Muslim is permitted to abstain from fasting but still insists on fasting, he has committed a blameworthy act since he has harmed himself and refused to accept Allah’s dispensation or rukhsah. So even if a Muslim fasts and abides by rules of fasting, he has thus committed an unlawful act, should he end up harming himself.
If the illness is temporary, of which a patient expects to be cured, then he is not to pay a charity or a ransom but must make up for the days of fasting he missed, as Allah, Exalted be He, says: ((Let him fast the same) number of other days) (Al-Baqarah 2:185). So, if he were unable to fast for a month, he is to fast for a month later. If he were unable to fast for a certain number of days, he is to make up for the exact number of fasts he missed later when Allah grants him health.
The second type of illness is the chronic illness, of which a patient does not expect to be cured. This can be determined either by personal experience or through the doctor’s advice. Thus the Islamic legal ruling of an elderly man or woman similarly applies to a patient suffering from a chronic disease. A patient in that case has to pay a ransom: to feed a poor person for each day missed. According to some jurists, such as Abu Hanifah, he may pay the value of a meal to the poor, the weak, or the needy.