Answer
(Fatwa: 2319/H=729/th=1431)
If you had to take medicine in severe pain and there was no way except it then you should keep one fast with the intention of qaza, there is no kaffarah in this case. In the same way, you have to do qadha of all other fasts that you missed; there is no kaffarah in this case too. And if only injection is given during the fast, it does not nullify the fast, however it broke due to consuming medicine though this medicine had any effect or not.
Allah (Subhana Wa Ta’ala) knows Best
Darul Ifta,
Darul Uloom Deoband