This article shall not be construed to compel any person to submit to any medical or dental examination or treatment under the authority of this act when the person or the parent or guardian of the person, if a minor, objects to the examination or treatment on religious grounds or to permit any discrimination against any person on account of such objections: Provided, That exemption from medical or dental examination shall not be granted if the Secretary of Health finds that facts exist under which the exemption constitutes a present substantial menace to the health of other persons exposed to contact with the unexamined person.
24 P.S. § 14-1419