It goes without saying that I cannot offer a diagnosis, but the OCD diagnosis is a reasonable one. The teacher will likely have to be influential in offering cues to your daughter, so (if she is not already) she should be seated near the teacher. Yes, she can receive some relief via medication. Given the severity of your daughter's condition, pharmacological treatment is a very sensible, even compelling, plan. Either confer with the psychiatrust who already did the prescribing, or seek another child psychiatrust. There are a number of options - e.g., fluoxetine, fluvoxamine and paroxetine, or even a small dose of another class of drugs often used to tame anxiety.