A pulmonary embolism occurs when a blood clot forms in the deep veins of the legs or pelvis and travels through the bloodstream, lodging in the pulmonary arteries of the lungs. It can be difficult to diagnose and is a potentially life-threatening condition. Diagnostic tests may include a d-dimer blood test, CT scan, ventilation-perfusion scan, echocardiogram, and angiogram. Treatment involves anticoagulation medications to prevent further clotting and thrombolysis in some severe cases. Prevention by minimizing risk factors for deep vein thrombosis is important.