Upon motion by the:
alleging that an inmate in a county jail awaiting trial is in danger of serious bodily injury or death or represents a substantial threat to the safety of others, the court shall determine whether the inmate is in imminent danger of serious bodily injury or death, or represents a substantial threat to the safety of others. If the court finds that the inmate is in danger of serious bodily injury or death or represents a substantial threat to the safety of others, it shall order the sheriff to transfer the inmate to another county jail or to a facility of the department of correction designated by the commissioner of the department as suitable for the confinement of that prisoner and provided that space is available. For the purpose of this chapter, an inmate is not considered in danger of serious bodily injury or death due to an illness or other medical condition.
IC 35-33-11-1