Welf. & Inst. Code 317
The court may appoint counsel for a child that is not represented for juvenile court proceedings. The appointed counsel may access all records maintained by a health care facility, physician, surgeon, or other health care practitioner. If the child is of sufficient age and maturity, the counsel must acquire consent or the child can invoke privilege.