Surgeons take precautions to prevent this by prescribing blood thinners, such as aspirin or heparin, and using leg compression equipment (typically an air pressure device that repeatedly inflates and deflates to massage the leg and keep blood flowing).