add condition of Patient Category to Total column: correct the condition