The length of children’s mental health emergency department visits increased over a 10-year period, a new study finds. The majority of time is spent determining an appropriate discharge or admission plan, the researchers said.

From 2005 to 2015, rates of emergency department visits lasting more than six hours for children with mental health issues jumped from 16% to almost 25%, HealthDay reports. Rates of visits lasting more than 12 hours rose from 5% to nearly 13%.

Hispanic children are nearly three times as likely to have a prolonged visit compared with non-Hispanic white children, the researchers found.

Lead researcher Dr. Jennifer Hoffman of Lurie Children’s Hospital of Chicago said prolonged ER visits are closely linked to a shortage of mental health providers. Only about 10% of time in these visits is dedicated to medical evaluation, she said. Most of the time in the ER is spent finding children appropriate follow-up care, such as a hospital bed or an outpatient mental health appointment.

“It can take two weeks to get an appointment, which is just not practical for these children,” Hoffmann said.