I need help

I had unprotected sex and I got a UTI I went to the doctor for it and i got medication for it I took some of the pills . After I felt better I stoped taking the medication. My right kidney started to hurt it mostly hurt while at work I could barely walk . It eventually stopped but now every time I go to the bathroom I poop blood and it’s a lot of blood it happens every time now . The whole toilet turns red every time I go . I’m really worried