HIPAA has exceptions for contagious diseases, and more importantly does not apply to the military. In the military, you do not have control over your own body.
Not 100% true at all, I avoided the malaria shot by claiming allergies, others can declare religious exemptions or at least they user to be able to.