Any superintendent or person in charge of the county psychiatric hospital, and any public officer, public employee, or public physician who either admits, causes to be admitted, delivers, or assists in delivering, detains, cares for, or treats, or assists in detaining, caring for or treating, any person pursuant to this chapter shall not be rendered criminally liable thereby.