OR Rev Stat § 161.367 (2021)
2021 Oregon Revised Statutes|Volume : 04 - Criminal Procedure, Crimes|Chapter 161 - General Provisions|Section 161.367 - Gaining or regaining fitness; credit for time served; firearm prohibition.

(1) If at any time the court determines that the defendant lacks fitness to proceed, the court shall further determine whether there is a substantial probability that the defendant, in the foreseeable future, will gain or regain fitness to proceed. If the court determines that there is no substantial probability that the defendant, in the foreseeable future, will gain or regain fitness to proceed, the court shall dismiss, without prejudice, all charges against the defendant and: (a) Order that the defendant be discharged; or (b) Initiate commitment proceedings under ORS 426.070, 426.701 or 427.235 to 427.290. (2)(a) The superintendent of the hospital or director of the facility in which the defendant is committed under ORS 161.370 or a person examining the defendant as a condition of release to community restoration services shall notify the court if the defendant gains or regains fitness to proceed. (b) A party to the case may notify the court if the defendant has gained or regained fitness to proceed. (c) The court may, upon its own motion or the request of either party, hold a hearing to determine whether the defendant has gained or regained fitness to proceed. If the court determines that the defendant has gained or regained fitness to proceed, the court shall resume the criminal proceeding unless the court determines that so much time has elapsed since the commitment or release of the defendant to community restoration services that it would be unjust to resume the criminal proceeding. If the court determines that it would be unjust to resume the criminal proceeding, the court, on motion of either party, may dismiss the charge and may order the defendant to be discharged or cause a proceeding to be commenced forthwith under ORS 426.070 to 426.170, 426.701 or 427.235 to 427.290. (3) If the defendant gains or regains fitness to proceed, the defendant shall be given credit against each charge alleged in the accusatory instrument for each day the defendant was committed under ORS 161.370 to the custody of a state mental hospital, or to the custody of a secure intensive community inpatient facility designated by the Oregon Health Authority. (4) Notwithstanding the suspension of the criminal proceeding under ORS 161.370 (2), the fact that the defendant is unfit to proceed does not preclude any objection through counsel and without the personal participation of the defendant on the grounds that the indictment is insufficient, that the statute of limitations has run, that double jeopardy principles apply or upon any other ground at the discretion of the court which the court deems susceptible of fair determination prior to trial. (5) At the time that the court determines that the defendant lacks fitness to proceed under ORS 161.370 (2), the court shall notify the defendant in writing that federal law prohibits the defendant from purchasing or possessing a firearm unless the person obtains relief from the prohibition under federal law. The court shall again notify the defendant in writing of the prohibition if the court finds that the defendant has gained or regained fitness to proceed under subsection (2) of this section. [2021 c.395 §4]