Notwithstanding any other provision of law, any physician licensed to practice in this state, upon consultation by a minor as a patient, with the consent of such minor patient, may examine, prescribe for, and treat the minor patient for use of drugs or a substance use disorder without the consent of or notification to the parent, parents, or legal guardian of the minor patient, or to any other person having custody or decision-making responsibility with respect to the medical care of the minor patient. In any such case the physician or any person acting pursuant to the minor's direction incurs no civil or criminal liability by reason of having made such examination or prescription or having rendered such treatment, but this immunity does not apply to any negligent acts or omissions by the physician or any person acting pursuant to the physician's direction.