FRANKFORT — Kentucky's 59 health departments won a legal victory Tuesday over one of the state's Medicaid managed care providers, which could mean $7.9 million for the cash-strapped agencies.

Franklin Circuit Judge Phillip Shepherd ruled Tuesday that Kentucky Spirit must pay the health departments for treatments provided by school nurses. The state Cabinet for Health and Family Services says the payments in question total $7.9 million.

"It's good news for health departments," said Dr. Rice Leach, Commissioner of Health for the Lexington-Fayette County Health Department. "The work we and others did was done with the expectation of receiving compensation, and this moves us closer to that result."

The amount each health department is owed was not readily available on Tuesday.

Kentucky Spirit could appeal Shepherd's decision, which would delay payment.

"We are reviewing the order and considering all options including an appeal," said Deanne Lane, a spokeswoman for Centene, Kentucky Spirit's parent company.

Kentucky moved more than 540,000 Medicaid patients to three managed care companies in November 2011 to control spiraling costs in the state-federal program for the poor, disabled and elderly. Prior to managed care, public health departments were reimbursed by Medicaid for school nurses who provide services to Medicaid-eligible students.

Kentucky Spirit balked at making the payments under the contract, arguing in part that the services were provided without the supervision of a doctor at the local health department.

Shepherd, in his Tuesday ruling, said school nurses were providing preventative care to Medicaid patients. It did not matter if the care was provided in a public health department clinic or in a school. "Nurses in public health departments are subject to physician supervision whether they are physically in the building or not," Shepherd wrote.

The other two managed care providers — Coventry and WellCare — have reimbursed health departments for services provided by school nurses.

Officials with the Cabinet for Health and Family Services — which oversees both Medicaid and public health — said Tuesday that they were thankful that health departments were finally getting money owed to them.

"The cabinet is pleased the court recognizes Kentucky Spirit's failure to provide the required coverage for immunizations and other preventive health services for children that have historically been provided to schools through our local health departments," said Gwenda Bond, a spokeswoman for the cabinet.

Kentucky Spirit and the state are currently fighting over whether it can terminate its contract with the state a year early on July 2013 instead of July 2014. Kentucky Spirit has alleged in court documents that the state misled managed care providers on how much it would cost to operate in Kentucky. The state disputes that it misled Kentucky Spirit and wants Kentucky Spirit to pay damages if it terminates the contract early. That case is pending.