(1) Whenever a respondent has received short-term treatment for five consecutive months pursuant to the provisions of sections 27-65-107 and 27-65-108, the professional person in charge of the evaluation and treatment may file a petition with the court for long-term care and treatment of the respondent under the following conditions:
(a) The professional staff of the agency or facility providing short-term treatment has analyzed the respondent's condition and has found that the respondent has a mental health disorder and, as a result of the mental health disorder, is a danger to others or to himself or herself or is gravely disabled.
(b) The respondent has been advised of the availability of, but has not accepted, voluntary treatment; but, if reasonable grounds exist to believe that the respondent will not remain in a voluntary treatment program, his or her acceptance of voluntary treatment shall not preclude an order pursuant to this section.
(c) The facility that will provide long-term care and treatment has been designated or approved by the executive director to provide the care and treatment.
(2) Every petition for long-term care and treatment shall include a request for a hearing before the court prior to the expiration of six months from the date of original certification. A copy of the petition shall be delivered personally to the respondent for whom long-term care and treatment is sought and mailed to his or her attorney of record simultaneously with the filing thereof.
(3) Within ten days after receipt of the petition, the respondent or his or her attorney may request a jury trial by filing a written request therefor with the court.
(4) The court or jury shall determine whether the conditions of subsection (1) of this section are met and whether the respondent has a mental health disorder and, as a result of the mental health disorder, is a danger to others or to himself or herself or is gravely disabled. The court shall thereupon issue an order of long-term care and treatment for a term not to exceed six months, or it shall discharge the respondent for whom long-term care and treatment was sought, or it shall enter any other appropriate order, subject to available appropriations. An order for long-term care and treatment must grant custody of the respondent to the department for placement with an agency or facility designated by the executive director to provide long-term care and treatment. When a petition contains a request that a specific legal disability be imposed or that a specific legal right be deprived, the court may order the disability imposed or the right deprived if the court or a jury has determined that the respondent has a mental health disorder or is gravely disabled and that, by reason thereof, the person is unable to competently exercise said right or perform the function as to which the disability is sought to be imposed. Any interested person may ask leave of the court to intervene as a copetitioner for the purpose of seeking the imposition of a legal disability or the deprivation of a legal right.
(5) An original order of long-term care and treatment or any extension of such order expires on the date specified, unless further extended as provided in this subsection (5). If an extension is being sought, the professional person in charge of the evaluation and treatment shall certify to the court at least thirty days prior to the expiration date of the order in force that an extension of the order is necessary for the care and treatment of the respondent subject to the order in force, and a copy of the certification must be delivered to the respondent and simultaneously mailed to his or her attorney of record. At least twenty days before the expiration of the order, the court shall give written notice to the respondent and his or her attorney of record that a hearing upon the extension may be had before the court or a jury upon written request to the court within ten days after receipt of the notice. If a hearing is not requested by the respondent within such time, the court may proceed ex parte. If a hearing is timely requested, it must be held before the expiration date of the order in force. If the court or jury finds that the conditions of subsection (1) of this section continue to be met and that the respondent has a mental health disorder and, as a result of the mental health disorder, is a danger to others or to himself or herself or is gravely disabled, the court shall issue an extension of the order. Any extension must not exceed six months, but there may be as many extensions as the court orders pursuant to this section.