Hi there

Did you "just" leave the treatment or really end it? If you took off in midst of a panic attack, go back the next day or call them to let them know you're sorry and you're coming back. If you have truly ended the mandatory treatment, call you lawyer immediately- surely there must be a way around this. Maybe even your PDoc/T can help- like sending a statement to the court on your behalf.
BTW if your meds were working, why did they/you change them?