To diagnose pyelonephritis, your health care provider will perform a physical exam. He or she will ask you questions about your personal and family medical history. A urine sample will be tested for bacteria, blood or pus.