Pretrial release or detention: pretrial services.
Prisoners: mental health treatment.
Diversion: mental disorders.