All perfect praise be to Allaah, the Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad, sallallaahu ‘alayhi wa sallam, is His Slave and Messenger.
It is permissible for such a patient to break his fast and take the medicine if the next time when he must take the medicine is before the end of the fasting period, provided that it is certain or it is most likely that lengthening the period will aggravate the illness, delay recovery or cause a new illness.
Determining the consequences of this is to be made only by reliable and capable physicians.
However, if delaying the medicine for two or three hours will not affect the fasting patient, then it is impermissible for him to break the fast.
Allaah Knows best.