Today, Doppler ultrasound is a common test: it can demonstrate areas of blood flow and can distinguish clearly between epididymitis and torsion. However, as torsion and other sources of testicular pain can often be determined by palpation alone, some studies have suggested that the only real benefit of an ultrasound is to assure the person that they do not have testicular cancer. : p.237  Nuclear testicular blood flow testing is rarely used.Additional tests may be necessary to identify underlying causes. In younger children, a urinary tract anomaly is frequently found. In sexually active men, tests for sexually transmitted diseases may be done. These may include microscopy and culture of a first void urine sample, Gram stain and culture of fluid or a swab from the urethra, nucleic acid amplification tests (to amplify and detect microbial DNA or other nucleic acids) or tests for syphilis and HIV. Classification
Epididymitis can be classified as acute, subacute, and chronic, depending on the duration of symptoms. Chronic epididymitis
Chronic epididymitis is epididymitis that is present for more than 3 months. Chronic epididymitis is characterized by inflammation even when there is no infection present. Tests are needed to distinguish chronic epididymitis from a range of other disorders that can cause constant scrotal pain including testicular cancer (though this is often painless), enlarged scrotal veins (varicocele), calcifications, and a possible cyst within the epididymis. Some research has found that as much as 80% of visits to a urologist for scrotal pain are for chronic epididymitis.
: p.311  As a further complication, the nerves in the scrotal area are closely connected to those of the abdomen, sometimes causing abdominal pain similar to a hernia (see referred pain). Chronic epididymitis is most commonly associated with lower back pain, and the onset of pain often co-occurs with activity that stresses the low back (i.e., heavy lifting, long periods of car driving, poor posture while sitting, or any other activity that interferes with the normal curve of the lumbar lordosis region). : p.237

Treatment
In both the acute and chronic forms, antibiotics are used if an infection is suspected. The treatment of choice is often azithromycin and cefixime to cover both gonorrhoeae and chlamydia. Fluoroquinolones are no longer recommended due to widespread resistance of gonorrhoeae to this class. Doxycycline may be used as an alternative to azithromycin. In chronic epididymitis, a four- to six-week course of antibiotics may be prescribed to ensure the complete eradication of any possible bacterial cause, especially the various chlamydiae. For cases caused by enteric organisms (such as E. coli), ofloxacin or levofloxacin are recommended.In children, fluoroquinolones and doxycycline are best avoided. Since bacteria that cause urinary tract infections are often the cause of epididymitis in children, co-trimoxazole or suited penicillins (for example, cephalexin) can be used.Household remedies such as elevation of the scrotum and cold compresses applied regularly to the scrotum may relieve the pain in acute cases. Painkillers or anti-inflammatory drugs are often used for treatment of both chronic and acute forms.