You will need to change her diet. Caffeinated drinks for example cause dehydration that causes bowels to be void of liquids needed to cause normal elimination. I also suggest lots of water or Gatorade. A good idea also is to give fiber pill to regulate bowels. Cut out candy or sweets. Serve three meals failed and good whole grain treats.
My 10 year old has been diagnosed with severe constipation and often poos herself as she doesn't know when she needs to go, she has been given a number of enemas but nothing seems to work, I am very frustrated as I don't know who turn to?
I suggest going to see a specialist. I would think a pediatric internist would be the one, but I would check. Definitely get another opinion. I feel bad for her and hope she feels better soon. Good luck Mom.