What is the cause of coughing up greenish-black sputum?

If the patient is diagnosed with bacterial infection, antibiotics such as amoxicillin, penicillin V potassium tablets, cephalexin, levofloxacin, azithromycin, etc. should be used for treatment. If the patient is diagnosed with bacterial infection, antibiotics such as amoxicillin, penicillin V potassium tablets, cefprozil, levofloxacin, azithromycin, etc. can be used. If a patient coughs up blood, the cause of coughing up blood should be identified, such as tuberculosis, tumor, bronchial dilatation, etc., and the appropriate treatment should be taken according to the different diseases. Patients with tuberculosis need to be treated with anti-tuberculosis drugs, and patients with tumors need to consider surgical treatment, radiotherapy, chemotherapy, etc.