Penal Code PC § 2970
(a) Not later than 180 days prior to the termination of parole, or release from prison if the prisoner refused to agree to treatment as a condition of parole as required by Section 2962 , unless good cause is shown for the reduction of that 180-day period, if the parolee’s or prisoner’s severe mental disorder is not in remission or cannot be kept in remission without treatment, the medical director of the state hospital that is treating the parolee, or the community program director in charge of the parolee’s outpatient program, or the Secretary of the Department of Corrections and Rehabilitation, shall submit to the district attorney of the county in which the parolee is receiving outpatient treatment, or for those in prison or in a state mental hospital, the district attorney of the county of commitment to prison, his or her written evaluation on remission. If requested by the district attorney, the written evaluation shall be accompanied by supporting affidavits.
(b) The district attorney may then file a petition with the superior court for continued involuntary treatment for one year. The petition shall be accompanied by affidavits specifying that treatment, while the prisoner was released from prison on parole, has been continuously provided by the State Department of State Hospitals either in a state hospital or in an outpatient program. The petition shall also specify that the prisoner has a severe mental disorder, that the severe mental disorder is not in remission or cannot be kept in remission if the person’s treatment is not continued, and that, by reason of his or her severe mental disorder, the prisoner represents a substantial danger of physical harm to others.