Except for an examination or diagnosis for the purpose of treatment, neither a public entity nor a public employee acting within the scope of his employment is liable for injury caused by the failure to make a physical or mental examination, or to make an adequate physical or mental examination, of any person for the purpose of determining whether such person has a disease or physical or mental condition that would constitute a hazard to the health or safety of himself or others.