<?xml version='1.0' encoding='utf-8'?>
<section article="ghg" article_name="Health - General" number="10-804" title_number="10" title_name="Mental Health Law" subtitle_number="8" subtitle_name="Release and Transfers">
  <level label="a">
    <text>Any individual who has been admitted to a facility or Veterans’ Administration hospital or any person on behalf of the individual may apply at any time to a court of competent jurisdiction for a writ of habeas corpus to determine the cause and the legality of the detention.</text>
  </level>
  <level label="b">
    <text>The Director, in the name of the Administration, may make an application for a writ of habeas corpus to determine whether a facility properly admitted or properly holds an individual. The State’s Attorney for the county where the facility is located or the individual is a resident, on behalf of the Administration, shall file the application.</text>
  </level>
</section>
