In care of people living with human immunodeficiency virus (HIV), early diagnosis of infection is one of the greatest challenges remaining. A promising approach to increase early diagnosis could be optimized HIV testing in persons with indicator conditions (ICs). ICs are conditions which are AIDS-defining in people living with HIV, conditions that may have significant adverse consequences for the individual's clinical management if the presence of HIV infection is not detected, and conditions with an (undiagnosed) HIV prevalence of ≥0.1%. In this cohort study, anonymous routine healthcare data of German statutory health insurances from 07/01/2016 to 06/30/2021 based on insured persons with an ICD-10-based diagnosis of selected ICs were analyzed. In a primary analysis, two stratifications (gender and age), and four sensitivity analyses HIV prevalence/incidence were calculated for persons with at least one of 26 IC described in international literature. This study is registered in the German Clinical Trials Register (identifier: DRKS0002874). Routine healthcare data from 513,509 insured persons were selected for analysis. In the primary analysis, only in malignant neoplasm of bronchus and lung a HIV prevalence was observed with a 95%-CI < 0.1%. ICs with particularly high HIV prevalence were pneumocystosis (40.33%), oral hairy leukoplakia (36.71%), and Kaposi's sarcoma (29.86%). When stratified by gender, it was observed that in female patients, the 95%-CI of HIV prevalence fell below 0.1% for seven ICs. No such effect was observed in male patients. Stratified by age, among patients aged 30 to <60 years, the 95%-CI of HIV prevalence were always ≥0.1%, while in the other groups the 95%-CI fell below 0.1% for several ICs. In samples of patients with ICs in Germany, HIV prevalences/incidences were found to be ≥0.1% for all ICs except malignant neoplasm of bronchus and lung. This confirms the classification of these conditions as ICs for the German context and emphasizes the importance of HIV testing in these populations. This analysis is part of the HIV testing recommendations in guidelines and practice study (German title of the study: "HIV-Testempfehlungen in Leitlinien und Praxis"; acronym: HeLP), which is funded by the German Federal Joint Committee as part of the Innovationsfonds program to further develop the German healthcare system (funding number 01VSF21050).