Mr Milner died at Sheffield's Northern General Hospital
The NHS has apologised after writing to a man to address concerns over his treatment - three-and-half years after he died.
Tom Milner's daughter emailed the National Patient Safety Agency (NPSA) after her 76-year-old father died at Sheffield's Northern General Hospital.
Janet Brooks said when she received a response, it was entitled "Dear Tom".
The agency said it had reviewed its systems to ensure the error did not happen again.
Mr Milner, who had terminal leukaemia, was not given his prescribed pain-relieving morphine in the last two days of his life, his family say.
It's an example of the careless and shambolic attitude by the NHS towards my father and our family
They claim he was left in agony and lay in his own urine and blood at the NHS palliative care ward at the hospital.
The health trust responsible for his care said staff had "acted appropriately".
Mrs Brooks, 54, of Emsworth, Hampshire, said she had outlined her concerns about her father's treatment in an email to the NPSA.
"They responded with 'Dear Tom'.
"It's an example of the careless and shambolic attitude by the NHS towards my father and our family."
A spokesman for the National Patient Safety Agency said: "The NPSA is aware that an error was made when responding to an email enquiry from the relative of a deceased patient.
"As soon as this was identified, we contacted the person involved and apologised for any distress caused.
"The NPSA has also since reviewed its systems to look at how it can ensure this does not happen again."
Dr David Throssell, deputy medical director at Sheffield Teaching Hospitals NHS Foundation Trust, said: "The Healthcare Commission found that staff acted appropriately.
"Mr Milner indicated he was not in pain and therefore the doctor agreed with the nurse that further medication was not required."