Janet Prochazka was active and outspoken, living by herself and working as a special education tutor. Then, in March, a fall landed her in the hospital.

Doctors cared for her wounds and treated her pneumonia. But Prochazka, 75, didn't sleep or eat well. She became confused and agitated and contracted a serious stomach infection. After more than three weeks in a San Francisco hospital and three more in a rehabilitation facility, she emerged far weaker than before, shaky and unable to think clearly.

Elderly patients are far different than their younger counterparts — so much so that some hospitals are treating some of them in separate medical units. About one-third of patients older than 70 and more than half of patients older than 85 leave the hospital more disabled than when they arrived, research shows.

"The older you are, the worse the hospital is for you," said Ken Covinsky, a physician and researcher at the University of California, San Francisco division of geriatrics. "A lot of the stuff we do in medicine does more harm than good. And sometimes with the care of older people, less is more."

San Francisco General is among hospitals creating separate units. Its Acute Care for Elders ward, which opened in 2007, has special accommodations and a team of providers to address the unique needs of older patients. They focus less on the original diagnosis and more on how to get patients back home, living as independently as possible.

Early on, the staff tests patients' memories and assesses how well they can walk and care for themselves at home. Then they give patients practice doing things for themselves as much as possible throughout their stay. They remove catheters and IVs, and encourage patients to get out of bed and eat in a communal dining area.

"Bed rest is really, really bad," said the medical director of the ACE unit, Edgar Pierluissi. "It sets off an explosive chain of events that are very detrimental to people's health."

Such units are still rare — there are only about 200 around the country. And even where they exist, not every senior is admitted, in part because space is limited.

Prochazka went to the emergency room first, then intensive care. She was transferred to ACE about a week later. The staff weaned her off some of her medications and got her up and walking. They also limited the disorienting nighttime checks. Prochazka said she got "the first good night of sleep I have had."

But for her, the move might have been too late.

"She will not leave here where she started," Pierluissi said several days before Prochazka was discharged. "She is going to be weaker and unable to do the things you really need to do to live independently."

How hospitals handle the old — and very old — is a pressing problem. Elderly patients are a growing clientele for hospitals, a trend that will only accelerate as baby boomers age. Patients older than 65 already make up more than one-third of all discharges, according to the federal government, and nearly 13 million seniors are hospitalized each year. And they stay longer than younger patients.

Many seniors are already suspended precariously between independent living and reliance on others. They are weakened by multiple chronic diseases and medications.

One bad hospitalization can tip them over the edge, and they may never recover, said Melissa Mattison, chief of the hospital medicine unit at Massachusetts General Hospital.

"It is like putting Humpty Dumpty back together again," Mattison said.

Yet the unique needs of older patients are not a priority for most hospitals, Covinsky said. Doctors and other hospital staff focus so intensely on treating injuries or acute illnesses — such as pneumonia or an exacerbation of heart disease — that they can overlook nearly all other aspects of caring for the patients, he noted.

In addition, hospitals face few consequences if elderly patients become more impaired or less functional during their stays. The federal government penalizes hospitals when patients fall, get preventable infections or return to the hospital within 30 days of their discharge. But hospitals aren't held accountable if patients lose their memories or their ability to walk. As a result, most don't measure those things.

"If you don't measure it, you can't fix it," Covinsky said.

Improving care for older patients requires an investment that hospital administrators are not always willing to make, experts said. Some argue, however, that the investment pays off — not just for older people but for hospitals themselves as well as for a country intent on controlling health care spending.

ACE units have been shown to reduce hospital-inflicted disabilities in older patients, decrease lengths of stay and reduce the number of patients discharged to nursing homes. In one 2012 Health Affairs study, Palmer and other researchers found that hospital units for the elderly saved about $1,000 per patient visit.

After coming home, Prochazka said she felt weak. It took weeks of walking her labradoodle to regain strength. But Prochazka, who is highly educated, still has some short-term memory loss and she knows that her life after hospitalization is different from before.

"I have been somebody who has always been both mentally and physically active," she said. "Before I fell. I was respected for what I have and what I did and all of a sudden, I'm not. … I felt like I had been dealt a blow I really didn't need."