Patients at four Philadelphia-area hospitals suffered a worse-than-expected rate of complications after hip or knee replacements in 2014, according to a new study from a Pennsylvania state agency. Just one, Bryn Mawr Hospital, reported fewer complications than expected following knee replacements.

The information, compiled by the Pennsylvania Health Care Cost Containment Council, is designed to help consumers evaluate providers of the popular surgeries.

Pennsylvania hospitals replaced the hips or knees of more than 56,000 patients that year, up more than 40 percent from a decade earlier.

Infections, bleeding, heart attacks, and other postsurgical complications were reported in 2.2 percent of 32,179 knee-replacement patients and 2.8 percent of the 16,203 patients who got new hips.

Those numbers do not add up to 56,000 because the analysis excluded certain patients, such as those deemed to be clinically complex, and those who lived out of state and may have sought treatment outside of Pennsylvania for a complication.

Another caveat: hospitals report their own data, and a recent national study by Harvard and Stanford Universities scholars suggests that some health systems underreport one type of complication, infections acquired in the hospital.

At Bryn Mawr, part of the Main Line Health system, a big reason for the low complication rate after knee surgery is simply that the procedure is frequently performed there, said Marianne Harkin, vice president of patient care services.

The hospital's 851 knee replacements in 2014 did place it in the top 10 by volume. Still, it was the only one of those 10 with a lower-than-expected rate of complications.

Another key is making sure that patients are ready for the ordeal, Harkin said. For example, patients with a body mass index over 40 are referred to a weight-loss program before they can be cleared for a hip or knee replacement. Physicians also make sure that diabetic patients have their glucose under control, and they remind patients with sleep apnea to bring their devices to the hospital to aid with nighttime breathing.

Heart attacks are among the postsurgical complications being measured, and sleep apnea is a risk factor for heart disease.

"Patients come in with preexisting conditions that we look for and we manage," Harkin said. "Or we try to get them taken care of before they have the surgery."

An expected rate of complications was calculated for each hospital, with those that treat the oldest, sickest patients anticipated to have higher rates.

Several of the hospitals with worse-than-expected rates said they had taken steps to improve.

At Einstein Medical Center Philadelphia, officials said they had adopted practices such as screening patients for the presence of MRSA bacteria that could lead to infection, and providing antiseptic wipes for use at home before surgery.

At Aria Health, officials said they identified "documentation and coding inconsistencies" that inflated its complication rate for 2014. Better training led to a rate of zero surgical site infections following knee surgery in 2015, down from four the year before, Aria said.

Hahnemann University Hospital officials noted that the tally of complications included certain hospital readmissions not related to the surgery. Nevertheless, the hospital said it welcomed the report.

"It provides us with an outside perspective that allows us to grow, improve, and enhance the services we offer to patients," the hospital said in a statement.

Mercy Fitzgerald Hospital recorded knee-surgery complications in two cases out of a total of just 10 for the entire year. With one less complication, the hospital would have fallen within the expected range. An internal review of 2015 data showed a rate that is no different from expected, said spokeswoman Bernice Manallo Ho.

In the Harvard-Stanford study, researchers found that in states with stronger reporting requirements, hospitals reported higher rates of hospital-acquired infection. Pennsylvania, researchers said, is among states with weaker rules.

The authors calculated that underreporting in states with weaker requirements costs Medicare $200 million a year to pay for treating infections.

Pennsylvania does not conduct on-site audits to ensure that reported infection rates match clinical data - and that's important, said Lawrence Muscarella, an infection-control consultant.

"The data may not be valid if such a sample of the claims data were not audited and reviewed for consistency with the corresponding patient's medical record," he said.

New Jersey has not compiled a similar report that includes patients with all types of insurance. Looking solely at Medicare data, all Garden State hospitals met the expected national average rate of complications after hip and knee replacement.