Around here the docs assume that ulcers are due to h pylori and start you on medications asap. The whole diet thing is not very effective at all for helping ulcers. Voice of experience here. I have a lot of problem with my stomach due to a doctor rxing WAY too many medications at way too high dosages for way too long during my teen years. It caused permanent damage for me, and my mom saw him and has even worse problems. She had to have the valve at the bottom of her stomach removed along with the parts that create acid because of all the scar tissue. It wasn't a fun thing, but it did free her from a TON of pain.
difficult child's ulcers are probably from infection. it is no more something for you to feel sorry for than strep throat is. Nothing you could have done would have stopped it. The antibiotics are pretty harsh and she MUST avoid all alcohol while taking them. If she uses mouthwash, go and get the alcohol free kind for her. Even that amt of alcohol can make you very sick. My bro has had ulcers over and over for years. Back about fifteen years he went to India for several weeks. He spent several days on a public bench outside a bus station in a city because he was so horribly ill. He was taking antibiotics because he got sick. He was at the stage where his alcoholism demanded that he drink daily. You cannot drink legally in that area of India, and he was sneaking some local alcohol (that you can go to prison for years for drinking in that area, of course - it wouldn't be 'fun' if it as legal, now would it?). He 'forgot' that the anitbiotics he brought were NOT to be taken with alcohol. He assumed it was like a pain medication, where it makes you sleep and makes the medication have stronger effects.
He didn't know it would cause him to be so ill for days that he literally could not move more than a few feet from a restroom. esp given the public restroom sin that area of the world. It was so bad that he didn't drink again for the remainder of his trip, which was a long time with-o alcohol for him.
In recent years he found that even mouthwash with alcohol causes problems. Not nearly as bad, but it is still a problem.
It is possible that her ulcers are not caused by h pylori, but it would be rare. Usually those types of ulcers are due to overuse of medications that are hard ont he system. NSAIDS and steroids are two of the worst. I have battled this type of ulcer and it will mean she has to avoid those medications whenever possible.
I am glad that the cause of her pain has been discovered. I hope that the doctor can give you a letter for school that will deal with whatever problems will arise there. Ulcers are nasty, painful and dangerous. I hope difficult child won't try illegal drugs. Many of them would be super dangerous for a person with ulcers. If hers are bleeding, any medication could end up in her bloodstream, which is a real problem with some medications.