All perfect praise be to Allah, the Lord of the worlds. I testify that none is worthy of worship except Allah and that Muhammad, sallallaahu ‘alayhi wa sallam, is His slave and messenger.
Before answering your question, we draw your attention to the fact that Sharee’ah rulings are not taken from doctors; rather, they are taken from the people of knowledge and the carriers of the Sharee’ah, who are the inheritors of the Prophet, sallallaahu ‘alayhi wa sallam, in conveying the religion to his nation. Doctors are asked about the condition of the illness and whether fasting harms the patient or not. Moreover, we would like to gently blame you. Our intention is compassion and keenness on your interest; what made you wait for three years without asking about what you should do sufficing with the statement of the doctor who has no authority to give a Fatwa?
Now that you have asked, know that it is obligatory on you to make up for the days that you missed because you had an illness that was hoped to be cured. Allah Almighty says (what means): {So whoever among you is ill or on a journey [during them] – then an equal number of days [are to be made up].} [Quran 2: 184] Besides making up for those days, you must feed a needy person one mudd (0.75L in volume) of food for each day for having delayed making up for them. This is the opinion of the majority of the scholars, contrary to Abu Hanifah . The evidence of the majority is the Fatwa of Abu Hurairah, Ibn ‘Abbaas and Ibn ‘Umar. We do not know of a Companion who said the opposite.
Your previous feeding of the needy does not avail you because at the time of feeding them, you had not yet delayed making up for them. Thus, feeding was not yet obligatory on you. An act of worship may not be done before it becomes due in one’s liability.
Allah knows best.