Illinois lawmakers Tuesday heard testimony from nearly a dozen doctors and child welfare advocates describing circumstances facing children who languish in psychiatric hospitals even after they had been cleared for discharge — circumstances so harrowing that some children chose jail over another night at a psychiatric facility.

State Sen. Julie Morrison, a Democrat from Deerfield, called for the Senate Human Services Committee hearing following a ProPublica Illinois investigation that revealed that hundreds of children in care of the Illinois Department of Children and Family Services spent weeks or months at a time locked in psychiatric hospitals after doctors had cleared them for release.

The investigation, published in June, found that children in DCFS care were trapped inside psychiatric hospitals between 2015 and 2017 for a total of more than 27,000 days beyond what was medically necessary. During that time, the state spent nearly $7 million on unnecessary psychiatric care for children as young as 4.

And the problem, ProPublica Illinois found, has only been getting worse. In 2014, only 88 psychiatric admissions were not medically needed compared with 301 last year.

Children who stay in psychiatric hospitals after they have been cleared to leave is a symptom of a larger problem, said Danielle Gomez, a supervising attorney at the Cook County Public Guardian’s office.

“There is an urgent and unmet need for therapeutic homes and placements for children,” she said.

DCFS officials in recent years dramatically reduced the number of residential treatment beds across the state before they had added alternatives outside of hospitals — a decision made before DCFS Acting Director Beverly “B.J.” Walker took over a year ago. She has said that losing those beds has made the problem worse.

Several witnesses admonished the child welfare agency for its failure to find placements for children who could not leave because DCFS had no place for them to go. Walker said the agency is seeking solutions.

“At some point, we become the one-stop shop that is accountable for getting children out of the hospital and on to community and family settings.” Walker said in her testimony. “It’s part of our mission, so we’re not stepping back from it. But we understand where we stand in the continuum.”

Walker offered few concrete measures to ease the problem but said the agency is working to ensure that every child has a discharge plan within 10 days of admission to a hospital. DCFS also has increased the number of beds it can send children to at residential treatment centers and at specialized foster care homes around the state.

Heidi Dalenberg, the general counsel for the American Civil Liberties Union of Illinois, which monitors DCFS as part of a decades-old consent decree, told lawmakers that keeping children in a psychiatric hospital beyond medical necessity runs counter to an Illinois law that requires the state to place children in the “least restrictive (most family-like) setting.”

“I’m a plain speaker. That’s illegal,” she said. “We’re abusing our own children.”

Five doctors testified the psychological symptoms of children in their care worsened as they waited for DCFS to find them a foster home or residential treatment center. Dr. Peter Nierman, medical director at Chicago Lakeshore Hospital, said he had seen patients who had waited so long to be released they deliberately assaulted staff members or patients in hopes of getting arrested and being jailed.

“And they said that was a good deal because they knew they could get out of jail quicker than they could get out of the hospital,” Nierman said.

Dr. Frank Belmonte, chief medical officer at Advocate Children’s Hospital, said the case of one 17-year-old moved him both as a pediatrician and as a father of two daughters. He said he and his staff watched as the teenager suffered for almost a year in the hospital though only a few weeks were medically necessary.

The young woman, he testified, spent 305 days in a hospital, compared with a 5-day average length of stay, “not because she needed to, but because there was nowhere else for her to go.”

“After almost four months on the closed unit, not seeing sunlight or being outside, her state started to deteriorate,” he added. “The 17-year-old had no freedom, no interactions with patients dealing with her condition and many restrictions.”

Heather O’Donnell, senior vice president of advocacy and public policy at the social service agency Thresholds, said the issue extends beyond DCFS to a statewide mental health system that doesn’t have enough placement options in the community and doesn’t pay its workers enough.

“We know what the problems are and we know what the solutions are, but it takes spending to get there,” O’Donnell said. “And there is no other way around it.”

Morrison said after the hearing she is considering legislative options to provide relief to children who remain in psychiatric hospitals beyond when it is medically necessary, though she didn’t provide any details.

State Sen. Heather Steans, a Chicago Democrat, echoed the need for real solutions.

“It’s not hard to understand there really is a crisis here,” Steans said.