The only case when "cuánto tiempo hace que no estudiaste medicina" makes sense to me is what I said before: For some reason Oldman wanted to study medicine ten years ago, but he decided against it and changed his career. Since that decision shows effects still today, Oldman's good friend Angélica is in the mood of reminding him of his life choices and is asking him how long ago he made such decision.
It's alright that you don't pay much attention to using this combination, but just keep in mind how it is constructed, for future reference.