It's hard to believe, with the huge baby boom generation and the impending new federal health care law driving up demand for physicians, that just over 15 years ago the Association of American Medical Colleges and the American Medical Association complained to Congress that there were too many doctors.

Self-interested advocacy by the doctors and the medical schools contributed to federal law that is at the root of a major problem - too few residencies for qualified medical school graduates.

After receiving medical degrees young doctors must serve residences, usually at teaching hospitals, before they can practice on their own.

The Commonwealth Medical College in Scranton is among the first of a new wave of schools meant to relieve a doctor shortage. But there are not enough residencies to enable new graduates nationwide to work their way to full practice. A record 1,097 medical school graduates were not matched to residences this year, a 29 percent increase over 2012. The gap will grow because new medical schools and larger classes in existing schools are producing more graduates while the number of residencies remains stagnant.

Graduates who are not matched are left with a fine education but an average of more than $200,000 in debt and no way to pay it. Those who aren't matched to a position usually can't get one in the following year, when another medical school class will graduate.

That's a tragedy for the graduate and for the society, since it leaves a prospective young doctor on the sidelines rather than practicing.

Back in 1997, the AMA and the medical school group urged Congress to reduce the number of residencies from 25,000 to 18,700 a year, even though demographic trends predicted the need for more physicians. Congress was eager to comply, since Medicare helps to fund the residencies.

"The United States is on the verge of a serious oversupply of physicians. The current rate of physician supply ... is clearly excessive," the AMA, the AAMC and several other groups said in a joint statement in 1997. The AMA denied that it was trying to hold down the number of new physicians to maintain existing physicians' salaries. Congress accepted the analysis, even though the United States at that time was importing about 8,000 foreign doctors a year.

Congress froze the number of residencies in 1997. That needs revision.

Rep. Allyson Schwarz, a Pennsylvania Democrat, and Rep. Aaron Schock, an Illinois Republican, introduced a bill in March to increase the number of residencies by 15,000 over five years, at a cost of about $1 billion a year.

Congress quickly should pass the bill to ensure that the new generation of prospective physicians is able to meet a pressing need.