Changing the way older people are cared for in Scotland so that more are looked after in the community rather than hospital was never going to be easy, but there is increasing evidence that the Scottish Government's flagship policy on community care is failing in the most fundamental ways.

As The Herald reveals today as part of the NHS: Time for Action campaign, patients with long-term health problems are in some cases having to wait months for the rehabilitation services they need to help them live independently in the community.

The good news is not every health board is failing. Ayrshire and Arran says it has no waiting lists for rehab services, and NHS Lanarkshire says it sees everyone in under five days, but elsewhere, the picture is much less satisfactory. In some cases, patients have to wait as long as 36 weeks before receiving a visit from staff trained to help them look after themselves and therefore stay out of hospital.

The consequences for the individuals concerned are serious enough, with Dr Jason Long, chair of the College of Emergency Medicine in Scotland, pointing out that a lack of good rehab advice can be the difference between staying at home or ending up in hospital.

But what is also worrying is how patchy the data is. The Herald obtained the information on rehab services through freedom of information requests, but some health boards said they were unable to answer the questions. This means it is hard to obtain a coherent, nationwide picture of how care in the community for older people is working, but it also makes it harder to develop coherent, nationwide policies and strategies to tackle the issue. Professor Paul Knight, president of the British Geriatrics Society, has called for comparable figures to be available nationwide and the Scottish Government should answer that call.

As for the basic principles of the policy on care in the community for older people, they remain sound. The aim all along has been to allow older people to live in their homes for as long as possible and not only is that often best for the individual (provided they get the support they need in their homes), it can also help prevent spells in hospital, which put extra pressure on the system.

However, if some health boards are struggling to deliver the policy, there needs to be an honest discussion among politicians and health professionals about where the system is failing and a more honest debate in Scottish society as a whole about how to fund that system, including the possibility of raising taxes.

The need for this discussion is now urgent, but it will become even more so as Scotland's population continues to age. The waiting times for rehab services is one sign that the system is not coping in places, but there are others, including the rise in the number of people waiting in hospital for suitable care in the community (so-called bed blocking).

All of these issues should be addressed as part of improved monitoring of what does and does not work in the NHS, and that needs to include a review of community care capacity to determine how it is working and where it needs to be expanded. Care in the community should be one of the best parts of the NHS but it is one of the weakest. Only a thorough, nationwide review can begin to turn that around.