A major crisis in how NHS trainee doctors are appointed seems to have been averted, but medics say the system is still "a bit of a disaster".
The new online method of selecting junior doctors for specialist posts had been heavily criticised for failing to select the best candidates.
A review has now said doctors in England should be guaranteed an interview for their first-choice job.
But the British Medical Association says this is "far from perfect".
Dr Tom Dolphin, of the BMA's junior doctors committee told BBC Radio 4's Today programme that, even so, the system is "better than it was".
He said the solution was a case of "salvaging something from a disastrous system."
Earlier this week, health secretary Patricia Hewitt apologised about the situation.
The independent review group, including doctors' representatives, examined flaws in the online application process, part of the Modernising Medical Careers (MMC) programme which cuts the length of doctors' training.
The head of MMC, Professor Alan Crockard, resigned at the weekend over the chaos caused by the introduction of the online system.
It was designed to speed up the selection process, but doctors said the forms were badly worded, did not ask pertinent questions or allow them to set out relevant qualifications and experience, and had no facility for attaching a CV.
This resulted in many doctors not being selected for their first-choice hospital, and a significant number not getting any interviews at all.
Modernising Medical Careers was introduced to speed up doctors' training - from 14 years to 11
Its online application process was criticised for failing to select the best candidates, with many not getting interviews
Doctors can now select a new first choice - and are guaranteed an interview
A new type of training post will be created for surgeons, due to excessive demand for places
The review group had previously said all doctors should be guaranteed just one interview at one of their four choices, but doctors said that was "unacceptable", as it penalised those successful candidates who had been offered interviews at all four.
The new agreement means doctors will be able to attend them all.
In addition, all applicants will be able to select a different hospital as their top choice if their original option was over-subscribed, and will be guaranteed an interview at that hospital.
In its final report, published on Wednesday, the review group said it was not possible to scrap the online system completely as some doctors have demanded because trainees had to be in post on August 1.
Anyone who is unsuccessful in the first round of interviews, will be able to apply during a second round, which will select people in the traditional way of assessing CVs.
In surgery, where a large number of people are applying for a small number of posts, new "transitional training posts" are to be created so that doctors can continue to progress.
'A difficult time'
Professor Neil Douglas, chair of the review group, said: "I am pleased that the colleges and BMA have agreed a joint way forward which will allow the best applicants to obtain training posts."
Dr Jonathan Fielden, chairman of the BMA consultants committee, said: "Having heard the major concerns of the profession and considered all available options we have now produced a practical solution deliverable in England."
He said the review group had recognised the "major distress and anxiety this process has caused".
But he said the solution "allows us all to move on and appoint the best candidates to the right posts to train and enable them to treat patients."
Dr Jo Hilborne, chairman of the BMA's junior doctors committee said: "The last few weeks have been an extremely difficult and stressful time for applicants.
"We have worked hard to find a practical way forward which treats applicants fairly."
Health minister Lord Hunt said: "I appreciate that this has been a very difficult time for junior doctors.
"We all want a transparent and fair recruitment process that allows us to recruit and train the best doctors for the benefit of patient care."