OP welcome and I am sorry this happened to you. Sadly, this is the type of behaviour we are trying to grasp in the 'Question for TSOs' thread. It deals with how TSOs react to passengers with medical conditions and/or injuries. Many of us have experienced unacceptable behaviour, yet the TSOs on that thread give a variety of answers including such a thing doesn't happen, one shouldn't fly if one is ill/injured/disabled, sometimes one has to deal with more pain and injury when flying, etc etc etc.
Your story just reinforces how disturbing that thread is, and how challenging it is for those with medical conditions to travel through TSA checkpoints.