Heparin is a medicine commonly used to prevent blood clots. However, your immune system can trigger the medicine to cause blood clots and thrombocytopenia. This condition is called heparin-induced thrombocytopenia.