Immunocompromised patients with severe community-acquired pneumonia have an increased risk of in-hospital and long-term mortality.