The doctor thought that it's very dangerous but the fact that he stayed alive shows that the doctor was somewhat wrong. (you could say that has nothing to do with you, you have to listen to the doctor and if you didn't it is not a mitzvah).
ב"ה ז"נ יונה שלמה ב"ר אברהם יוסף ז"ל Shalom The fact that it turned out that the doctor was mistaken, adds another dimension to the question. In the Shut Sharaga Hameir ( ח"ה סי' פד,) it states that in a case in which a doctor told a person not to eat Matza or Maror , but the patient went ahead and ate them anyway, and no harm came to the patient, although he wrongly ate the Matza and Maror, since it became clear that the doctor's estimate was wrong, the person was actually "yotze." (See also ראה פסקי תשובות סי' תע"ג, סע' י"ט, 111 and שו"ת מהר"ם שיק אורח חיים סימן רס ד"ה ופרק י' .. All the best