It is an unwelcome anachronism, the shortage of beds in Scotland's hospitals.

In the early days of the Labour Government post-1997, stories about so-called bed blocking and of patients left for hours on hospital trolleys were depressingly commonplace. The picture improved as funding was pumped into the NHS, but what goes up has a habit of coming down and in the wake of the economic crisis hospital bed numbers have been falling. As they have done so, stories of long waits on gurneys in A&E have crept back into the news.

Since 2010 bed numbers in Scotland have fallen by 1420. Earlier this week the Royal College of Nursing Scotland revealed that nearly 90% of ward nurses said bed capacity in their hospital was under pressure, coming just a few weeks after the president of the Royal College of Physicians warned that overcrowding in hospitals could be contributing to the spread of infection.

Now Health Minister Alex Neil has signalled that the downward slide in bed numbers will stop and he is right to do so.

Speaking yesterday, he made the sobering point that the population of over-75s is set to double in just 20 years and that, even if policies designed to allow people to be cared for in their own homes were successful in cutting hospital stays among that group by 50% (a very big if), the same number of beds would be required just to stand still. In reality, hospital bed numbers will almost certainly need to rise.

Clearly if the erosion of bed numbers continued, it would eventually bring the NHS to the point of crisis. There is still good time to avert that and the Minister has taken an important first step. The longer-term aim must be to increase bed numbers when the current financial constraints have eased.

Caring for increasing numbers of elderly people at home helps to relieve the pressure on hospitals, certainly, but this is by no means a cost-free solution. The ever-increasing cost of free personal care is putting added pressure on taxpayers, rising to nearly £500 million at the last count, more than four times what it cost 10 years ago.

A long-term means of funding care of the elderly must be found. The Herald has long argued that the current approach to paying for personal care is unsustainable. Merely increasing the fiscal burden on working-age people, a falling proportion of the population with financial headaches of their own, would be apt to cause resentment. New approaches must be considered, including, perhaps, means testing.

There is no time to be lost. Bed shortages in the NHS and the rising cost of free personal care are reminders that the demographics of Scotland are changing fast. No more time can be lost in planning for the sustainable care of Scotland's vulnerable elderly population, whether in hospital, residential care or their own homes.