To diagnose an E. coli infection, your health care provider will ask you about your symptoms. He or she may also perform a physical exam to check for pain in the stomach and dehydration.