Unfortunately, you haven't provided enough information here. What kind of medication were you on? What was your diagnosis? It would be best for you to see both your dermatologist and your family doctor for further review.
In my opinion, need to see your dermatologist again, a family practice physician or a hair restoration physician to determine the cause of the shedding. There are a plethora or reasons as to why your hair had dramatically and it may or may not ave been from the medication.
However for future readers it is noteworthy to mention that:
Hormone imbalances such as a Thyroid Issue. see Blog post
Life Situation Traumas
Many Prescription Medication
Well ... it would help if you can tell us what the medication was and what your diagnosis was. It would help even more if you ask this question directly to your doctor. Something about the events your describe do not make sense. Taking a medication that makes your hair loss condition worse for over a year. One would wonder why did you wait so long? Finally hairs do not grow back in 2 months. Hairs usually grow at a rate of 1cm a month. So you may have about 2.5 cm of hair growth (if the hairs did grow back).
If you picked a good doctor who seemed to know what was wrong with you, I can add little to your care or question about the medication which you did not specify.
Thinning Hair -- Rogaine, Propecia, Viviscal, Progesterone, PRPIf you have thinning hair you really need an evaluation to see if it is genetic or from another cause like stress or autoimmune. If it is determined to be genetic there are many options and traditional treatments like rogaine foam and propecia pills can be used. I have great success in my practice using injectable progesterone and prp to the scalp. Postmenopausal women also benefit from spironolactone. I suggest seeing a dermatologist with expertise in hair loss. Best, Dr. Emer.