Text this: Robust diagnostic classification via Q-learning