1. When a local criminal court, following a hearing conducted pursuant to subdivision three or four of section 730.30 of this article, is satisfied that the defendant is not an incapacitated person, the criminal action against him or her must proceed. If it is satisfied that the defendant is an incapacitated person, or if no motion for such a hearing is made, such court must issue a final or temporary order of observation committing him or her to the custody of the commissioner for care and treatment in an appropriate institution for a period not to exceed ninety days from the date of the order, provided, however, that the commissioner may designate an appropriate hospital for placement of a defendant for whom a final order of observation has been issued, where such hospital is licensed by the office of mental health and has agreed to accept, upon referral by the commissioner, defendants subject to final orders of observation issued under this subdivision. When a local criminal court accusatory instrument other than a felony complaint has been filed against the defendant, such court must issue a final order of observation. When a felony complaint has been filed against the defendant, such court must issue a temporary order of observation committing him or her to the custody of the commissioner for care and treatment in an appropriate institution or, upon the consent of the district attorney, committing him or her to the custody of the commissioner for care and treatment on an out-patient basis, for a period not to exceed ninety days from the date of such order, except that, with the consent of the district attorney, it may issue a final order of observation. Upon the issuance of a final order of observation, the district attorney shall immediately transmit to the commissioner, in a manner intended to protect the confidentiality of the information, a list of names and contact information of persons who may reasonably be expected to be the victim of any assault or any violent felony offense, as defined in the penal law, or any offense listed in section 530.11 of this chapter which would be carried out by the committed person; provided that the person who reasonably may be expected to be a victim does not need to be a member of the same family or household as the committed person.
2. When a local criminal court has issued a final order of observation, it must dismiss the accusatory instrument filed in such court against the defendant and such dismissal constitutes a bar to any further prosecution of the charge or charges contained in such accusatory instrument. When the defendant is in the custody of the commissioner pursuant to a final order of observation, the commissioner or his or her designee, which may include the director of an appropriate institution, immediately upon the discharge of the defendant, must certify to such court that he or she has complied with the notice provisions set forth in paragraph (a) of subdivision six of section 730.60 of this article. When the defendant is in the custody of the commissioner at the expiration of the period prescribed in a temporary order of observation, the proceedings in the local criminal court that issued such order shall terminate for all purposes and the commissioner must promptly certify to such court and to the appropriate district attorney that the defendant was in his or her custody on such expiration date. Upon receipt of such certification, the court must dismiss the felony complaint filed against the defendant.
3. When a local criminal court has issued an order of examination or a temporary order of observation, and when the charge or charges contained in the accusatory instrument are subsequently presented to a grand jury, such grand jury need not hear the defendant pursuant to section 190.50 unless, upon application by defendant to the superior court that impaneled such grand jury, the superior court determines that the defendant is not an incapacitated person.
4. When an indictment is filed against a defendant after a local criminal court has issued an order of examination and before it has issued a final or temporary order of observation, the defendant must be promptly arraigned upon the indictment, and the proceedings in the local criminal court shall thereupon terminate for all purposes. The district attorney must notify the local criminal court of such arraignment, and such court must thereupon dismiss the accusatory instrument filed in such court against the defendant. If the director has submitted the examination reports to the local criminal court, such court must forward them to the superior court in which the indictment was filed. If the director has not submitted such reports to the local criminal court, he must submit them to the superior court in which the indictment was filed.
5. When an indictment is timely filed against the defendant after the issuance of a temporary order of observation or after the expiration of the period prescribed in such order, the superior court in which such indictment is filed must direct the sheriff to take custody of the defendant at the institution in which he is confined and bring him before the court for arraignment upon the indictment. After the defendant is arraigned upon the indictment, such temporary order of observation or any order issued pursuant to the mental hygiene law after the expiration of the period prescribed in the temporary order of observation shall be deemed nullified. Notwithstanding any other provision of law, an indictment filed in a superior court against a defendant for a crime charged in the felony complaint is not timely for the purpose of this subdivision if it is filed more than six months after the expiration of the period prescribed in a temporary order of observation issued by a local criminal court wherein such felony complaint was pending. An untimely indictment must be dismissed by the superior court unless such court is satisfied that there was good cause for the delay in filing such indictment.