Is this illegal?

I was diagnosed with autism as a toddler and recently diagnosed with anxiety. I have 2 medications I take during the day, one I take daily and one I take as needed. This day specifically my anxiety meds weren’t working and I knew I needed a higher dosage. The medication I take as needed is kept in the nurses office and we have a digital pass system to allow teacher to know who’s supposed to be where. I made a pass on my computer and raised my hand to let her know I needed to go to the nurse and she told me to take my meds later and do my work. She made me tell her in front of the whole class that I was going to have a panic attack and that I needed my meds. She sent me to the hallway for it. I walked to the nurse with a friend who found me in the hallway and I took my meds and my mom picked me up. But is what she did even legal? I live in Indiana if that helps, I would figure it out myself but I can’t find any info on it from online sources and I want this teacher fired.