Court of Appeal rules in York care home case