Intestinal obstruction in newborn⁉️

Shanice • Baby dust to all!!

My son is seven weeks and has had a problem with his bowels since about two weeks of age. First it started off as diarrhea. He was going probably at every feed so much so that he bum got red and raw but we thought it was due to breastfeeding so we tried similac pro advance at night breastfeeding throughout the day. That seemed to help with the too frequent stool, but then we noticed blood in his stool. Alerted our pediatrician and she said he may be allergic to proteins found in my breast milk so we eliminated breastfeeding completely. Blood disappeared, but then he started experiencing dark stool and then infrequent stools. Now painful stools. He’s on alimentum and elecare hypoallergenic formula. This is his stool from this morning. Idk what this is but he’s in pain and heartily drinking his formula. Any advice? Has any other mother gone through something similar? If so what did it turn out to be?