A health watchdog has sent a damning report to NHS Lothian about the treatment of patients with dementia symptoms at the Royal Edinburgh Hospital.
It comes just months after figures revealed hospitals were finding it harder to discharge patients. In February, it emerged the number of patients stuck in hospital beds for weeks because of care shortages in the community had risen 165%.
The Mental Welfare Commission document raises concerns that people are spending months on the Royal Edinburgh's wards with little to do there, leaving them in a distressed state, because of the lack of care homes.
Staff shortages and the prescription of powerful sedatives to patients are also highlighted as issues in a covering letter to NHS Lothian chief executive Tim Davison.
Relatives of Peter O'Malley, of Haymarket, who died at the Morningside hospital, obtained the documents under Freedom of Information legislation. Edinburgh Carers Council, an independent advocacy service, has also written to the hospital's management with its concerns about the wards.
Catherine Thompson, Mr O'Malley's daughter, said: "My father experienced significantly poor care while trapped in that hospital. His clothes were lost and he suffered repeated falls. Other families and vulnerable elderly people should not have to share our experiences. They deserve to be treated with dignity."
She called for urgent action, including an inspection.
Mr O'Malley died last October. He had been admitted to the hospital in the summer.
In January, Edinburgh Carers Council sent a statement to management amid concern about patients being dressed in other people's clothes and the restricted environment.
The commission, which expects NHS Lothian to act on its report, visited Royal Edinburgh's Ward 14 and Canaan Ward, where dementia patients are assessed.
Dr Donald Lyons, the then chief executive of the commission, wrote to Mr Davison about its findings in March. The letter said: "We found very poor evidence of activity provision, a serious concern about the high number of people who appeared to be 'delayed discharges' and significantly poor care, apparently due to lack of staffing."
Two patients were still in bed at lunchtime because staff "just had not had time to get them up yet", according to the report.
It notes 15 out of 20 patients on Ward 14, the male ward, and seven out of 20 on the female ward should have been discharged but were waiting for community care to be organised. The report continues: "There seems to be a crisis in Edinburgh at the present time in progressing patients on to suitable nursing homes, particularly for men." One patient was said to have been in the hospital for nine months.
In addition the commission was told the hospital had not had a patient activity co-ordinator for more than a year. The report says it was told lack of "structured activity and boredom" was leaving patients more distressed.
Dr David Farquharson, medical director of NHS Lothian, said: "We met Mr O'Malley's family and apologised for our failings in the care he received.
"The commission has made recommendations … and we have begun implementing these as a matter of urgency.
"We recognise the site needs to be developed further and plans to provide a state-of-the-art facility are progressing well, with the first phase due to be complete by the end of 2016."