Compared to TNF inhibitors, IL-23 inhibitors showed a significantly decreased risk of certain diseases, including encephalitis (HR 0.18; 95% CI 0.04–0.78), hepatitis B reactivation (HR 0.24; 95% CI 0.12–0.47), cytomegalovirus (HR 0.25; 95% CI 0.07–0.86), influenza (HR 0.52; 95% CI 0.38–0.71), herpes zoster (HR 0.58; 95% CI 0.41–0.82), otitis media (HR 0.66; 95% CI 0.44–0.97), and parasitic disease (HR 0.78; 95% CI 0.64–0.95). This evidence concerns the gene TNF and viral encephalitis.