(a)
Neither a public entity nor a public employee acting within the scope of his employment is liable for injury resulting from diagnosing or failing to diagnose that a person is afflicted with mental illness or addiction or from failing to prescribe for mental illness or addiction.
(b)
A public employee acting within the scope of his employment is not liable for administering with due care the treatment prescribed for mental illness or addiction.
(c)
Nothing in this section exonerates a public employee who has undertaken to prescribe for mental illness or addiction from liability for injury proximately caused by his negligence or by his wrongful act in so prescribing.
(d)
Nothing in this section exonerates a public employee from liability for injury proximately caused by his negligent or wrongful act or omission in administering any treatment prescribed for mental illness or addiction.