A resident who is transferred to a state mental hospital and no longer requires treatment in a state mental hospital or a residential care facility shall be discharged.