If the doctor undergoing higher professional training is to make best use of the attachment to a training location, and that training location is to make the most efficient use of the contribution of the trainee, then a written framework such as a learning contract can meet the needs of both. The first stage is to list the learning needs of the individual trainee and to match them with the work experience offered by the training location. Next, the work programme for the coming six to 12 months should be formalised in a learning contract, spelling out the tasks to be performed and the expected training benefit. This is then reviewed at agreed intervals and a written appraisal made. At the end of the attachment the trainee, trainer and any outside accrediting or auditing body, has a written account of what was expected, what was achieved, and the performance of trainee and trainer.