If any person having the care of a person with mental illness who has voluntarily entered a hospital or other facility for treatment or care, or who is responsible for psychiatric examination care, treatment, and maintenance of any person involuntarily hospitalized under sections 229.6 through 229.15, whether in a hospital or elsewhere, with or without proper authority, shall treat such patient with unnecessary severity, harshness, or cruelty, or in any way abuse the patient or if any person unlawfully detains or deprives of liberty any person with mental illness or any person who is alleged to have mental illness, or if any officer required by the provisions of this chapter and chapter 226 , to perform any act shall willfully refuse or neglect to perform the same, the offending person shall, unless otherwise provided, be guilty of a serious misdemeanor.
Iowa Code § 229.38