I'm no doctor, but it definitely seems that digestion is a big problem. You probably have alot of undigested food in you that doesn't want to come out and what you lose in the bathroom is probably mostly liquid and SOME digested food, but not all.
This site has some info on digestion, bowel movements (toilet), transit time (digestion/elimination) and fiber.
It sounds more extensive than just a hernia (maybe infection also?). Garlic is good for the digestion and the blood (cleans the blood and kills bacteria in the gut, experiment with small amounts to discover your tolerance). If it helps with the pain, add a little Sea Salt (helps absorption of food particles and has more than six dozen minerals). Drink enough water (not liquids,...WATER). Drink vegetable juices (it's possible to eliminate solid foods altogether because vegetable juice is very nutritious). Cut out fish altogether (mercury,...and hard to digest OIL). When you get the "munchies", eat easy to digest foods...cottage cheese, etc. Coffee has acid, soda has acid and the carbonation is probably strenuous for your intestine.
Could you have an ulcer?...Cabbage juice and other veg juices are good for that.
Check other sites here.