Secondary type is observed in people affected by underlying medical conditions such as asthma, pneumonia, chronic obstructive pulmonary disease (COPD), tuberculosis. whooping cough, or cystic fibrosis. Heavy smokers and people who use recreational drugs are at a higher risk of developing this condition.