The State Department of State Hospitals shall maintain in a convenient central location and shall make available to the Department of Justice those records that the State Department of State Hospitals has in its possession that are necessary to identify persons who come within Section 8100 or 8103. Upon request of the Department of Justice, the State Department of State Hospitals shall make these records available to the Department of Justice in electronic format within 24 hours of receiving the request. The Department of Justice shall make these requests only with respect to its duties with regard to applications for permits for, or to carry, or the possession, purchase, or transfer of, explosives as defined in Section 12000 of the Health and Safety Code, devices defined in Section 16250, 16530, or 16640 of the Penal Code, in subdivisions (a) to (d), inclusive, of Section 16520 of the Penal Code, or in subdivision (a) of Section 16840 of the Penal Code, machineguns as defined in Section 16880 of the Penal Code, short-barreled shotguns or short-barreled rifles as defined in Sections 17170 and 17180 of the Penal Code, assault weapons as defined in Section 30510 of the Penal Code, and destructive devices as defined in Section 16460 of the Penal Code, or to determine the eligibility of a person to acquire, carry, or possess a firearm, explosive, or destructive device by a person who is subject to a criminal investigation, a part of which involves the acquisition, carrying, or possession of a firearm by that person. These records shall not be furnished or made available to any person unless the department determines that disclosure of any information in the records is necessary to carry out its duties with respect to applications for permits for, or to carry, or the possession, purchase, or transfer of, explosives, destructive devices, devices as defined in Section 16250, 16530, or 16640 of the Penal Code, in subdivisions (a) to (d), inclusive, of Section 16520 of the Penal Code, or in subdivision (a) of Section 16840 of the Penal Code, short-barreled shotguns, short-barreled rifles, assault weapons, and machineguns, or to determine the eligibility of a person to acquire, carry, or possess a firearm, explosive, or destructive device by a person who is subject to a criminal investigation, a part of which involves the acquisition, carrying, or possession of a firearm by that person.
Ca. Welf. and Inst. Code § 8104