There’s one thing to remember as the state and federal governments continue their fight over Medicaid funding for Riverview Psychiatric Center in Augusta: There are still patients there.

Health and safety concerns about the patients at Riverview were what led to the federal government to threaten to pull the hospital’s Medicaid funding in March; ever since, the state has been scrambling to fix the deficiencies found in a federal audit, including by rushing a bill through the Legislature in a special session. State officials filed an improvement plan that was accepted by the federal government, pending a follow-up audit. But after last month’s audit, Medicaid officials concluded that Riverview had failed to live up to its promises and would lose $20 million in federal funding.

Health and Human Services Commissioner Mary Mayhew promises to appeal the decision, and she should: Losing more than half of the financing for the state mental health facility is not something that will improve care for people with mental illness. But if all that happens is that state and federal regulators battle over money, the patients at Riverview – and the ones who are waiting for a place there – will suffer.

There is ample evidence that regardless of the outcome of the Medicaid dispute, people with mental illness – both inside the criminal justice system and without – are not getting the treatment they need. State officials should not lose sight of them if the legal battle with the federal government drags on.

Problems at Riverview emerged in March after a forensic patient punched and stabbed a mental health worker, seriously injuring her. A federal audit found the hospital was understaffed and overcrowded and did not sufficiently separate the operation of the forensic unit from the general psychiatric ones. The hospital’s administration took steps to fix the problems last spring, but then hurried to the Legislature in August, saying they were in danger of losing federal support unless lawmakers passed an emergency bill that, among other things, moved forensic patients to the Maine State Prison in Warren.

Whether or not the state is found to be in technical compliance with the federal requirements, though, there are still substantive questions about the quality of care the hospital provides.

Patient advocacy groups have complained that staffing is inadequate. Sheriff’s deputies brought in to keep the peace ended up as functional replacements for mental health workers.

In July, a report by the court-appointed monitor of the state’s compliance with a consent decree from a 1989 class-action lawsuit also found deficiencies at the hospital that go beyond the scope of the federal audit. The so-called special master reported a growing waiting list for beds at Riverview, a lack of services for children and teens and insufficient resources for veterans who have returned from Iraq and Afghanistan.

The state could win its fight with the federal government, but if these underlying problems are not addressed, Mainers with mental illness will still lose. As the appeal goes forward, the DHHS and the Legislature should be taking a broader look at the serious problems with mental health services in Maine.