you should understand that stomach pain occur due to numerous reasons like gastritis, food allergies, food poisoning, constipation, lactose intolerance, gastroesophageal reflux disease, ulcers, indigestion one of this might be the cause for your problem...considering your history pain may be due to constipation...Increasing your fiber intake will help promote soft and bulky stool.
Foods that are fiber-rich include beans, fruits, whole grains, beans
and vegetables. Increase Liquids
An inadequate amount of liquid in your diet can cause your stool to
become dry and impacted. Drink plenty of water, fruit juice, herbal tea and soup broth. Avoid certain beverages that contain alcohol or caffeine because these substances can dehydrate your body, leaving it
depleted of water and salts...Consult nearest gastroenterologist they will do the needful.
Hi there....difficulty in passing stools could be due to excessive loss of water( which can happen in summers due to increased heat) or intake of diet lacking fibres or fissure or haemorrhoids. You will start taking plenty of water, food rich in fibres like vegetables, raw fruits. Also stomach ache could be due to associated gastritis or kidney stones or pancreatitis or intestinal obstruction. For this you need to consult a general surgeon for further evaluation. Also the surgeon can start you on stoll softeners to help pass stools.