(a) If a defendant is found not guilty under AS 12.47.040(a)(2), the prosecuting attorney shall, within 24 hours, file a petition under AS 47.30.700 for a screening investigation to determine the need for treatment if the prosecuting attorney has good cause to believe that the defendant is suffering from a mental illness and as a result is gravely disabled or likely to cause serious harm to self or others.
(b) In this section, “mental illness” has the meaning given in AS 47.30.915.