A 12-year-old Wigan girl has undergone emergency endoscopies and biopsies after suffering weeks of agonising pain.