Health and Safety Code § 24254
CHAPTER 2. Patient Access and Protection
This section does not prohibit a person who is in lawful custody from being accompanied to access health care services and for their transportation and arrangement to health care provider entities, and does not prohibit any person from entering nonpublic areas of a hospital to receive care for themselves or someone in their care or custody.