Neither a public entity nor a public employee is liable for injury proximately caused by the failure of the employee to furnish or obtain medical care for a prisoner in his custody; but, except as otherwise provided by Sections 855.8 and 856, a public employee, and the public entity where the employee is acting within the scope of his employment, is liable if the employee knows or has reason to know that the prisoner is in need of immediate medical care and he fails to take reasonable action to summon such medical care. Nothing in this section exonerates a public employee who is lawfully engaged in the practice of one of the healing arts under any law of this state from liability for injury proximately caused by malpractice or exonerates the public entity from its obligation to pay any judgment, compromise, or settlement that it is required to pay under subdivision (d) of Section 844.6.