Tmi ... Diarhea and stomach pains

I'm 24 weeks and have had loose bowels for the past week on and off, last night as well as having this I had quite strong stomach pains that I could control to a point with the way i was laying.

Absolutely freaking out this morning due to miscarrying back in April.

Anybody else have this? Any advice? Is this normal? Should I contact midwife or assessment unit or let it flush out?