Diagnosis typically involves a urine culture to identify the specific bacteria causing the infection. A thorough medical history and physical examination are also essential. In cases where anatomical abnormalities are suspected, imaging studies such as ultrasound or CT scan may be necessary.