A gunman has been killed after shots were fired Saturday at a hospital in central Pennsylvania, officials said.