y not refuse out of home placement when requested by the child if there is a substantiated history of abuse or neglect in the home by the parent or legal guardian; (iii) subject to clauses ( i ) and (ii), shall direct the type and length of such out-of-home placement; (iv) subject to clauses ( i ) and (ii), shall give due consideration to the recommendations of the court.