Infectious diseases are a major cause of human morbidity, but most are avoidable. An accurate and personalized risk prediction is expected to alert people to the risk of getting exposed to infectious diseases. However, as data and knowledge in the epidemiology and infectious diseases field becomes available, an updateable risk prediction model is needed. The objectives of this article are (1) to describe the mechanisms for generating a Bayesian Network (BN), as risk prediction model, from a knowledge-base, and (2) to examine the accuracy of the prediction result. The research in this paper started by encoding declarative knowledge from the Atlas of Human Infectious Diseases into an Infectious Disease Risk Ontology. Automatic generation of a BN from this knowledge uses two tools (1) a Rule Converter generates a BN structure from the ontology (2) a Joint & Marginal Probability Supplier tool populates the BN with probabilities. These tools allow the BN to be recreated automatically whenever knowledge and data changes. In a runtime phase, a third tool, the Context Collector, captures facts given by the client and consequent environmental context. This paper introduces these tools and evaluates the effectiveness of the resulting BN for a single infectious disease, Anthrax. We have compared conditional probabilities predicted by our BN against incidence estimated from real patient visit records. Experiments explored the role of different context data in prediction accuracy. The results suggest that building a BN from an ontology is feasible. The experiments also show that more context results in better risk prediction.