Abstract
BACKGROUND: Human immunodeficiency virus (HIV) increases the risk of developing cancer. We aimed to assign HIV status to cancers diagnosed in public laboratories recorded in the National Cancer Registry (NCR) in South Africa, guided by HIV counselling and testing guidelines. METHODS: We used natural language processing to extract HIV-related information from free-text reports and probabilistic record linkage to match cancers diagnosed between 2004 and 2021 to HIV-related tests from the National Health Laboratory Service Corporate Data Warehouse. We assigned HIV status based on the results of the HIV-related tests and their timing relative to cancer diagnosis. We used descriptive statistics and logistic regression to examine HIV status documentation patterns and HIV prevalence in cancer patients. RESULTS: Of the 496,517 cancers reported to the NCR, 41% (n = 203,937) had a documented HIV status. Documentation increased from 29% in 2004-2009 to 52% in 2016-2021. The odds of having a documented HIV status were 20% higher in females than in males and 16%-28% lower in other population groups compared with Black Africans. Patients with infection-related cancers had almost threefold higher odds of having a documented HIV status than patients with infection-unrelated cancers. Among cancer patients with documented HIV status, HIV prevalence was 75% for infection-related and 32% for infection-unrelated cancers. CONCLUSION: HIV status documentation among people with cancer has improved over time, but it is still suboptimal. Clinicians and pathologists in HIV endemic areas need to improve HIV ascertainment at cancer diagnosis and reporting to cancer registries to inform patient care and guide cancer control efforts.