Welfare and Institutions Code § 5329
ARTICLE 7. Legal and Civil Rights of Persons Involuntarily Detained
Nothing in this chapter shall be construed to prohibit the compilation and publication of statistical data for use by government or researchers under standards set by the Director of State Hospitals.