WHEN Scottish health boards could not find the doctors they needed at home, they used to have a solution.

Middle-grade posts in particular – vital for ensuring patients are looked after at night – could be filled from abroad.

Dr Andrew Eccleston, workforce officer in Scotland for the Royal College of Paediatrics and Child Health (RCPCH), said: "If you did not have enough staff grade doctors you would advertise all over the world and they were attractive jobs. People wanted to do them."

Then, in 2006, Westminster abruptly changed the immigration rules, and recruiting from outside the European Union became much more complicated.

At the same time, other factors – such as more women pursuing medical careers and European legislation restricting how many hours junior doctors are allowed to work – had an impact.

According to the RCPCH, the number of junior doctors being trained as paediatricians has not been increased to plug the consequential gaps in the workforce.

That, they say, is why managers in Scotland are finding it so difficult to fill those positions between junior doctor and consultant level, which ensure a medic with experience in paediatrics is available in the hospital at night.

Junior doctors who are well on their way to becoming children's specialists, along with some who have chosen to stick at middle grade, usually do a significant amount of frontline work including being the most senior figure on site after dark.

Policy makers have talked about the need for the service to be delivered by fully-trained doctors, not those still learning their craft on their route to becoming a consultant.

However, such trained doctors need to be available to do the work if this aspiration is to have any meaning.

The current system, Dr Eccleston argues, is not set up to produce enough of them.

A report by NHS Scotland's South East and Tayside regional planning group has already warned the children's ward at St John's Hospital in Livingston, which had to shut for three weeks last summer due to workforce issues, is likely to collapse again and that the Borders General service is also vulnerable.

The Herald's survey of health boards shows reliance on locum cover to fill what were intended to be core staff jobs is far more widespread.

The reasons for this situation have been aired over and over again, but concrete solutions appear to be missing.

Meanwhile there are children with health problems in Scotland whose parents rely on safe, sustainable, expert medical attention, 24/7.