If someone doesn't get a vaccination, and as a result gets infected, and then as a result passes the disease to someone else, then this should be treated as equivalent to harming someone by causing an accident through reckless driving.
What is needed here are laws making it a crime to conceal that you have or had a communicable disease, so infections can be tracked and fault determined.