Judge to hold hearing on law banning gender-affirming care to minors