No paper for ECG test before inmate death
Nurses at Dumfries prison were unable to carry out an ECG exam on an inmate with chest pains because there was no paper to print the results.
They could not get replacement paper as it was locked in a stationery cupboard and the keyholder was on holiday.
A fatal accident inquiry heard 27-year-old Andrew Hamilton, from Livingston in West Lothian, died six hours later.
Sheriff Brian Mohan said staff had acted in good faith but highlighted a "defect" in the working system.
Mr Hamilton died in October 2014.
He was pronounced dead on arrival at Dumfries Infirmary following a series of life-saving attempts by staff and paramedics after being found groaning in pain by a cellmate.
During the inquiry at Dumfries into the death of Mr Hamilton, it was shown that he suffered from chronic heartburn and was also diabetic and administered his own insulin daily.
Groaning in pain
Evidence was heard that he had complained of chest pains during the afternoon and initially declined the offer of medical attention but when he still complained of a "twisting or grabbing" type pain shortly after 17:00 it was arranged he visit the medical centre and nurses decided on the electrocardiogram (ECG).
However, they were unable to carry out the procedure because there was no paper.
The sheriff said: "Printing was necessary because the nurses were not trained to interpret the results of the ECG test and needed to fax the printed results to a doctor's surgery outside the prison."
Following the failure of the ECG, a consultation took place with the doctor by phone and it was decided to monitor the patient and when he later saw the nurse about 20:00 he seemed "brighter".
He had said that although he was still suffering chest pain, it had eased, and with his blood pressure remaining in the normal range the view was formed that his symptoms were improving and he was returned to his cell.
It was shortly after 23:00 that his cellmate in the double occupancy cell in B Hall said he had heard Mr Hamilton in the bunk below banging on his bed, groaning in pain and unable to speak and had pressed the emergency cell button.
This resulted in a "code blue" alert which saw an ambulance called and a prison officer administering chest compressions until paramedics arrived and provided treatment with a defibrillator.
However, Mr Hamilton remained unresponsive and he was taken to hospital where he pronounced dead on arrival.
Sheriff Mohan said: "It is important to point out that all of those who dealt with Mr Hamilton on the day of his death and who gave evidence to the inquiry acted in good faith and sought to provide what they believed at the time was an appropriate level of help."
He concluded that there were a number of "reasonable precautions" which might have avoided the death.
They included completing the ECG, more detailed advice from the doctor to nurses in their initial telephone consultation and the nurses calling an ambulance for Mr Hamilton earlier than they had.
He noted the issue with the ECG paper - which he called a defect in the system of working.
He also highlighted the difficulty in accessing the prison's only defibrillator, and criticised the emergency alarm system in operation at the time.
A spokeswoman for the Scottish Prison Service said an internal learning review was done following every death in custody.
She said that following one such review, improvements were made to the emergency call system and the SPS procured additional defibrillators.
NHS Dumfries and Galloway said it accepted the findings and that action had already been taken to address the concerns highlighted.
The health authority said it would also continue to work with the SPS to introduce any further service improvements that were required.