Hundreds of thousands of Medicare beneficiaries who have been denied coverage for nursing home stays because their time in the hospital was changed from “inpatient” to “observation care” can now appeal to Medicare for reimbursement, a federal judge in Hartford, Conn., ruled last week.

If the government does not challenge the decision and patients win their appeals, Medicare could pay them millions of dollars for staggeringly high nursing home bills.

To receive coverage for nursing home care, patients must first be admitted to the hospital as inpatients for three consecutive days. Time spent in the hospital for observation doesn’t count, even though they may stay overnight and receive some of the same treatment and other services provided to inpatients.

And there’s another big difference: While inpatients can file an appeal with Medicare if they question any other coverage denial, observation patients cannot. So, in 2011, seven Medicare beneficiaries and their families sued the Department of Health and Human Services, in what became a nationwide class action lawsuit.

On Tuesday, U.S. District Judge Michael Shea ruled that the patients are entitled to appeal if they are admitted as inpatients to the hospital by their doctor but later switched to observation care by their hospital. However, he said patients whose doctors initially place them in observation care under Medicare’s “two-midnight” rule cannot appeal because that rule requires doctors to base their decision on medical judgment. If the doctor determines that a patient’s stay is unlikely to stretch over two midnights, the patient would most likely receive observation care, though there are exceptions.

Shea’s decision applies to all traditional Medicare beneficiaries who experienced such a switch since Jan. 1, 2009, spent at least three days in the hospital and were enrolled in Medicare’s Part A hospital benefit. If they win their appeal, most hospital expenses and any nursing home bills they paid would be reimbursed under Part A.

Shea estimated that hundreds of thousands of beneficiaries would be able to seek repayment.

Lawyers at the Department of Justice argued that doctors and hospitals make admission decisions so patients can’t ask the government to change a decision it didn’t make. A DOJ spokesperson declined to comment on the decision or whether the government would appeal. They have until May 25 to decide.

But the physician’s decision is not final because it is “reviewed by the hospital’s ‘utilization review staff,’ a team each hospital participating in the Medicare program must have in place to review whether the physician’s decision is correct under mandatory, nationwide standards set by the Centers for Medicare and Medicaid Services,” the judge wrote.

Alice Bers, litigation director at the Center for Medicare Advocacy, one of the groups representing the plaintiffs, said the decision recognized that “Medicare coverage is subject to due process protection.”

“If I had gone home, I would have died,” said Ervin Kanefsky, 94, a plaintiff from the Philadelphia suburbs. He was admitted to the hospital as an inpatient after fracturing his shoulder in a fall. When he was about to leave after five days to recuperate at a nursing home, a hospital official told him his status had changed to observation. With one arm in a sling, stitches in the other, and unable to hold on to his walker, he learned Medicare wouldn’t pay for the nursing home.

“I had to pay $2,000 just to get in the door,” he said, and his monthlong stay in 2016 cost $9,145. He called Medicare numerous times, wrote a letter to the hospital’s president, and contacted his congressman for help. “I tried every which way,” he said, to no avail.

Medicare has temporarily suspended the three-day inpatient admission requirement during the coronavirus emergency.

Kaiser Health News (KHN) is a nonprofit news service covering health issues. It is an editorially independent program of the Kaiser Family Foundation that is not affiliated with Kaiser Permanente.