A California hospital delivered end-of-life news to a 78-year-old patient via a robotic machine this week, prompting the man's family to go public with their frustration.

Ernest Quintana was admitted to the Kaiser Permanente Medical Center emergency department in Fremont, California, on March 3, granddaughter Annalisia Wilharm told USA TODAY in a written message Saturday. The family knew he was dying of chronic lung disease.

After an initial diagnosis, a follow-up visit was made to Quintana's intensive care unit room by a machine accompanied by a nurse.

The "robot," as Wilharm says the family refers to the machine, displayed a video of a remote doctor who communicated with Quintana.

A video of the exchange provided to USA TODAY by Wilharm shows the machine being used on Monday to tell grandfather and granddaughter that the hospital had run out of effective treatments.

Annalisia Wilharm needed to restate much of what the the machine communicated, as her grandfather struggled to hear and understand. They learned that the doctor believed Quintana would not be able to return home for hospice care. They discussed the appropriate amount of morphine to use to ease Quintana's suffering.

"If you're coming to tell us normal news, that's fine, but if you're coming to tell us there's no lung left and we want to put you on a morphine drip until you die, it should be done by a human being and not a machine," Catherine Quintana — Ernest's daughter and Wilharm's mother — said Friday.

Ernest Quintana died on Tuesday, Wilharm told USA TODAY in a written message.

The hospital says that the situation was highly unusual and said officials "regret falling short" of the patient's expectations, according to Michelle Gaskill-Hames, senior vice president of Kaiser Permanente Greater Southern Alameda County.

"The evening video tele-visit was a follow-up to earlier physician visits," Gaskill-Hames said in a written response. "It did not replace previous conversations with patient and family members and was not used in the delivery of the initial diagnosis."

Wilharm told USA TODAY on Saturday that the hospital's response was insufficient: "The apology they gave wasn't good enough for me at all," she wrote.

In an interview with KTVU, the family expressed dismay that the machine was unable to speak to Quintana in a way he could hear. That forced Wilharm to herself deliver the news to her ailing grandfather.

Speaking generally, Steve Pantilat — the chief of the palliative medicine division at University of California — said bad news is always difficult to deliver and not all doctors do so in person with empathy.

Pantilat said that the robot technology has helped many patients and families in his experience.

Contributing: The Associated Press