Any person detained pursuant to this chapter or section 2945.39, 2945.40, 2945.401, or 2945.402 of the Revised Code shall be entitled to the writ of habeas corpus upon proper petition by self or by a friend to any court generally empowered to issue the writ of habeas corpus in the county in which the person is detained.
No person may bring a petition for a writ of habeas corpus that alleges that a person involuntarily detained pursuant to this chapter no longer is a person with a mental illness subject to court order unless the person shows that the release procedures of division (H) of section 5122.15 of the Revised Code are inadequate or unavailable.
R.C. § 5122.30