The NHS is on the verge of a major staffing crisis, members of the House of Lords have warned.
The changes come into effect in August
In a report they say new EU rules on how long junior doctors can work could create serious problems for hospitals.
The warning follows a review of the European Working Time Directive, which limits the working week of most workers to 48 hours.
In their report peers said the UK was right to insist on workers being allowed to opt-out of the directive.
The European Working Time Directive was introduced in the UK in 1998.
But it did not cover junior doctors, not least because limiting their working week to 48 hours would have crippled many hospitals.
That is set to change in August when their working week will be limited to 58 hours. It is due to be reduced to 48 hours per week by 2009.
The government has been planning for the change for years. It has introduced a new contract for junior doctors, which limits their working week to 56 hours a week.
However, their plans have been thrown into disarray by two recent European Court of Justice rulings.
Judges have ruled that the time doctors spend "on call" in hospital must be counted as time worked.
The House of Lords report warns that these recent rulings means many NHS hospitals will fail to meet the deadline.
"These rulings mean that it cannot possibly comply with this directive by August," said Lord Williamson of Horton, who chaired the committee carrying out the review.
"We've been told that the effect would be tantamount to losing the equivalent of 3,700 junior doctors."
Health Secretary John Reid has written to the European Commission asking it to review the rules.
However, even if changes are agreed they are unlikely to be in place for at least two years.
Lord Williamson urged ministers to take action to ensure the NHS could cope after August.
"The UK Government and the Commission must work out a practical solution that improves working conditions for junior doctors over a more realistic timescale," he said.
"Patients' health must not be put at risk. Nor should NHS service or medical training standards suffer."
The Department of Health said it was urging hospitals to try to meet the deadline.
"Compliance with the Working Time Directive is still a legal requirement from August 2004," a spokeswoman said.
"Trusts need to do all they can to achieve compliance and seek to use this as an opportunity to introduce better and more innovative ways of providing services."
The British Medical Association warned the NHS had failed to plan for the change.
"The working time directive is going to have a massive impact on the NHS, and
more needs to be done to prepare hospitals," said its chairman Mr James Johnson.
"Trusts have to ensure that they comply without simply transferring workload to consultants and staff grade doctors, and without introducing working patterns that threaten the quality of medical training."
Shadow Health Secretary Tim Yeo said: "Too little, too late has been done to prepare the NHS for the changes."