TRENTON, NJ (CBS) – Keeping patients safe and protecting their health might seem like obvious requirements of any hospital, but facilities in some states are better than others.

According to this year’s Hospital Safety Score, patients in New Jersey have it pretty good when it comes to medical care. The state’s hospitals were ranked the fourth safest in the country, with 52% earning an ‘A’ grade.

Unfortunately, Pennsylvania didn’t do nearly as well. The Keystone State came in 27th, with only 20% of its hospitals getting top marks. For example, in Philadelphia, the Hospital of the University of Pennsylvania and Roxborough Memorial Hospital both got A’s, while Einstein Medical Center and Temple University Hospital earned B’s. Abington Memorial got a C, and several other suburban hospitals even earned D’s.

As for Delaware, the tiny state ranked 12th on the list, with two of its six hospitals earning an A grade.

The Leapfrog Group, which puts together the Hospital Safety Score, says the rankings are compiled using national performance measures from the Leapfrog Hospital Survey, the Agency for Healthcare Research and Quality (AHRQ), the Centers for Disease Control and Prevention (CDC), the Centers for Medicare and Medicaid Services (CMS), and the American Hospital Association’s Annual Survey and Health Information Technology Supplement. Those performance measures are put together to come up with a single score that represents a hospital’s overall performance in keeping patients safe from preventable harm and medical mistakes.

In case you were wondering, the state with the best hospitals is Maine — 67% of its facilities received A’s.

You may also be interested in these stories:

Watch & Listen LIVE