Risk factors for community-acquired pneumonia diagnosed upon hospital admission