Cal. Penal Code § 1001.80
(b) A defendant charged with a misdemeanor is eligible for diversion if both of the following apply:
(2)
(c) A defendant charged with a felony offense not set forth in subdivision (o) is eligible if both of the following apply:
(2)
(f) If a referral is made to the county mental health authority as part of the pretrial diversion program, the county shall provide mental health treatment services only to the extent that resources are available for that purpose as described in paragraph (5) of subdivision (b) of Section 5600.3 of the Welfare and Institutions Code. If mental health treatment services are ordered by the court, the county mental health agency shall coordinate appropriate referral of the defendant to the county veterans service officer as described in paragraph (5) of subdivision (b) of Section 5600.3 of the Welfare and Institutions Code. The county mental health agency is not responsible for providing services outside its traditional scope of services. An order shall be made referring a defendant to a county mental health agency only if that agency has agreed to accept responsibility for all of the following:
(m)
(n)
(o) A defendant may not be placed into a diversion program, pursuant to this section, for the following current charged offenses:
(p)
(2) The prosecution shall bear the burden of proving, by clear and convincing evidence, both of the following are true:
(3)