1170.9.
(a) In the case of any person convicted of a criminal offense who could otherwise be sentenced to county jail or state prison and who alleges that he or she committed the offense as a result of sexual trauma, traumatic brain injury, post-traumatic stress disorder, substance abuse, or mental health problems stemming from service in the United States military, the court shall, prior to sentencing, make a determination as to whether the defendant was, or currently is, a member of the United States military and whether the defendant may be suffering from sexual trauma, traumatic brain injury, post-traumatic stress disorder, substance abuse, or mental health problems as a result of that service. The court may request, through existing resources, an
assessment to aid in that determination.(b) If the court concludes that a defendant convicted of a criminal offense is a person described in subdivision (a), and if the defendant is otherwise eligible for probation and the court places the defendant on probation, the court may order the defendant into a local, state, federal, or private nonprofit treatment program for a period not to exceed that which the defendant would have served in state prison or county jail, provided the defendant agrees to participate in the program and the court determines that an appropriate treatment program exists.
(c) If a referral is made to the county mental health authority, the county shall be obligated to 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 shall not be 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 the treatment of the defendant.
(d) When determining the “needs of the defendant,” for purposes of Section 1202.7, the court shall consider the fact that the defendant is a person described in subdivision (a) in assessing whether the defendant should be placed on probation and ordered into a federal or community-based treatment service program with a demonstrated history of
specializing in the treatment of mental health problems, including substance abuse, post-traumatic stress disorder, traumatic brain injury, military sexual trauma, and other related mental health problems.
(e) A defendant granted probation under this section and committed to a residential treatment program shall earn sentence credits for the actual time the defendant serves in residential treatment.
(f) The court, in making an order under this section to commit a defendant to an established treatment program, shall give preference to a treatment program that has a history of successfully treating veterans who suffer from sexual trauma, traumatic brain injury, post-traumatic stress disorder, substance abuse, or mental health problems as a result of that service, including, but not limited to, programs operated by the United States Department of Defense or the United States Veterans
Administration.
(g) The court and the assigned treatment program may collaborate with the Department of Veterans Affairs and the United States Veterans Administration to maximize benefits and services provided to the veteran.