stomach bug

I have thrown up 3 times today and had diarrhea. Anything I put in my mouth comes back up. Should I call the doctor? Is this safe for the baby