It’s a return trip nobody wants to take: You are discharged from the hospital only to find yourself re-admitted a few days later.

More and more people are finding themselves in this revolving door — at a cost to both hospitals and patients. A 2009 study in the New England Journal of Medicine showed that one in five Medicare patients discharged from the hospital had to be re-admitted within 30 days; 34 percent were back within 90 days. Those return trips cost the health care system more than $17 billion a year.

Re-admission rates have increasingly become a measure of a hospital’s quality of care. As part of the Affordable Care Act, Medicare is planning to tie payment to re-admission statistics, even penalizing hospitals for re-admissions deemed avoidable.

With that punishment looming, hospitals and health policy experts are trying to figure out why so many patients are making round trips.

Are patients simply being let go too soon? While some patients may be let go before they are “completely and totally recovered,” said Carolyn Clancy, director of the Agency for Healthcare Research and Quality, the issue is far more complex than that. Sometimes, infections develop. In other cases, there is unexplained bleeding. Medication errors are a big factor, too. Often a patient isn’t able to get an appointment with a primary-care doctor or the patient simply feels that something isn’t right and doesn’t know where else to turn.

Researchers looking at this trend are discovering that breakdowns occur on multiple levels. The most critical failure seems to be in the discharge process, when the hospital should be preparing a patient for release. Instead, said Brian Jack, a family physician at Boston University Medical Center, the process is often a “perfect storm” of errors that begin even before a departing patient has reached the parking lot.

Many patients leave the hospital without understanding much about their diagnosis or how to handle their condition at home, including what medications to take, Clancy said.

Poor coordination of care and poor transitions in a fragmented system is how Jesse Pines, director of the Center for Health Care Quality at the George Washington University School of Public Health and Health Services, described it.

Proper post-hospital care involves many complicated steps. There are medication routines, follow-up sessions with doctors or physical therapists, adjustments to diet and lifestyle, even knowing what number to call if there’s a problem or a question. It can be very difficult to manage all this, especially if a patient has no caregiver at home or is in a weakened state upon release.

Many hospitals put instructions in writing, handing departing patients a “discharge summary” of steps they need to follow at home. But that summary can be difficult to read or understand; often it is handwritten and filled with jargon. And putting a discharge summary together is not always a doctor’s highest priority. The task often falls to others — nurses or medical residents — who rarely have the time to make sure the patients understand the plan for follow-up care.

Jack and his colleagues designed an approach that aims to streamline the process. It relies on checklists for the staff to make sure that nothing is missed and it assigns a staff person called a discharge advocate to coordinate post-hospital care and follow up with patients after discharge.

Of course, this process can be quite time-consuming. This is why Jack and his colleague Timothy Bickmore of Northeastern University have enlisted “Louise,” an avatar, or virtual discharge advocate. She appears on a computer-like screen that is rolled up to patients’ hospital beds to walk them through the discharge process.

Louise can spend 40 minutes or more with every departing patient. She is never distracted and can create well-targeted discharge summaries using information about each patient. Louise can communicate using synthetic speech and through a touch-screen display. And patients actually like her, Clancy said, “some … better than real, live nurses.”

Louise is part of a program called Project RED, for “Re-Engineered Discharge,” which has shown a 30 percent reduction in re-admission rates in clinical trials, according to Jack. Similar initiatives are being tested in hospitals around the country.

There is some urgency for hospitals to start to take matters into their hands, Pines said, because Medicare penalties are set to kick in soon and avoiding re-admissions “will become a real economic incentive.” Initially, performance evaluation will be focused on re-admissions related to three major conditions: heart failure, heart attack and pneumonia.

Ranit Mishori is a family physician and faculty member in the Department of Family Medicine at Georgetown University School of Medicine.