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.
A family friend wrote on social media that it was "not the way to show value and compassion to a patient".
The hospital says it "regrets falling short" of the family's expectations.
Mr Quintana died the next day.
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 told BBC News that it was "an extremely frustrating situation", and "an atrocity of how care and technology are colliding".