After adjusting for age, sex, sociodemographic factors and CD4 count, liver fibrosis/cirrhosis was strongly associated with HBV (aOR 8.80, 95% CI [2.46–31.45]; p < 0.001) and diabetes/prediabetes (aOR 9.89, 95% CI [1.14–85.67]; p < 0.037). This evidence concerns the gene CD4 and diabetes mellitus.