ARTICLE AD BOX
By Claire McAllister
BBC Scotland health producer
Many people who are medically ready to leave hospital are not able to go home because of pressures in social care.
Health and social care teams across Scotland are working to create more room in hospitals as we go into winter when it traditionally gets busier.
In Lothian, they are using care homes as an interim measure to help rehabilitate people before they can go back home.
Nineteen rooms at the Elsie Inglis Nursing Home in Edinburgh are being used in an effort to help people get out of hospital.
Archie McQuater, who spent seven months in The Royal Infirmary of Edinburgh after one of his big toes was removed because of an infection, has finally got out of hospital and is now staying at the Elsie Inglis.
The 94-year-old has been in the care home for two months and is trying to improve his mobility so that he can return home.
"I've got things that I want to do at home," he said.
"I'm teaching a young lad clock repairing. I've got a workshop at home and so he's actually doing all the work, I'm only discussing it with him."
Archie will need some help when he gets home with things like showering but would like to be as independent as possible.
He is increasing the amount he can walk and using dumbbells to improve his strength.
He had a teary goodbye with staff when he left the hospital after so long but he is glad to be off the ward and making his own cups of tea.
"It's a step forward," he said. "That's what I feel. And I would say I'm nearly ready to go home. I'm just waiting on a care package."
For his daughter Ruth, this time between hospital and home is welcome.
"It's been an absolute godsend for us as a family and for his independence because he's now able to walk around and interact." she said.
"He's gained strength and he's gained independence back again."
Archie is among 200 people in Edinburgh who have been moved from a hospital to a care home between November 2021 and September 2022.
NHS Lothian estimates it has saved about 13,000 bed days in hospitals during that time.
There are others in hospital who cannot go home because they cannot get the right care package. This is partly down to a shortage of carers.
Akbar Mir, the manager of Elsie Inglis Nursing Home, finds recruitment his biggest challenge.
Not a single nurse has applied for a job he has been recruiting for since July.
Mr Mir said: "It can be frustrating because obviously you want to provide a service and you have all the facilities but we need people to provide the service."
In recent weeks he updated job adverts and 80% of the applications came from abroad.
"Obviously we can't recruit them because they're abroad and there's a long immigration process," he said.
"The 20 people who apply from the UK, you set up interviews, and maybe five people turn up.
"So it's quite frustrating. Then you have to go back to square one again."
Many longstanding issues with recruitment and retention have been brought to the fore and worsened over the course of the pandemic.
Latest data from the Scottish Social Service Sector estimates the number of people working in the sector has seen a slight decrease between 2020 and 2021.
During that time, the largest fall came from staff working in care homes for adults.
The gaps in the workforce stretch existing staff.
Dianne Coleman, the advanced nurse practitioner lead for interim beds in Edinburgh, said the pressures were extreme at the moment.
"We've got nurses leaving every day so deflated because they want to provide care," she said.
"When you've got one nurse on for maybe 12 patients, you go home every night and you feel battered."
There are ongoing disputes over pay for nurses and other healthcare staff. Some unions are balloting for strike action. The Scottish government is offering these NHS staff a £2,205 pay rise.
Shortages in health and social care staff mean it can be difficult to provide for demand in their services.
There are record numbers of patients who are medically fit to leave hospital but who are unable to get discharged, often due to struggles finding a care package or space in a care home.
During Dianne's career she has seen how important it is for the recovery of patients to get off the ward and into a community setting.
"We are all trying our best in every sector to get these patients home where they want to be," she said.
"But actually what happens is they can't get home because we can't get the package of care for them.
"But we treat them as if they're at home. They can get whatever meals they want and every single patient that came here has actually put weight on. So I think that's a good bonus."