This question never seems to post, so hopefully it will today!

Paediatrician asked daughter to keep a symptom diary, she's aged 15 years old and 11months. The following are what she's noted down and more specifically the things that I felt were the most important things to mention. At times the pain can be very severe to the point of ending up in A&E. Also resulting in missing a lot of school, which has already resulted in having to drop 2 GCSE's (she's year 11.So it's a very important year) can tell that she genuinely tries very hard to get there but is having very few full days at school and has been off in severe pain for the last 2 weeks. Ideally trying to find things possibly to suggest to Paediatrician so can get tests done and get it sorted ASAP and try to get things as normal as possible for some stability for her in life and to know that she's not crazy and that there's a cure or treatment for it(I hope!) even if it's just incurable and a case of taking pain medication at least we'd have answers
My observations are;
The pain appears to be worse when laying down to try to sleep and it's very difficult to find a somewhat comfortable position for sleep, more so to get back into that position after waking up. Sometimes the pain feels like it's going to my back(?) Like above my hip on the right side, it's hard to explain but like under my ribs but quite far above my pelvis(?the bumpy bit that you can see) Basically above my belly button but under my ribs and sometimes feels like it's coming from towards my back more so when the pain is at it's worst. It's not exactly under my rib it's like a bit further down and it radiates(?) to part of my back and near my liver or is it closer to my kidney. I'm not really sure what's closer to the pain to be honest, Biology was never my strongest point. The pain still feels like it affects my back a bit even when the pain isn't so bad it's just less obvious and the pain is always there and has been for several months now. It's never below a 7 on the pain scale and usually around an 8. 7 and at it's most severe it's a 9.5. Currently I'm taking 60mg Codeine every four hours , as well as 500mg paracetamol and when needed 200mg Ibuprofen. I've previously tried Amatryptyline and Naproxen which where both ineffective. Doctor says the next step is Tramadol & he's thinking of it possibly being Chronic Functional Abdominal Pain at present(but he doesn't seem very sure at all and admitted it's likely something more complex but they have to label it as that until a reason for the pain is found and an official new diagnosis can be made. my Gamma in my liver was high(57) in March but since it appears to have returned to normal and I personally agree that it doesn't seem like my Liver. I was thinking that narrows it down to my kidney and small intestine (right?)

So does anybody know what it could be?
Or have any alternative pain medications in mind?
A friend of mine has mentioned a few things such as Loin Pain Hematuria Syndrome and Nutracker Syndrome (my old doctor was also thinking maybe Nutcracker)

P.S-It has been confirmed that there are no known associations with food and IBS has been ruled out of the equation.
She's not remotely stressed and is very happy at school also.

Any ideas are much appreciated.