Any respondent ordered detained for ninety-day or one-year periods of involuntary inpatient treatment or ordered detained for a period of up to one hundred eighty days of outpatient detention and treatment under this chapter shall be entitled to a reexamination of the order for his detention on his own motion, or that of his legal guardian, parent, spouse, relative, friend or attorney to the court. Upon receipt of the motion, the court shall conduct or cause to be conducted by a special commissioner proceedings in accordance with section 632.340.