My 13 year old daughter is suffering headaches and pain in the upper back . It takes two weeks so . Besides his stomach and right ribs hurt. Note sensation of heat and cold and it hurts. It also hurts bending, moving and coughing.
I think it's time for your daughter to go to see a doctor. Did you just start a new sport or hobby ? This may have caused all his symptoms. But there are many other possible serious causes should be ruled out .