Welfare and Institutions Code § 7350
ARTICLE 7. Leave of Absence, Discharge, and Restoration to Capacity of Persons Other Than the Mentally Disordered Criminals
The provisions of this article except for Section 7355 shall not apply to any patient held upon an order of a court or judge in a proceeding arising out of a criminal action.