Any person involuntarily committed by a county review board and any person confined or in any manner detained or restrained is entitled to the benefit of a writ of habeas corpus. If the court finds that the criteria in § 27B-7-37 are met, the court may authorize continued involuntary commitment. Such authorization is not a bar to the issuing of the writ the second time if it is alleged that the criteria in § 27B-7-37 are no longer met.
SDCL 27B-7-47