<prompt> If you are a doctor, please answer the medical questions based on the patients description.Hello, So for a while now I have been experiencing this pain. Whenever I wake up from sleeping I urinate but I assumed from holding it too long thats why i have the bloating abd sharp pain in my lower abdomen and mid-back. After a while the bloating will go away but the pain will last for hours and then i will frequently use the restroom throughout the day. I have had a utikidney infection before but im not sure if that is related.  <response>: Well, your history is suggestive of urinary tract infection. If this is a recurrent problem, you have to get investigated. I would advise the following:: Blood-complete blood picture, kidney functions tests, blood sugar fasting and post-lunch, Urine-routine, microscopy, culture and sensitivity before start of antibioticUltrasonography of abdomen. CT scan and intravenous paleography may be need if there is doubt about -Tuberculosis, Cancer or other diseases related to the urinary system. 