I love this in theory, but there's a lot of externalities that prevent that from happening. Apologies if I'm missing something, I'm a medical student (soon to be resident) that tries not to think about this too hard. I've thought to comment on this in the past, as this conversation pops up on HN relatively often.
I think we need a solution to two problems: First, figure out how to pay people (the hospital, the students/residents themselves, and the hospital attending physicians who spend their time teaching) to train physicians. Second, figure out how many clinical/surgical encounters a physician in training needs to truly be competent when they complete their training. This is more of a problem for surgeons, as they need x number of cases before they feel comfortable doing that procedure on their own.
For the first problem, there are smarter people than myself who pose solutions. CMS (and DHHS) pay for most of this in the US, and is a fixed amount each year with few changes since 1995. So an obvious solution without trashing our current system would be to just have Congress authorize more funding, about $100k/yr/new resident they are willing to pay for. Hospitals should also consider adding their own funding to pay for more residency spots, which is already happening. Note that hospitals bid on the hahnemann hospital (drexel) residents for about the $100k asking price ($55m for ~550 residents).
For the second, you have to decide how many years you want doctors to be training for, at their reduced salary. If you increase training time, you can achieve the clinical/surgical volume needed to become proficient, at the risk of keeping residents at the hospital for longer than they really want. You could seek out more volume at satellite clinics, but then you force the trainees to have to travel, which makes that specific training program less desirable (at least, it does for me)
Grossly over-simplified, I know.