N.Y. Mental Hygiene Law § 9.51
(d) Applications for admission or transfer of an individual to a residential treatment facility for children and youth must document that there has been an evaluation of the needs of the individual and a determination of the individual's need for treatment in a residential treatment facility for children and youth and the appropriateness of such treatment. In the case of individuals who are applicants or recipients of medical assistance pursuant to title eleven of article five of the social services law, such determination shall also include certification of need for residential treatment facility services in accordance with this section. Where certification is required, an individual will be certified for admission if: