Sheikh Yusuf Al-Qaradawi, states that: 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 patient is allowed not to fast in Ramadan. But, the question now is ‘which kind of illness permits a Muslim to abstain from fasting’.
the answer to this question is that any malady that fasting may aggravate or delay the cure of, permits a Muslim to break the fast. Similarly, when fasting causes the patient to go through tremendous pain so that he would be unable to perform his job and earn his living, he is allowed not to fast. Imam Ahamd was asked: When is a patient allowed not to fast? He answered: If he is not able to fast. He was again asked: Is a man afflicted with fever unable to? He replied: What malady could be more serious than fever?
as a matter of fact, types of illness differ in nature; some are not affected by fasting, such as a toothache, a finger wound, a small abscess and the like. Fasting could cure many diseases like stomach diseases such as indigestion, diarrhea, etc. These are diseases that do not permit one to refrain from fasting, as it is in the patient’s best interest in such cases to fast.
A 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 Muslim physician whose knowledge and honesty is trusted. So should a trustworthy Muslim physician warn him that fasting would harm him, a patient is allowed not to fast. Besides, if a Muslim is permitted to abstain from fasting but he still insists on fasting, he has committed a blameworthy act since he has harmed himself and refused to accept Allah’s dispensation (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.
Furthermore, is a patient allowed to pay charity in return for the fast-days he missed on account of his malady? An illness is of two kinds:
1. A temporary illness, of which a patient expects to be cured. In this case, a Muslim is not to pay a charity or a ransom but must make up for the fast-day he missed, as Allah, Exalted be He, says: ((Let him fast the same) number of other days.) 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 fast-days he missed later when Allah grants him health.
2. 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 physician’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. According to some jurists, such as Abu Hanifah, he may pay the worth of a meal to the poor, the weak or the needy.
as regards a pregnant woman or a suckling mother, if she is worried lest fasting should harm her, the majority of jurists are of the view that she is allowed not to fast, provided that she makes up for the fast-days she missed. A woman in either of those cases is similar to a patient.
though jurists have unanimously agreed that a pregnant or a suckling woman who apprehends harms to her embryo or her new-born child is allowed to abstain from fasting, they have disagreed as to whether she must make up for the fast days she missed later, or feed one poor person for each day she missed or both. Ibn `Umar and Ibn `Abbas maintain that she is to feed poor people equal in number to the fast days she missed. The majority of scholars are of the view that she must make up for the fast days she missed. Others yet hold that she is to do both. It seems to me that only feeding the poor is enough on its own for a woman who is constantly either pregnant or suckling, so that she has not got an opportunity to make up for the fast days she missed. So it may be the case that a woman is pregnant this year and a suckling mother the next and pregnant again the following year, and so on. She is therefore unable to make up for the fast days on which she refrained from fasting. So if she is commanded to make up for those days, she will have to fast for several years incessantly, which is definitely going to be difficult, and Allah does not want His servants to suffer hardships.