Jail inmates at the St. Louis County Justice Center in Clayton stay for an average of 59 days before their cases are tried or dismissed. But 10 miles away, at the Medium Security Institution in the city of St. Louis, the typical prisoner waits for eight months.

The St. Louis jail, which does not have air conditioning in the men’s dorms, drew protests this summer after inmates cried for help during a heat wave. The city installed temporary cooling units at the facility, also known as the Workhouse, and extreme temperatures have since subsided. Inmates and their families say more must be done to improve conditions in the aging facility. But city officials say there isn’t much more they can do.

Just thinking about it makes Kathrina Patrick start to cry. During the heat wave this past July, temperatures reached 108 degrees in St. Louis. Her husband David's brother called from jail.

“He called David one night, and said it’s so hot I think I’m going to die,” she said she smoked a cigarette outside her home in Jefferson County. “He said there’s no ice, the water’s hot … the tempers flare.”

Patrick’s brother-in-law is Robert Scott Anderson — a father of two with a learning disability. He was arrested after a confrontation with his estranged wife, and charged with aggravated stalking. His family couldn’t afford his $15,000 bail, so he’s been held at the Workhouse since December while he waits for his court dates.

Kathrina Patrick

In the meantime, Patrick worries that her brother-in-law’s chronic health conditions are getting worse.

“While he’s been in there, he’s been diagnosed as diabetic, but they’re not treating it, they just told him he was,” Patrick said. “The state constitution allows you a fast and speedy trial unless you waive your rights. He hasn’t waived his rights!”

When reached in jail, Anderson confirmed that he’s gained about 35 pounds during his incarceration.

“My back hurts all the time, I’ve got stuff wrong with me, I don’t know how to take care of it,” Anderson said. “I can’t read and write, so I can’t fill out a form to see the doctor.”

The accusation that a jail is restricting medical care is a serious one. Supreme Court cases have established that prisoners have a right to medical care, and city records show that the vast majority of requests for medical appointments are filled.

Related: Here's what you need to know about St. Louis' Medium Security Institution

But Erika Wurst, the public defender who represents Anderson, said she has had multiple clients who have had delays in care.

“I have clients who — they’ll have something very serious; broken bones, or some very inexplicable or serious, painful medical issue. A lot of times they will be seen, but they’ll get, one Tylenol or something,” Wurst said.

“I understand why it’s a problem for medical employees — they’re getting tons of new patients, people are coming and going all the time — but at the same time, I think every single attorney in this office has had a lot of cases where they think their clients are not getting the medical attention they need,” she said.

St. Louis Division of Corrections Commissioner Dale Glass takes issue with these allegations. Since he took over the city’s jails in 2012, he’s followed up personally with inmates when their lawyers or families raised concerns. He’s allowed additional social service organizations to enter the jail to provide inmates with job counseling, mentoring and educational programs.

“People that are in my care, a lot of them get medical treatment that they’ve never had before they had no insurance, or their financial situation was such that they couldn’t get this treatment or care,” Glass said. “I make sure that it happens.”

The jail was built in 1966. Like many jails at the time, it was built without air conditioning. A recent health inspection showed evidence of roaches and mold in the building. But Glass said voters rejected the bond issue that could have paid for improvements at the jail. And it costs $75 a day to house each inmate, according to the city.

“With the resources we have, we’ve addressed those challenges,” Glass said.

Some challenges are outside the jail’s control. Inmates who stay for extended period of time are often waiting on a trial and unable to afford their bail. Often, the city’s strained legal system forces cases to drag on.

Anderson, for example, has been waiting on his case for nine months. His court dates have been postponed multiple times: sometimes his public defender has a schedule conflict, sometimes it’s a witness who won’t show. His next court date is in late October.

The Missouri public defender system is so underfunded that there aren’t enough attorneys, said Wurst, Anderson’s public defender. People burn out quickly, and hiring is a challenge.

A trial, but not a speedy one: St. Louis inmates wait in jail four times longer than in the county Listen: Erika Wurst on how the Workhouse functions as a debtor's prison Listen • 1:09

Wurst, who has three years under her belt, manages a caseload of 70 to 90 people at any given time. Some cases are even older than Anderson’s, and those take precedence, regardless of the severity of an alleged crime. The practical effect, Wurst said, is that many people plead guilty, just to get out.

“Even if you’re innocent … you lose your house, you lose your family, you lose your job,” Wurst said. “At the end of the day, it’s just easier to take the fall for something, that you may not have done just to get out of the conditions in the Workhouse and get back to your life.”

Follow Durrie on Twitter: @durrieB