institution; a facility engaged in providing services for the prevention, diagnosis, treatment or care of human health conditions, including facilities operated and maintained by any state agency, except facilities for the care or treatment of mentally ill persons or persons with substance abuse problems; and a residential facility for the mentally retarded licensed pursuant to section 17a-227 an