Wills Eye Hospital has filed a lawsuit in federal court in Philadelphia seeking to overturn a U.S. Department of Health and Human Services decision that Wills does not qualify as a hospital under Medicare.

The complaint, filed Friday, is the latest step in a dispute that stretches back to 2013, when Wills finished remodeling its Center City facility for inpatients but was denied Medicare certification because, according to federal officials, it would have too few inpatients relative to outpatients.

Wills has repeatedly argued that regulators at the Centers for Medicare and Medicaid Services, known as CMS, made an arbitrary decision that, if applied broadly, would prevent many high-profile hospitals from participating in Medicare.

That agency's reading of the law "is not sustainable as a reasonable reading of the statute because it yields the absurd and incongruous result that most hospitals in the United States — including storied institutions such as the Cleveland Clinic — do not meet the Medicare Act's definition of a hospital," according to the 41-page lawsuit, filed by Mark H. Gallant, of Cozen O'Connor.

CMS did not respond to a request for comment.

Based on the four beds in the Walnut Street facility that opened in 2002 as an ambulatory surgery center, Dale Van Wieren, a CMS official, calculated that a maximum of just 17 percent of cases there would be inpatients. That ratio was too low for Wills to qualify as a hospital, Van Wieren concluded.

Officials at the Pennsylvania Department of Health, which licensed Wills as a hospital, advocated for Wills.

"Sorry Dale . . . I don't agree with you on this one and don't see the difference between Wills [Eye] and the other small-capacity hospitals that have been previously approved by CMS," a Pennsylvania official wrote in an email quoted in the lawsuit.

Hospitals receive higher rates from Medicare than ambulatory surgery centers do. Though most eye care can be performed on an outpatient basis, some cases still require overnight stays or must be done in a hospital because they take more than four hours.

In February, an administrative law judge ruled against Wills. It also lost in October at the next level of appeal, the HHS Departmental Appeals Board.

Wills used data from the American Hospital Association to show that four key competitors with hospital certifications -- Bascom Palmer Eye Institute in Miami, Phillips Eye Institute in Minneapolis, New York Eye & Ear Infirmary in Manhattan, and Massachusetts Eye and Ear Infirmary in Boston -- each had ratios of inpatients to outpatients of less than 2 percent in fiscal 2011.

At the Cleveland Clinic in Ohio, inpatients accounted for just 7.4 percent of the facility's volume, the lawsuit said.

After the October ruling, Wills had to stop keeping patients for more than 24 hours. Such patients now go to nearby Thomas Jefferson University Hospital.

U.S. Sen. Bob Casey (D., Pa.) is still advocating for Wills.

"We continue to believe that Wills Eye should participate in the Medicare and Medicaid programs as a hospital, so the fight continues to achieve that goal," he said in an email Wednesday.