Help!?

I have no idea to what to do. My one year old is eating solids with milk. She was on soy similac no problems. So I switched her to soy milk when she turned one. 2 weeks later with solids and milk she is having so many problems with going poop. We went to the emergency room and they have her miralax. We're on day 2 and it's still not helping. She screams and holds her legs to her chest. I'm trying everything. But I'm just at a lost. No one in my family is helpful. I've been giving her solids and it's not helping. I'm giving her milk and water and it's not helping. I just feel so depressed. Any advice?