Funny... in the original series, he often insisted that while he was a doctor of many things, medicine was not among them. I guess he got a medical degree sometime between the two series.
From The Moonbase
POLLY: Listen, are you really a medical doctor?
DOCTOR: Yes, I think I was once, Polly. I think I took a degree once in Glasgow. 1888 I think. Lister. Hold that for me, will you?