I have a UTI with chills and flank pain. When should I go to the doctor?

Immediately. Fever and chills suggest the UTI has reached the kidneys. Needs to be treated asap. Good luck.