Might go to the ER

Shelby
I posted yesterday how I was spotting to light flow for 9 days and then it stopped for 3 days then I was spotting to light flow back to spotting for 6 days. It then stopped for 5 days and I started spotting yesterday in the morning with small cramps and flow got to light/medium flow. Well this morning I was woken up by awful painful cramps just on my right side at 530am. It is now 605am and I still haven't moved out of bed because the cramps are so painful. I don't really want to go to the ER but if I have to I will. Anyone have any ideas what could be causing this?