The Glorified Allah decrees that, the sick and ones whose illness will get worse upon fasting are permitted not to fast, but fasting would be better for them.
The sick and the travelers who do not fast should fast the same number of days at some other time. If they die without having the chance to fast they would not be responsible for that. There is no ransom for such people to pay, either.
For further information, please read our following fatwa: