While doing her MD 'by the way' can be considered unlikely in general, she could have been in training for decades. One of the parallel timelines in TNG "Parallels" showed her as CMO.
Also, Nurse Chapel became a doctor and was undergoing her training during the late 5YM according to the novels (not sure, either That Which Divides
, Allegiance in Exile
or Shocks of Adversity