I was waiting for your reply.
I understand your concern.
I am very sorry for your symptoms.
Pain in right flank and back under ribs can be from kidney.
With the history of painful urination & frequency, an infection is a possibility.
However, you are taking antibiotics.
Its effects would be evident in 2-3 days.
If the symptom continues, I would advise to take an examination by doctor again..
A repeat urine culture, ultrasound test can be considered.
I hope this information will be helpful.
If you have any query, please feel free to ask.
Your satisfaction is my goal.