In the 19th century, psychiatric institutions were little better than prisons for people with mental health problems.

Thankfully, society and medical science have moved on leaps and bounds since then and there is now a very different ethos surrounding the care of such patients.

Yet there is a disturbing echo of the days when patients were kept corralled behind high walls in today's damning report by the Mental Welfare Commission (MWC). It shows that elderly patients with dementia in Scotland are still liable to be trapped indoors in specialist wards for weeks on end. More than half had not been outside for more than a month when commission staff visited them, even though it was summer. Some cannot even see outside because windows are positioned too high up, as in a prison cell. One man told the team that his wife had had no fresh air in two years.

The team found a poor standard of care in many of Scotland's 52 continuing care dementia wards, few activities for patients, and an over-reliance on anti-psychotic medication. Overall, a picture emerges of many patients stuck for hours day after day with little or nothing to do, often chemically subdued, unable in many cases even to enjoy a simple a walk around the block, and being allowed instead to atrophy physically and mentally. As Dr Gary Morrison of the MWC makes clear, anti-psychotic drugs should be used as a last resort and should be carefully and regularly reviewed, but there appears to be a habit in many places of putting patients on these drugs and leaving them there. This could be, unofficially, because they make patients easier to handle, but that is no basis on which to put an elderly person on drugs that can have serious side effects.

The report comes a fortnight after the Royal Edinburgh Hospital was sharply criticised by the MWC for poor standards of care, including the use of powerful sedatives on pensioners, patients being left in bed at times until lunchtime and patients being stuck in the hospital because of a lack of community care provision.

Altogether, the way many patients with dementia are being cared for in these wards falls far short of the ideal of person-centred care the Scottish Government espouses. Patients are being badly let down.

The Commission makes 20 recommendations, some of which are shockingly basic, such as that patients should be taken outdoors, the importance of reviewing medication every three months and taking a person-centred approach to care. Clearly, every health board and ward concerned must act immediately on those recommendations, but the underlying causes of substandard care must also be tackled. Alzheimer Scotland believes that the root cause of this problem is a lack of resources. That simply cannot be ignored. The Herald's Time for Action campaign has been calling for an honest debate on funding for the NHS and social care services in the face of a growing elderly population, but health boards and ministers must look again right now at staffing levels in these wards and be prepared to act immediately to boost numbers.