NHS Grampian has apologised after a report said a heart patient's final few weeks of life were painful and distressing.
The patient - known as Mrs A - had surgery in December 2016, and died in March 2017.
The Scottish Public Services Ombudsman (SPSO) said she was not provided with reasonable care and treatment.
NHS Grampian said in a statement: "It is clear we let down Mrs A during her treatment."
The woman had a history of type-2 diabetes, and after her operation she experienced significant delirium and a stroke, and a leg wound also became infected.
She was moved between Aberdeen Royal Infirmary (ARI) and Woodend Hospital.
The SPSO report said: "While we found that Mrs A's medical care improved when she was initially transferred from ARI to Woodend Hospital for rehabilitation and more attention was paid to her delirium, the nursing care of her leg wound remained extremely poor and caused Mrs A pain and distress which were all avoidable.
"We found that there had been a lack of information given to the family by ARI about Mrs A's delirium and little to no evidence of discussion between nursing staff and the family. This was an extremely distressing time for Mrs A which was compounded by a lack of information."
NHS Grampian said: "It is clear we let down her family when they raised concerns with us.
"We accept the decision and recommendations of the Ombudsman and will be complying with them.
"We apologise unreservedly to the family."