JACKSON, Miss. (AP) — A federal judge has approved funding for an independent monitor to collect and analyze data on how Mississippi’s mental health system is working to prevent unnecessary hospitalizations.

U.S. District Judge Carlton Reeves ordered on Dec. 3 that the state make an initial payment of $25,000 to Michael Hogan, a mental health care veteran with 40 years’ experience. He previously served as special master amid the ongoing litigation between the Mississippi Department of Health and the federal government.

The order comes as the state is appealing a September ruling from Reeves that requires it to design a plan for the future of the state’s mental health care system.

Hogan submitted a proposed budget on Oct. 18 totaling $317,330 in estimated costs for the year to fulfill his role as a monitor. That includes fees for Hogan’s duties and for experts that may need to be required to assist with data analysis and validation.

Under Reeves’ order, the state is responsible for tracking a wide array of data, including state hospital admissions and the number of patients who remain in state hospitals more than 180 days; calls to mobile crisis teams, and the number of people being placed in jail while waiting for a state hospital bed.

While acting as monitor, Hogan will be required to provide reports every six months on the state’s compliance with Reeves’ order. Reeves will hold a status conference with the state, the federal government and Hogan after each report is submitted. Hogan will be appointed for three years and could be reappointed.

Reeves also ruled in September that the state must start a clinical review process. The state must sample 100 to 200 patients a year “to assure that services are working as intended to address the needs of people with serious mental illness.”

However, the state requested that the implementation of the review process be delayed while its appeal is underway.

The requirements are the result of a years-long legal battle over how Mississippi cares for people with mental illness.

The federal government issued a letter in 2011 saying the state had done too little to provide mental health services outside mental hospitals. The Justice Department sued Mississippi in 2016, and Reeves ruled the state was in violation of the Americans with Disabilities Act.

State attorneys contend Mississippi has enacted programs that enable people to obtain treatment in their communities and avoid hospitalizations, such as mobile crisis teams, supportive housing and peer support services. Justice Department attorneys said during a hearing last summer that those services need to be expanded and that there need to be metrics to ensure they are working.