Stomach upset

I’m currently 18 weeks almost 19 weeks pregnant with my first baby for the past 3-4 days my stomach hasn’t been right My poop is green and I have diarrhea luckily no throwing up! Is this a normal thing for being 18 weeks? I went to the bathroom earlier tmi I had to pee and I thought I had to pass gas and it wasn’t gas lol