(1) The department may file a petition before a circuit court requesting that a prehearing detention order be placed on a person when the department provides evidence that:
(a) The person is infected with a sexually transmitted disease;
(b) The person is engaging in behaviors which create an immediate and substantial threat to the public;
(c) The person evidences an intentional disregard for the health of the public and refuses to conduct himself or herself in such a manner as to not place others at risk; and
(d)1. The person will not appear at a hearing scheduled under s. 384.27 or s. 384.28; or
2. The person will leave the jurisdiction of the court prior to his or her hearing date; and
3. The person will continue to expose the public to the risk of a sexually transmissible disease until his or her hearing date.
(2) No prehearing detention order may be issued unless the court finds that: (a) The department has requested a hearing under s. 384.27 or s. 384.28 to consider the examination, treatment, or placement of the person infected with a sexually transmissible disease;
(b) The department presents evidence that a substantial danger to the public health will exist unless the prehearing detention order is issued;
(c) The department has no other reasonable alternative means of reducing the threat to the public health; and
(d) The department is likely to prevail on the merits in a hearing under s. 384.27 or s. 384.28.
(3) When issuing an order for a prehearing detention, the court shall direct the sheriff to immediately confine the person infected with or reasonably suspected of being infected with a sexually transmissible disease. The sheriff shall confine and isolate the person in such a manner as required by the court. The sheriff, counsel, and the court shall consult with the department concerning advisable methods of infection control to be undertaken in order to reduce the opportunity for the disease to spread to other persons.
(4) A person detained under this section shall be taken before a judicial officer for bail determination within 24 hours of detention. The purpose of a bail determination is to ensure the appearance of the person detained at the hearing scheduled pursuant to s. 384.27 or s. 384.28. When determining whether to release the person on bail or other conditions, and what the bail or those conditions may be, the court shall consider the person’s past and present conduct, previous flight to avoid prosecution, or failure to appear at court proceedings. The person detained is entitled to be represented by counsel and to have counsel appointed on his or her behalf if he or she cannot afford one. The person is entitled to present witnesses and evidence, and to cross-examine witnesses.
(5) A person detained under this section may apply for a writ of habeas corpus attacking the detention.
(6) Upon motion of the person confined under a detention order, the notice periods for hearings required under s. 384.27 or s. 384.28 may be waived. In no case may an order for a detention under this section exceed 3 days.