Brooklyn Appeals Court sends mentally ill patient back to facility