If a fasting person intakes nourishment or medicine either with or without water, his fast is invalidated. According to Shafi’i school, he needs only to reperform the fast. According to Hanafi school, though, he needs both qada of the fast and kaffarah. However, if he has taken the medication due to a reason which might make breaking the fast permissible, he needs only qada but not kaffarah.