Staff at Dumfries prison had wanted to carry out the test on Andrew Hamilton, 27, but found there was no paper in the machine and they were unable to get replacement paper because it was locked in a stationery cupboard and the keyholder was holiday.
Sheriff Brian Mohan, said staff had acted in “good faith” but also highlighted defects in procedures at the prison.
“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,” he said.
Six hours later Mr Hamilton, from Livingston, West Lothian, 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 Hamilton’s death on 3 October 2014, it was shown he suffered from chronic heartburn and was also diabetic and administered his own insulin daily.
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 5pm.
After the electrocardiogram test failed a telephone consultation took place with a doctor and it was decided to monitor the patient and when he later saw the nurse about 8pm he seemed “brighter”.
He had said 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.
Shortly after 11pm his cellmate heard Mr Hamilton groaning in pain and unable to speak and pressed the emergency cell button. An ambulance was called and a prison officer administered chest compressions until paramedics arrived with a defibrillator.
Mr Hamilton was pronounced dead in hospital.
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 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 earlier.
He noted the issue with the ECG paper, which he called a defect in the system of working, highlighted the difficulty in accessing the prison’s only defibrillator, and criticised the emergency alarm system in operation at the time.