  While vaccines are crucial to end the COVID-19 pandemic, public confidence in
vaccine safety has always been vulnerable. Many statistical methods have been
applied to VAERS (Vaccine Adverse Event Reporting System) database to study the
safety of COVID-19 vaccines. However, all these methods ignored the adverse
event (AE) ontology. AEs are naturally related; for example, events of
retching, dysphagia, and reflux are all related to an abnormal digestive
system. Explicitly bringing AE relationships into the model can aid in the
detection of true AE signals amid the noise while reducing false positives. We
propose a Bayesian graphical model to estimate all AEs while incorporating the
AE ontology simultaneously. We proposed strategies to construct conjugate forms
leading to an efficient Gibbs sampler. Built upon the posterior distributions,
we proposed a negative control approach to mitigate reporting bias and an
enrichment approach to detect AE groups of concern. The proposed methods were
evaluated using simulation studies and were further illustrated on studying the
safety of COVID-19 vaccines. The proposed methods were implemented in R package
\textit{BGrass} and source code are available at
https://github.com/BangyaoZhao/BGrass.
