CHEYENNE, Wyo. (AP) — The Wyoming Supreme Court has partly upheld a lawsuit filed on behalf of a state psychiatric patient who was left on a dayroom couch without food or water for over 24 hours.

Wyoming State Hospital employees found Linda Gelok trembling, breathing rapidly and stinking of urine after maintenance staff alerted them she needed to be moved so they could work on a television in 2015.

READ MORE: El Dorado County Braces For Flooding After Caldor Fire

Gelok’s neck was “kinked awkwardly” and large numbers of ants were crawling on sores on her feet and ankles, according to the high court ruling Oct. 11.

ALSO: 11 Baby Bodies Found In Ceiling Of Closed Funeral Home

Those and other facts agreed upon by both sides in the case sufficiently “shock the conscience” to allow a claim against hospital Administrator Paul Mullenax as a private individual, the justices ruled.

The state high court dismissed claims against the Wyoming State Hospital, the state’s Department of Health and Mullenax in his official capacity, agreeing with a lower court they were immune from liability as state entities and as a state official.

The remaining case involving Mullenax, who did not return a phone message Wednesday seeking comment, now goes back to state District Court in Evanston, where the hospital is located.

“We’re happy that the civil rights claim is still alive,” one of Gelok’s attorneys, Doug Bailey, said. “What happened to Linda is just appalling.”

READ MORE: Lake Tahoe Wildlife Care Barred From Caring For Bears Until It Makes Changes To Enclosure

Gelok, who was 62 at the time, was a client of Wyoming Guardianship Corporation, a Cheyenne-based nonprofit that helps people in need with medical and financial decision-making. The nonprofit sued on her behalf.

The incident happened “nearly four years ago” and the Health Department continually reviews patient safety and supervision matters, department spokeswoman Kim Deti said in an email.

Deti declined to explain what specifically the department did in response to the incident, saying she was advised not to elaborate because it was an ongoing legal issue.

The ruling hinted at more pervasive problems at the hospital.

“Investigators noticed food on the floor in several areas of the hall and observed that the dining room area floor was very dirty with food and possibly human feces. Hospital staff confirmed that the hospital had an ongoing ant infestation problem,” the justices wrote in summarizing the case.

The Health Department recognizes “difficulties linked to building conditions” but a major renovation underway should help improve conditions, Deti wrote.

MORE NEWS: Kings Home Opener Brings Life To Downtown, Stresses Business

Gelok was a long-term, involuntarily committed patient of the State Hospital and other mental health facilities. Besides having schizophrenia, she suffered from post-traumatic stress disorder, dementia and had borderline intellectual functioning, according to the ruling.