Constipation

A

So lately I've been feeling pain in my lower right stomach It hurts terribly bad when taking a poop like a sharp pain also when I pee i went to the hospital they put me on a monitor to check the babys heart beat and that's it they told me I could be constipated. But I dont think thats the case I've been pooping every day sometimes more than once and its soft not hard. Has anyone had anything like this should I go to my ob, it also hurts to walk and when i lay on my side