There are serious problems brewing in the staffing of A&E departments.

The Herald reveals today that two thirds of vacancies for junior doctors in A&E are unfilled, with only six out of 21 posts taken.

The picture has apparently worsened considerably since 2011 when around one-third of these vacancies were unfilled.

Acute medicine departments are also struggling to recruit, though doing somewhat better than A&E.

This begs the question of what it is about emergency medicine that is putting off hard-working young doctors. Is it seeing A&E consultants run ragged in busy emergency departments? Is it a sense that, because of the anti-social shifts, this specialism should be better remunerated than it is? Is it a worry about how much more pressure the system might come under in future as the population ages, allied with a lack of faith in politicians to ensure there are enough staff to cope?

Probably it is a combination of all of these things. Accident and emergency departments are in the NHS frontline and staff there have been among the first to feel the impact of growing demand from patients as the population ages. "Senior juniors" are a mainstay of these departments, particularly during evening and weekend shifts. It is not hard to see how stressful this typically high-pressure work has the potential to be.

Clearly leaving so many vacancies unfilled is not an option. It is the responsibility of health boards to ensure that staffing never reaches dangerously low levels and vacancies may of course be filled by locums on a short-term basis, but there is nevertheless an obvious risk of doctors being overburdened. The only way to attract more young doctors to take up A&E as a specialism is to make it more attractive.

The Scottish Government in its response to the latest vacancy figures does not specify how it will tackle the problem, but there are steps that could be taken. Dr David Reid, chairman of the British Medical Association's Scottish Junior Doctors' Committee, highlights the demands of the specialism and the lack of consideration for the work-life balance of young doctors in the way rotas are drawn up.

Every medical specialism has its challenges, of course, but Dr Reid's suggestion of offering incentives or enhanced contracts to doctors in A&E and acute medicine in recognition of the unappealing shift patterns they face, is entirely reasonable. Negotiations to bring this about are currently taking place, but it might be possible, for instance, to offer junior doctors extra funding for training.

The Herald has been running a campaign calling for a review of NHS and social care staff and resources, including doctor numbers, to ensure that the right number and type of staff are in the right places to cope with the growing elderly population. If such a review were carried out today, it would likely highlight A&E as an area of serious concern. Innovative approaches are needed right now to make emergency medicine much more attractive.