The influenza (flu) vaccination is effective in preventing other lung infections and helps prevent the spread of influenza. Pneumonia patients, particularly those age 50 or older, who are discharged during the flu season (approximately October through March) should be screened for influenza vaccine status and receive the vaccine prior to discharge, if indicated.
Source:
http://www.hospitalcompare.hhs.gov