Your doctor can diagnose the ascariasis by finding the eggs(or live worms) in your stool, esp once there are mature female roundworms in your intestines. Diagnosing lung infection is more difficult, but can be confirmed by finding evidence of the larvae in lung or stomach fluids. Your doctor can request tests to diagnose this condition using abdominal x-ray, complete blood count, stool egg and parasites exam.
Attribution: Avallain