A care home has been fined £25,000 after a resident, 88, had to have her leg amputated when it became repeatedly stuck in bed safety railings.
Crosfield House, in Rhayader, Powys did not ensure safe use of the railings, which Barbara Humphreys got her leg trapped in six times in three months.
Ms Humphreys died from an unrelated condition days after the leg was removed in November 2018.
Merthyr magistrates heard of multiple failings in the home's use of railings.
The court was told the rails were introduced for Ms Humphreys in August 2018 to stop her falling out of bed and a health and safety inquiry revealed they were widely used in the 64-bed home..
Prosecutor Chloe Ward said guidance on the use of the rails was widely and freely available.
Despite this "no one at the home received appropriate risk assessment training" and no one reviewed their use.
Ms Ward said the Health and Safety Executive found "significant gaps being present between the bed-frame, the bedrail and mattress" on a number of Crosfield House's beds.
She said the six occasions Ms Humphreys', who had dementia and brittle bones disease, foot was trapped were preventable, and after the first incidents no review was done to see if the rails were appropriate.
Crosfield House admitted health and safety offences at a previous hearing.
District Judge Neale Thomas said: "It ought to have been obvious that the problem needed to be addressed and it was not properly addressed even when it was staring the company in the face.
"The risk was there for all to see and it was not dealt with."
Judge Thomas accepted the company had had no previous convictions and a good inspection record.
He said he was also sympathetic to the position the Covid-19 pandemic had left the firm in.
As well as the fine, he ordered Crosfield House to pay prosecution costs and a government surcharge.