Too many people die needlessly at U.S. hospitals, according to a sweeping new Medicare analysis showing wide variation in death rates between the best hospitals and the worst.

FIND YOUR HOSPITAL:See failure death rates near you

LOWER READMISSION RATES: Baylor hospital leads way for heart patients

The analysis examined death rates for heart attacks, heart failure and pneumonia at more than 4,600 hospitals across the USA. At 5.9% of hospitals, patients with pneumonia died at rates significantly higher than the national average. With heart failure, 3.4% of hospitals had death rates higher than the average, and 1.2% of hospitals were higher when it came to heart attack.

Researchers also found that the majority of U.S. hospitals operate the equivalent of revolving doors for their patients. One of every four heart failure patients and slightly less than one in five heart attack and pneumonia patients land back in the hospital within 30 days, data show.

"We have double failure in our health system," says John Rumsfeld of the Denver VA Medical Center and chief science officer for the American College of Cardiology's National Data Registry.

The analysis by U.S. Centers for Medicare and Medicaid Services (CMS) comes as the White House and Congress debate ways to cut costs and improve quality in the nation's health system. One idea on the table is to reward doctors and hospitals not just for how many procedures they perform but how well their patients fare. More than 200 hospitals have death rates better than the national average, and hundreds fare better on readmission rates.

The findings are based on more than 1 million deaths and readmissions among Medicare patients from 2005 to 2008. A separate USA TODAY analysis of the data found that patients have higher death rates at hospitals in the nation's poorest and smallest counties, compared with those in larger, more affluent areas. Death rates in hospitals in counties with fewer than 50,000 people rank 1 to 2 percentage points higher than their most-populated counterparts, a significant difference. A similar pattern emerges at hospitals in counties where the median household income falls below $35,000 a year.

Barry Straube, director of CMS' office of standards and quality, says the agency aims to intensify competition between hospitals by giving patients the information they need to seek out higher-quality care and by giving hospitals a way to measure their performance against their competitors. It also provides a tool that government and private health plans can use to determine which hospitals merit higher pay for better performance.

"This kind of information is absolutely the backbone of many of our efforts to reform the health system," says Janet Corrigan, head of the National Quality Forum, a consortium of government agencies, insurers, hospitals and doctors' groups that approved the methods used in the analysis.

"Based on what we see here, we have our work cut out for us."