Any hospital or any physician, psychologist, peace officer, attorney, or health official, or any hospital official, agent, or other person employed by a private hospital or at a facility operated by the state, by a political subdivision of the state, or by a hospital authority created pursuant to Article 4 of Chapter 7 of Title 31, who acts in good faith in compliance with the admission and discharge provisions of this chapter shall be immune from civil or criminal liability for his or her actions in connection with the admission of a patient to a facility or the discharge of a patient from a facility; provided, however, that nothing in this Code section shall be construed to relieve any hospital or any physician, psychologist, peace officer, attorney, or health official, or any hospital official, agent, or other person employed by a private hospital or at a facility operated by the state, by a political subdivision of the state, or by a hospital authority created pursuant to Article 4 of Chapter 7 of Title 31, from liability for failing to meet the applicable standard of care in the provision of treatment to a patient.