Settlement over NC mental health could cost millions