Period catastrophe

So this might get a little tmi, about two days ago I got my period, I woke up at three in the morning because of the pain I went to the bathroom and I was having the most intense cramps I might have ever had and I was shiting myself and throwing up, when I threw up it seemed to help the pain for a short time I was also shaking uncontrollably and very light headed. I almost went to the hospital it was that bad, I took some medicine and the pain was still there and it made the pain bearable but I was still tossing and turning in discomfort until I feel asleep.

*note that I had been having diarrhea the past couple days before this and my last period I had a UTI