Authorities struggle to explain how a woman who went missing from her bed was found dead 17 days later, despite an earlier search.

SAN FRANCISCO — Authorities pledged Wednesday to determine why a patient in stable condition vanished from her San Francisco hospital room and was found dead 17 days later in a hospital stairwell, despite a previous search and police investigation.

"Quality patient care and patient safety is my top responsibility," Dr. Todd May, chief medical officer at San Francisco General Hospital and Trauma Center, said at a news conference, "and I am committed to getting to the root cause of this tragedy."

Officials identified a body found Tuesday as that of Lynne Spalding, 57, a mother of two who had been admitted for complications from a urinary tract infection on Sept. 19 and disappeared two days later.

An engineering staff member doing a routine check discovered her remains at 10 a.m. in a fourth-floor, wire-enclosed, exterior hospital stairwell used as a fire exit, May said.

The door to the exit had an alarm and was locked from the outside. The stairwell, exposed to the elements, exited onto the hospital grounds. Spalding had been a patient on the fifth floor.

That Spalding was dying or dead for days in a hospital stairwell "is the stuff of nightmares," said David Perry, a friend of Spalding's and a spokesman for her family.

"It is just one of the most horrible things I ever had to contemplate," Perry said. "We are all just gobsmacked."

He said her family wanted to know the timing and number of previous hospital searches, and whether cameras in the hospital were operating.

San Francisco police had been conducting a missing person investigation since Spalding's Sept. 21 disappearance, and her friends and family had distributed hundreds of fliers. Officials said the cause of Spalding's death remained under investigation.

The San Francisco Sheriff's Department, which is in charge of security at the city-owned hospital, had searched the building after staff discovered her missing. A sheriff's spokeswoman said Wednesday the department was reviewing its procedures "to determine if we could have done things better."

Spalding, a British native and longtime San Francisco resident, had lost a lot of weight before she went to the emergency room at San Francisco General, located only blocks from her home. She was about 5-foot-6 and weighed only 105 pounds when admitted, Perry said.

The hospital said that a staff member checked on Spalding at 10:15 a.m. on the Saturday she disappeared and found her bed empty 15 minutes later. The hospital said staff immediately began to search for her, notified her family and asked the sheriff's department for help. At the time, the city was experiencing a severe rainstorm.

May said Spalding's health had been improving, and she was listed in fair condition the last time she was examined.

"We do not know how she came to be in the stairwell yesterday, how long she had been there, or what caused her death," May said. The public hospital is generally well regarded, and May called the situation "unprecedented."

Perry said Spalding's family and friends related that she had been disoriented, possibly because of medication, prior to her disappearance.

Spalding was divorced and lived in the city with her 23-year-old daughter. She also had a son, 19, living with his father. She had worked for many years in the hospitality industry.

Perry described her as vivacious and ebullient, "a live wire." He said she was not the kind of person who would just walk away from her hospital room without notifying anyone.

The family has not been told what she was wearing when she vanished or exactly how far her room was from the stairwell, Perry said. Her cellphone was found on a chair next to her hospital bed.

Perry said he gathered from a conversation with the medical examiner that the body had been in poor condition, and DNA testing was needed to determine identification. He said there has been no mention of possible foul play, though the stairwell where the body was found was cordoned off with yellow police tape.

He called on the hospital to be more forthcoming. No questions were permitted at Wednesday's news conference.

"More information is better than none," Perry said. "We are not talking about a lost cat."

A "Find Lynne" Facebook page that had been created to aid in the search was flooded with messages of condolence and outrage that a hospital could lose a patient. Perry said Spalding's family was crushed and anxious to know why she died.