Typical causes of spitting up blood, called hemoptysis, include bronchitis, tuberculosis and throat irritation, states Healthline. Other causes include lung cancer, cognitive heart failure, crack cocaine, and autoimmune conditions such as microscopic polyangiitis and lupus, according to WebMD.
Spitting up blood can result from irritation of the throat due to excessive coughing, tuberculosis, bronchitis, nonmalignant lung tumors and weakening of the heart's pumping power, especially from mitral stenosis. This condition also occurs due to bleeding outside the airways and the lungs. Hemoptysis is a sign of cancer, infections, or problems in the lungs or blood vessels. This condition requires medical examination unless it comes from bronchitis, says WebMD.
Blood from hemoptysis appears bubbly because it contains mucous and air from the lungs. A person should see a doctor in case of a cough following an injury to the chest, blood in the urine or stool, or symptoms such as chest pain, breathlessness and dizziness, notes Healthline. The diagnosis involves determining the bleeding rate and the risk of breathing. Tests include medical history and physical examination, chest X-ray and computed scan. Treatments aim at stopping the bleeding and include surgery to remove a lung, bronchoscopy, and bronchial artery embolization such as inflating a balloon inside the airways, explains WebMD.