What is the cause of yellow sputum with blood

Blood in yellow sputum needs to be distinguished from the morphology of the blood, depending on whether the yellow sputum carries blood or blood clots, whether the color of the blood is bright red or dark red or pink, or whether the morphology of the blood is foamy; different states, corresponding to different diseases, need to be analyzed on a case-by-case basis, mostly seen in pulmonary infarction. If the blood is pink and foamy, most of them may be related to pulmonary edema; if there is blood in yellow sputum for a long time and there are symptoms of weakness and wasting, it needs to be considered a tumor of the respiratory system.