All persons confined as seriously mentally impaired shall be entitled to the benefit of the writ of habeas corpus, and the question of serious mental impairment shall be decided at the hearing. If the judge shall decide that the person is seriously mentally impaired, such decision shall be no bar to the issuing of the writ a second time, whenever it shall be alleged that such person is no longer seriously mentally impaired.
Iowa Code § 229.37
Constitutional provision, Iowa Constitution, Art. I, §13
Habeas corpus, chapter 663