IF you suffer a stroke, develop diabetes or struggle with asthma there are a whole range of guidelines describing how, ideally, you should be treated, no matter where you live.

The National Institute of Clinical Excellence, Nice, which produces some of the best known, is almost a household name. Should a charity, campaigner, patient or politician discover a variation in services - the frequency of check-ups perhaps or access to specialist nurses - it is condemned as a postcode lottery.

When it comes to looking after the frail elderly in the community, however, people at all levels keep saying that "local solutions" are best.

Apply this term to a medical problem and it is laughable. How do you want your heart attack patients to be looked after in Scotland Health Secretary? "Oh, we think there should be local solutions with each area setting its own priorities."

OK, so heart attack patients as a group will have more in common with each other when it comes to biology and symptoms than the entire frail elderly population. I see that it might be more difficult to prescribe the urgent and long term care needs of an 81-year-old who has fallen twice in that last two months. There are potentially so many other factors which affect what she needs. Does she live alone? How good is her eyesight? What medications is she taking?

But the same is true of all patients to some degree. Two-thirds of patients admitted to hospital are over the age of 65, so the complications of later life are hardly unique to the community.

Caring services are often seen as the softer side of healthcare. While patient safety programmes - a field in which Scotland is a leader - have focused on ensuring that all inpatients receive the same tried and tested approaches, community care has been treated like a council problem along with refuse collection, leisure facilities and street lighting.

But for the frail elderly - and particularly those with dementia - a hospital admission after a fall can be as serious as a heart attack or a brain haemorrhage. They may never fully recover from the side effects of a pre-longed spell on the wards - it could even be fatal.

Plus there is the impact on the entire hospital system. Patients who need to wait in hospital while additional care is arranged for them in the community fill much needed beds.

This week Scottish Health Secretary Shona Robison announced £100m to tackle this very problem, which is sometimes known as bed blocking. This money will be given to the new council and NHS partnerships which have to take over the management of social care services from April. In addition the minister promised a taskforce to support areas in making the improvements necessary. But the same practical support was not promised for preventing vulnerable pensioners being admitted to hospital in the first place. This task needs to be treated like a medical ailment, a bit like preventing someone with heart disease having a heart attack. We need a clear picture of what services are in place, high quality research on what is working and national leadership to make preventing problems in old age a high priority. There will always be some local differences - but we must not use them to duck national problems.