As your history suggests possibility of involvement of GIT( your Digestive system) or/and Urinary tract
for this may be you have stone or some blood clots
in urinary tract along with infection? Infection or inflamatory pathology in part of intestine if not then your diet and food habit needs to be reviewed for any food allergy
or intolence of any particular item. although you have not reported any fever.are you taking any treatment now or not. Get your blood,urine and stool examination also a X ray of abdomen and a sonography of abdomen may useful if nothing comesout seek advise from Urologist
and Gastroenterologist for any cystoscopy
or endoscopy of upper part or Lower part is required.Be positive your problem will be solved .Once a definite diagnosis is mede treatment would be possible .Best of luck.