I was taught that if the truth is likely to hurt someone that before telling it, I should ask myself "Who is going to benefit, if I tell the truth about this?" I have found this quite a useful guideline.
If I am only relieving my own feelings by telling someone a hurtful truth, then I should keep my mouth shut.
Asked by a dear friend who was in the terminal stages of cancer, "Am I going to die?" my mother replied, "We are all going to die, dear, but whether you are going to die now or later, only God knows."
When her friend then said that she wanted to know what the doctors were saying, as she had things she wanted to attend to if she was in imminent danger of death, my mother truthfully said that in her opinion one should deal with that sort of thing, as and when the affair occurred to one, as none of us know when we are going to die.
She offered to be present at a consultation with her friend's doctors, when she realised that the dying woman (who did die a week later) genuinely wanted to know whether it was now she should send for a solicitor and a priest.
Context is everything.
The nurse in the example mentioned above was out of line IMO; telling the relatives that the dying man might not make it home was one thing, telling the patient himself strikes me as unkind and unnecessary. After all if the poor man died on the way home, at least an attempt to fulfill his dying wish had been made.