. . . . "For the operation of the department; provided, that the department shall not refer or discharge a child or adolescent to the custody or care of the department of social services until the department of mental health forwards its assessment and recommendation as to whether the child or adolescent is appropriate for foster care or, if due to severe emotional disturbance, is more appropriate for grou" .