Section 14. Whenever the department finds that any person committed to it is mentally ill, within the meaning of chapter one hundred and twenty-three, developmentally disabled or a sexually dangerous person, within the meaning of chapter one hundred and twenty-three A, or a potential psychotic as defined and determined by the assistant commissioner of the bureau of clinical services, the department may make application to the proper court for a new commitment to the appropriate agency in accordance with law.