A doctor in California told a patient he was going to die using a robot with a video-link screen.
Ernest Quintana, 78, was at Kaiser Permanente Medical Center in Fremont when a doctor - appearing on the robot's screen - informed him that he would die within a few days.
Mr Quintana died the next day.
A family friend wrote on social media that it was "not the way to show value and compassion to a patient".
The hospital said it "regrets falling short" of the family's expectations.
Julianne Spangler, a friend of Mr Quintana's daughter, posted a photo of the robot on Facebook and said it "told [Mr Quintana] he has no lungs left only option is comfort care, remove the mask helping him breathe and put him on a morphine drip until he dies".
She later said it was "an extremely frustrating situation", and "an atrocity of how care and technology are colliding".
"I think the technological advances in medicine have been wonderful, but the line of 'where' and 'when' need to be black and white," she said.
Mr Quintana's granddaughter, Annalisa Wilharm, who was with him at the hospital, also told the BBC she was "trying not to cry".
"I look up and there's this robot at the door," she said, adding that the doctor on the screen "looked like he was in a chair in a room somewhere".
"The next thing I know he's telling him, 'I got these MRI results back and there's no lungs left, there's nothing to work with'. I'm freaking out inside, I'm trying not to cry - I'm trying not to scream because it's just me and him."
"He just got the worst news of his life without his wife of 58 years."
When Mr Quintana's wife arrived, she complained to hospital staff about how the news was broken to her husband. Annalisa Wilharm said that Mr Quintana's wife was told by a nurse "this is our policy, this is how we do things".
'We fell short'
Kaiser Permanente Greater Southern Alameda County senior vice-president Michelle Gaskill-Hames said in a statement that its policy was to have a nurse or doctor in the room when remote consultations took place.
"The evening video tele-visit was a follow-up to earlier physician visits," she added. "It did not replace previous conversations with patient and family members and was not used in the delivery of the initial diagnosis."
"That said, we don't support or encourage the use of technology to replace the personal interactions between our patients and their care teams - we understand how important this is for all concerned, and regret that we fell short of the family's expectations.
"We will use this as an opportunity to review how to improve patient experience with tele-video capabilities."