Idk what to do!

Brianna-mommy of 2💕

My 8 month old has been going back and forth with constipation and today when she was pooping she was crying because it hurt and after the poop slid out a little bit of blood came out to. Should I call the doctor?