Could such a diagnosis be made in the middle of an apocalypse? Definitively, probably not - but the group has both a veterinarian and a physician within the prison. It wouldn't take much to do a crude epidemiological analysis, asking those who are coughing if they'd been exposed to pigs or how much time they'd spent around other (possibly sick) people. If all the sick people cluster together and haven't been around the pigs at all, flu is a more logical choice, which may have originated in the pigs or the people. (An overcrowded prison, with people mixing from two recently assimilated communities, is certainly a great place for infectious diseases to spread.) To complicate matters, Rick correctly mentions to Carl at the end of the episode that the pigs could have made people sick or people could have sickened the pigs - many germs don't care about species boundaries. There's also the mysterious rat-feeder introduced in Sunday's episode: Someone within the prison is catching live rats and feeding them to the zombie horde lingering outside the prison gates. Rats are notorious vectors of disease. Do they play a role in this new outbreak?
More answers may come in the next episodes. Perhaps the zombie virus itself will jump species, as it does in Jonathan Maberry's Rot and Ruin series (zombie boars) or Mira Grant's Newsflesh trilogy (zombie bears). Animals may have more to fear from a zombie pandemic than was previously thought.