Social worker charged with rape told victim sexual conduct was necessary for mental health treatment