In an effort to give patients a simple way to judge the safety of hospitals, the Leapfrog Group has graded hospitals across the country on how well they do preventing medical errors that kill tens of thousands of people each year.

Massachusetts hospitals received the highest average score in the country, with none receiving a grade lower than a C. Leapfrog Chief Executive Leah Binder said the grades were modelled after those posted in New York restaurants to steer diners away from the dirtiest kitchens.

See the full story on BostonGlobe.com, and be sure to check out the map showing how Massachusetts hospitals fared.

Advertisement - Continue Reading Below

The grade are based on up to 26 patient safety measures, including nurse staffing levels, processes for preventing infection and medication errors, and the rates of patient injuries, bloodstream infections, or surgical errors.

Leapfrog got input from experts in the field, including Dr. Lucian Leape, Harvard professor and chairman of a national patient safety institute named for him, Dr. Peter Pronovost of Johns Hopkins, and Dr. Ashish Jha, associate professor of health policy at Harvard School of Public Health.

Jha said Tuesday he had worried that the grades would label teaching hospitals categorically unsafe. Large teaching hospitals typically care for sicker patients and, as a result, can have less favorable outcomes in certain quality measures.

But, Jha said, that didn’t happen. One-third of major teaching hospitals in the United States and about 28 percent of non-teaching hospitals received an A grade, according to an analysis by his office. Thirty-five percent of for-profit and 29 percent of private nonprofit hospitals received an A.

While this doesn’t apply to Massachusetts, Leapfrog has chosen to give those hospitals that received at D or an F time to respond before their names are released later this year, Binder said.