The cities of New York and Los Angeles grade their restaurants on cleanliness and the precautions they take to avoid making customers sick.

Now hospitals are getting similar assessments for their patient safety records from the Leapfrog Group, a nonprofit that's looking to improve the quality and safety of health care.

For 2,651 hospitals, Leapfrog created a single letter grade from 26 different measures collected by Leapfrog or Medicare. They included hospitals' adherence to safe practices, such as entering physician orders into computer records to avoid penmanship errors and removing catheters promptly to minimize the risk of infections. The grade was also based on hospitals' records of mishaps, such as bed sores, infections and punctured lungs.

Leapfrog gave 729 hospitals an A grade, 679 hospitals a B and 1,111 hospitals a C. Another 132 hospitals were scored "Grade Pending," Leapfrog's euphemism for below a C.

Leapfrog plans to introduce D's and F's when it updates the ratings in six months, but didn't want to be too harsh in its first report, said Leah Binder, Leapfrog's executive director.

"We designed this to capture the attention of the public," Binder said. "No one has ever given one individual score to most of the general hospitals in the country, including those that didn't perform well." Ratings can be found at Hospitalsafetyscore.org, but the site was hard to access Wednesday morning, apparently everyone wanted to see it at once.

The American Hospital Association disputed Leapfrog's ratings, saying in a statement that it "has supported several good quality measures but many of the measures Leapfrog uses to grade hospitals are flawed, and they do not accurately portray a picture of the safety efforts made by hospitals."

Among the mediocre performers in Leapfrog's study are some well-respected names. New York-Presbyterian Hospital in Manhattan and the Cleveland Clinic Hospital both got C's. UCLA Ronald Reagan in Los Angeles got a "Grade Pending." Leapfrog gave A's to some other well-known places such as the Mayo Clinic in Rochester, Minn., and Cedars-Sinai Medical Center in Los Angeles, and also to a host of obscure community hospitals.

"The hospitals that achieved an A came from all walks of life, across the gamut of hospital types and people they serve," Binder said. "Safety appears to be something that all hospitals can choose."

Massachusetts, Maine and Vermont were the only three states where half of the hospitals or more got a grade of A. In 24 states and the District of Columbia, half or more of the hospitals got a C or "Grade Pending." The worst performers were the District, Oregon and New York , where at least two-thirds of the hospitals got a C or lower. Kaiser Health News has a sortable chart of the grades by state here.

Hospital officials raised a number of objections. Dr. Michael Henderson, chief quality officer at the Cleveland Clinic, noted that much of the data was a year or two old, and many hospitals have made significant strides since then. "The question the public needs to be asking is, 'Are you working on this? Are you getting better?' " he said.

Leapfrog's information comes from two sources: its own surveys of hospitals that agree to participate, and data the Centers for Medicare & Medicaid Services culls from its billing records and posts on its Hospital Compare website.

Dr. Shannon Phillips, a quality and safety officer at the Cleveland Clinic, said that the way Leapfrog calculated its grades, "you are automatically at a deficit if you did not participate in their survey." The clinic, like some other hospitals, dropped out of Leapfrog's surveys in recent years as the government began requiring more and more information to be provided to it for publication.

Binder, however, said that the way the scores were calculated wouldn't disadvantage hospitals that didn't partake in Leapfrog's survey.

Leapfrog, which is based in Washington, said it consulted with nine nationally known experts, including Dr. Peter Pronovost of Johns Hopkins, Dr. Patrick Romano of University of California, Davis and Dr. Ashish Jha of the Harvard School of Public Health, in designing the letter grade scoring methods.

Jha called Leapfrog's grades "a really important step forward," because they simplify complex measurements into things that consumers can easily understand and digest. Numerous studies have found that consumers rarely use complex quality measurements when choosing hospitals, blunting the potential influence of resources like Hospital Compare.

"As better data comes along and as time goes by, my hope is this grading will get refined," Jha said.

Copyright 2016 Kaiser Health News. To see more, visit Kaiser Health News.