Cal. Welf. & Inst. Code § 5622
(a) A licensed inpatient mental health facility, as described in subdivision (c) of Section 1262 of the Health and Safety Code, operated by a county or pursuant to a county contract, shall, prior to the discharge of any patient who was placed in the facility, prepare a written aftercare plan. The aftercare plan, to the extent known, shall specify the following: