Abstract
Objectives
This study aims to develop comprehensive computable phenotyping algorithms that integrate multiple domains of electronic health record (EHR) data within the All of Us (AoU) Researcher Workbench to identify sexually transmitted infection (STI) cases and characterize STI patterns.
Materials and Methods
We used AoU controlled tier data, version 8, which included participants enrolled from May 6, 2018, to October 1, 2023. Using data across multiple domains of EHRs in AoU, such as diagnostic codes, laboratory results, and medication records, we developed computational phenotyping algorithms to identify 3 leading STIs: chlamydia, gonorrhea, and syphilis.
Results
Among 393 596 participants with EHR data in AoU, 2603 had confirmed chlamydia, 1520 had gonorrhea, and 2762 had syphilis. By utilizing information from diagnostic codes and medication records, we identified an additional 4843 individuals with possible/presumed chlamydia and 18 855 individuals with possible/presumed gonorrhea. Among 5784 participants with at least one confirmed STI, 115 (2.0%) had all 3 infections. A notable shift in STI trends occurred in 2019, with the occurrence increasing from 2010 to 2019 before declining through 2023 across different STIs.
Discussion
The comprehensive computable phenotype algorithms developed in this study provide an enhanced approach to identifying STI cases that may be missed using traditional lab-based methods.
Conclusion
The computable phenotypes developed in this study provide a practical framework for more nuanced STI classification and downstream analysis in All of Us. Our approach may also support clinical and public health efforts by improving case identification beyond laboratory-only methods and informing interventions addressing clinical and social needs.
Keywords: All of Us, sexually transmitted infection, computational phenotyping
Background
In 2023, over 2.4 million cases of 3 nationally notifiable sexually transmitted infections (STIs), namely syphilis, gonorrhea, and chlamydia, were reported in the United States.1 Although the overall number of STIs decreased by 1.8% from 2022 to 2023, there was an increase in syphilis by 1.0% and the significant disparities in reported STIs persisted, with adolescents, young adults, non-Hispanic Black, Alaska Native, gay, bisexual, and other men who have sex with men disproportionately impacted by STI burdens.1–3 A timely and accurate STI case identification is critical for effective public health surveillance and prompt prevention and intervention efforts.4
The US national STI surveillance data have been collected through the National Notifiable Diseases Surveillance System using case definitions developed by the Council of State and Territorial Epidemiologists and the Centers for Disease Control and Prevention (CDC).1,5 However, most of these case definitions have solely depended on information from laboratory test results and do not consider additional information that may indicate the presence of STI, such as medication and diagnosis codes.6,7 For example, the notifiable disease algorithms for chlamydia are defined solely by positive laboratory tests, and laboratories generally report their positive STI test results to local or state health departments via electronic laboratory reporting.8 The reliance on confirmatory laboratory tests may underestimate the true STI burden, as many STI clinics, especially in settings with limited access to rapid testing, use a syndromic management approach, in which treatment is provided based on symptoms and signs without laboratory confirmation.9 Using additional patient information, including medication prescription history and diagnostic codes, from electronic health records (EHRs) to identify STIs could improve the completeness of disease reporting and enhance disease surveillance and intervention efforts.10
As a national community-engaged initiative aimed at accelerating research advances and precision medicine by partnering with at least 1 million participants with broad backgrounds across the United States, the All of Us (AoU) Research Program integrates a wealth of data sources, such as self-reported surveys (eg, social determinants of health), EHRs, physical measurements, and biospecimens, creating a comprehensive data repository.11–14 The longitudinal and multi-sourced data available through AoU provide a unique opportunity to develop computable phenotyping algorithms for STIs and allow for accurate identification of dynamic STI patterns. However, studies exploring STI-related health outcomes using AoU data are limited. Moseley et al. evaluated the disease burden of condyloma acuminatum, a type of STI caused by human papillomavirus, and observed elevated disease burden among individuals who were Black and men.15 These findings suggested AoU as a promising resource for advanced research in this area. This study aims to develop comprehensive computable phenotyping algorithms that integrate multiple domains of EHR data—diagnostic codes, laboratory results, and prescription records—within the AoU Research Program to improve the identification of 3 nationally notifiable STIs (ie, chlamydia trachomatis, gonorrhea, and syphilis) and characterize the temporal trend and the sociodemographic distributions of different STIs.
Methods
Data source
The AoU Research Program opened for enrollment in May 2018, and all US adults (aged 18 years or older) who are not incarcerated and are able to provide consent are eligible to participate.11 Participants were recruited online or through partner healthcare provider organizations in the United States11 As of May 7, 2026, more than 881 000 participants have consented to join the program, and over 597 000 participants have completed the initial steps of the program, including finishing the first 3 surveys, donating ≥1 biospecimen to the biobank, and providing physical measurements.16 The AoU institutional review board, a dedicated committee, has approved the AoU protocol and materials. AoU EHR data are mapped to the Observational Medical Outcomes Partnership (OMOP) Common Data Model and undergo additional curation procedures, including cleaning steps to standardize laboratory units and values.17 Deidentified data are shared via the AoU researcher workbench (www.allofus.nih.gov) for analysis with institutional data use agreements. Three levels of information are available in AoU, including the public tier, registered tier, and controlled tier. The controlled tier dataset contains individual-level data from EHRs, wearables, surveys, and genomics, as well as physical measurements at the time of participant enrollment. This study used AoU controlled tier data, version 8, which includes participants enrolled in the program between May 6, 2018, and October 1, 2023. All analyses were conducted in a secure informatics workspace provided by the National Institutes of Health that enables users to access and analyze the AoU data.
STI identification
Chlamydia and gonorrhea identification
As shown in Figure 1, we identified chlamydia and gonorrhea by documenting any of the following in the EHR data: (1) confirmed laboratory tests, which were captured by logical observation identifiers names and codes (LOINC), were identified as confirmed cases; (2) combinations of international classification of disease, ninth/tenth revision (ICD-9/10) codes, and relevant medication record (the medication records should be within the time range of 7 days before and 14 days after the record date of ICD codes) were identified as presumed cases; (3) diagnosis-related ICD code (no medication record) without any laboratory results or with a negative laboratory result were treated as possible cases, and (4) negative laboratory results without any medication record or ICD codes were considered as routine screening cases.
Figure 1.

Flowchart of chlamydia trachomatis and gonorrhea cases identification using electronic health records data.
Syphilis identification
Identifying potential syphilis infection in EHRs followed the steps in Figure 2. We identified all negative rapid plasma reagin (RPR) test records without any syphilis-related diagnosis or medication information as “negative laboratory results.” Positive RPR test records with no titer information in the test results but with a current confirmatory treponemal test (within the time range of 7 days before and 14 days after the RPR test) were categorized as “past or active infection.” For syphilis, it’s important to differentiate whether the positive laboratory test result indicates a past infection or a new active infection. For positive RPR test with titer information, we further grouped them into “past infection” and “active infection” by (1) positive RPR tests with titer <1:8 and have a confirmative treponemal test were treated as “past infection,” (2) positive RPR tests with RPR at least 4-fold greater than the last RPR test were treated as “active infection,” and (3) current RPR titer >1:8 and never had an active syphilis infection during the past 6 months were treated as “active infection.” For participants with treatment information: (1) individuals with benzathine penicillin (either 2.4 million units in a single dose or 7.2 million units in 3 doses with 1-week intervals) treatment were treated as “active infection” and (2) individuals with syphilis-related medicine other than benzathine penicillin and had a syphilis-related ICD code present within the range of 7 days before and 14 days after the treatment record were treated as “active infection.”
Figure 2.
The flowchart of syphilis case identification using electronic health records data in All of Us from 2010 to 2023.
For all 3 STIs, detailed information on the disease type and corresponding ICD-9/10 codes used are provided in Table S1. The related laboratory tests, along with their associated LOINC, are shown in Table S2. The medication information for each STI, including RxNorm (a normalized naming system for clinical drugs) codes, is presented in Table S3.
Clinician annotation activity
To ensure the robustness of our computational phenotyping algorithms, we conducted a blinded clinician annotation activity. A clinician specializing in STI treatment independently reviewed 175 randomly selected cases, including chlamydia cases (15 confirmed, 30 possible/presumed, and 15 no infection), gonorrhea cases (15 confirmed, 30 possible/presumed, and 15 no infection), and syphilis cases (11 active, 22 past, 11 active/past, and 11 no infection). The clinician was blinded to the algorithm-derived classification and reviewed row-level STI-related EHR data, including laboratory measurements, medical conditions, and drug exposures. Based on the available curated EHR data, each case was classified as confirmed, presumed/possible, or no infection for chlamydia and gonorrhea, and as active, past, active/past, or no infection for syphilis. We then compared the algorithm-derived classifications with clinician annotations, using clinician annotations as the internal expert adjudication. Confusion matrices were generated, and sensitivity, specificity, positive predictive value, negative predictive value, precision, recall, and F1-score were calculated for each disease category.
Sociodemographic characteristics
We derived 7 sociodemographic variables from the AoU database based on the responses to “The Basics” survey questions, including age at initial diagnosis of any STI (<18, 18-29, 30-44, 45-54, 55-64, and ≥ 65 years), sex at birth (male, female, and other/unknown), sexual orientation (straight, bisexual, gay, lesbian, none, and other/unknown), race (White, Black/African American, and Asian/other/unknown), ethnicity (Non-Hispanic and Hispanic), insurance coverage (covered by health insurance, not covered by health insurance, and unknown), highest education attainment (less than high school, high school or higher, and unknown), annual household income (<$25 000, $25 000-50 000, ≥$50 000, and unknown), employment status (employed/self-employed and unemployed), and marital status (married/living with partner, divorced/separated/widowed, never married, and unknown).
Statistical analysis
Descriptive statistics, including counts, percentages, and chi-square tests, were used to describe the demographic distribution of participants ever infected with different STIs. For the chi-square test, pairwise comparisons were performed using the proportion test with Holm adjustment for multiple comparisons. We used Venn diagrams to illustrate the identification of STIs in different domains of EHR data and the co-occurrence of different STIs. Line plots were employed to depict the temporal trend in the cases and screening frequencies of 3 STIs from 2010 to 2023. Specifically, “case” in the current study represents individual STI events, meaning that a single participant may contribute more than one case if multiple infections occurred. Additionally, we plotted the annual case and screening frequency per 100 000 population with available EHR data to adjust for variation in the volume of EHR records captured in the AoU dataset over time.
Results
Characteristics of identified STI cases
Among 393 596 participants with EHR data in AoU, 2603 had ever been confirmed via laboratory results with chlamydia, 1520 with gonorrhea, and 2762 with syphilis (Table 1). By using information from the diagnostic codes and medication domains, we identified 8512 possible/presumed chlamydia cases (4843 individuals) and 36 026 possible/presumed gonorrhea cases (18 855 individuals) (Figure 3). Regarding syphilis, based on positive RPR test results and confirmatory treponemal test, we identified 492 syphilis cases that could be either past or active due to missing titer information in the RPR test results. With additional titer information from the RPR test, we identified 285 cases that can be considered active syphilis infections. With diagnosis and treatment information, 3469 additional active infection cases were identified (Figure 2). Among 5784 participants with at least one of the 3 confirmed STIs, 115 (2.0%) had ever been infected with all 3 STIs, 724 (12.4%) had a history of chlamydia and gonorrhea infection, 251 (4.3%) had ever been infected with both chlamydia and syphilis, and 173 (3.0%) had ever been infected with both gonorrhea and syphilis (Figure 4).
Table 1.
The demographic distribution for participants ever identified as confirmed or possible/presumed chlamydia, gonorrhea, and syphilis cases in All of Us using electronic health records data
| Chlamydia |
Gonorrhea |
Syphilis |
||||||
|---|---|---|---|---|---|---|---|---|
| Confirmed (N = 2603) | Possible/presumed (N = 4843) | Screen (N = 37 830) | Confirmed (N = 1520) | Possible/presumed (N = 18 855) | Screen (N = 34 818) | Confirmed (N = 2762) | Screen (N = 26 939) | |
| Age (years old) | ||||||||
| <18 | 90 (3.5%) | 35 (0.7%) | 535 (1.4%) | 37 (2.4%) | 172 (0.9%) | 487 (1.4%) | 46 (1.7%) | 558 (2.1%) |
| 18-29 | 1519 (58.4%) | 1692 (34.9%) | 11 282 (29.8%) | 663 (43.6%) | 6334 (33.6%) | 9955 (28.6%) | 705 (25.5%) | 8088 (30.0%) |
| 30-44 | 704 (27.0%) | 1805 (37.3%) | 14 267 (37.7%) | 533 (35.1%) | 6893 (36.6%) | 13 286 (38.2%) | 1136 (41.1%) | 9369 (34.8%) |
| 45-54 | 164 (6.3%) | 710 (14.7%) | 6294 (16.6%) | 171 (11.3%) | 2869 (15.2%) | 5941 (17.1%) | 385 (13.9%) | 3860 (14.3%) |
| 55-64 | 104 (4.0%) | 430 (8.9%) | 4025 (10.6%) | 96 (6.3%) | 1941 (10.3%) | 3749 (10.8%) | 340 (12.3%) | 3093 (11.5%) |
| 65+ | 22 (0.8%) | 171 (3.5%) | 1427 (3.8%) | 20 (1.3%) | 646 (3.4%) | 1400 (4.0%) | 150 (5.4%) | 1971 (7.3%) |
| Sex | ||||||||
| Male | 1992 (76.5%) | 3294 (68.0%) | 30 354 (80.2%) | 855 (56.3%) | 14 913 (79.1%) | 27 327 (78.5%) | 1683 (60.9%) | 19 942 (74.0%) |
| Female | 591 (22.7%) | 1481 (30.6%) | 7148 (18.9%) | 644 (42.4%) | 3788 (20.1%) | 7142 (20.5%) | 1043 (37.8%) | 6732 (25.0%) |
| Other/unknown | 20 (0.8%) | 68 (1.4%) | 328 (0.9%) | 21 (1.4%) | 154 (0.8%) | 349 (1.0%) | 36 (1.3%) | 265 (1.0%) |
| Race | ||||||||
| White | 944 (36.3%) | 1363 (28.1%) | 14 141 (37.4%) | 370 (24.3%) | 6067 (32.2%) | 13 408 (38.5%) | 886 (32.1%) | 12 246 (45.5%) |
| Black or African American | 1007 (38.7%) | 1704 (35.2%) | 8663 (22.9%) | 811 (53.4%) | 4920 (26.1%) | 8336 (23.9%) | 1120 (40.6%) | 6686 (24.8%) |
| Asian/Other/unknown | 652 (25.0%) | 1776 (36.7%) | 15 026 (39.7%) | 339 (22.3%) | 7868 (41.7%) | 13 074 (37.5%) | 756 (27.4%) | 8007 (29.7%) |
| Ethnicity | ||||||||
| Not Hispanic or Latino | 1759 (67.6%) | 3833 (79.1%) | 26 108 (69.0%) | 1228 (80.8%) | 13 984 (74.2%) | 23 713 (68.1%) | 2035 (73.7%) | 16 174 (60.0%) |
| Hispanic or Latino/unknown | 844 (32.4%) | 1010 (20.9%) | 11 722 (31.0%) | 292 (19.2%) | 4871 (25.8%) | 11 105 (31.9%) | 727 (26.3%) | 10 765 (40.0%) |
| Sex orientation | ||||||||
| Straight | 1913 (73.5%) | 3593 (74.2%) | 31 414 (83.0%) | 935 (61.5%) | 15 096 (80.1%) | 28 875 (82.9%) | 1986 (71.9%) | 22 942 (85.2%) |
| Bisexual | 258 (9.9%) | 490 (10.1%) | 2470 (6.5%) | 168 (11.1%) | 1617 (8.6%) | 2238 (6.4%) | 201 (7.3%) | 1262 (4.7%) |
| Gay | 293 (11.3%) | 414 (8.5%) | 1389 (3.7%) | 322 (21.2%) | 819 (4.3%) | 1250 (3.6%) | 395 (14.3%) | 1168 (4.3%) |
| Lesbian | – | 59 (1.2%) | 473 (1.3%) | – | 265 (1.4%) | 421 (1.2%) | – | 253 (0.9%) |
| None | – | 144 (3.0%) | 1078 (2.8%) | – | 623 (3.3%) | 966 (2.8%) | – | 511 (1.9%) |
| Other/unknown | 69 (2.7%) | 143 (3.0%) | 1006 (2.7%) | 47 (3.1%) | 435 (2.3%) | 1068 (3.1%) | 86 (3.1%) | 803 (3.0%) |
| Health insurance | ||||||||
| Yes | 2318 (89.1%) | 4385 (90.5%) | 34 978 (92.5%) | 1280 (84.2%) | 17 660 (93.7%) | 31 849 (91.5%) | 2485 (90.0%) | 24 696 (91.7%) |
| No | 202 (7.8%) | 279 (5.8%) | 2015 (5.3%) | 177 (11.6%) | 748 (4.0%) | 2091 (6.0%) | 168 (6.1%) | 1493 (5.5%) |
| Unknown | 83 (3.2%) | 179 (3.7%) | 837 (2.2%) | 63 (4.1%) | 447 (2.4%) | 878 (2.5%) | 109 (3.9%) | 750 (2.8%) |
| Annual income ($) | ||||||||
| <25 000 | 1057 (40.6%) | 1966 (40.6%) | 10 778 (28.5%) | 767 (50.5%) | 5991 (31.8%) | 10 613 (30.5%) | 1103 (39.9%) | 7932 (29.4%) |
| 25 000-50 000 | 435 (16.7%) | 889 (18.4%) | 5666 (15.0%) | 222 (14.6%) | 3556 (18.9%) | 4859 (14.0%) | 387 (14.0%) | 3651 (13.6%) |
| >50 000 | 449 (17.2%) | 1130 (23.3%) | 13 004 (34.4%) | 215 (14.1%) | 5926 (31.4%) | 11111 (31.9%) | 649 (23.5%) | 7484 (27.8%) |
| Unknown | 662 (25.4%) | 858 (17.7%) | 8382 (22.2%) | 316 (20.8%) | 3382 (17.9%) | 8235 (23.7%) | 623 (22.6%) | 7872 (29.2%) |
| Education attainment | ||||||||
| High school or more | 2493 (95.8%) | 4618 (95.4%) | 35 488 (93.8%) | 1432 (94.2%) | 17 959 (95.2%) | 32 350 (92.9%) | 2579 (93.4%) | 25 023 (92.9%) |
| Less than high school | 43 (1.7%) | 100 (2.1%) | 1449 (3.8%) | 33 (2.2%) | 510 (2.7%) | 1514 (4.3%) | 90 (3.3%) | 1165 (4.3%) |
| Unknown | 67 (2.6%) | 125 (2.6%) | 893 (2.4%) | 55 (3.6%) | 386 (2.0%) | 954 (2.7%) | 93 (3.4%) | 751 (2.8%) |
| Employment status | ||||||||
| Employed for wages/self-employed | 1577 (60.6%) | 2648 (54.7%) | 22 561 (59.6%) | 766 (50.4%) | 11 530 (61.2%) | 19 650 (56.4%) | 1310 (47.4%) | 13 533 (50.2%) |
| Not employed for wages | 1026 (39.4%) | 2195 (45.3%) | 15 269 (40.4%) | 754 (49.6%) | 7325 (38.8%) | 15 168 (43.6%) | 1452 (52.6%) | 13 406 (49.8%) |
| Marital status | ||||||||
| Married/living with partner | 721 (27.7%) | 1329 (27.4%) | 16 545 (43.7%) | 355 (23.4%) | 6794 (36.0%) | 14 978 (43.0%) | 1047 (37.9%) | 11 924 (44.3%) |
| Separated/widowed | 337 (12.9%) | 1048 (21.6%) | 7402 (19.6%) | 224 (14.7%) | 3675 (19.5%) | 7088 (20.4%) | 497 (18.0%) | 5523 (20.5%) |
| Never married | 1418 (54.5%) | 2227 (46.0%) | 12 729 (33.6%) | 857 (56.4%) | 7765 (41.2%) | 11 577 (33.3%) | 1105 (40.0%) | 8532 (31.7%) |
| Unknown | 127 (4.9%) | 239 (4.9%) | 1154 (3.1%) | 84 (5.5%) | 621 (3.3%) | 1175 (3.4%) | 113 (4.1%) | 960 (3.6%) |
Counts smaller than 20 cannot be displayed because of the National Institutes of Health’s All of Us Research Program data and statistics dissemination policy. Some additional data were collapsed or obscured to prevent secondary calculation of these values.
Figure 3.
The Venn diagram for chlamydia and gonorrhea cases identified in electronic health records in the All of Us Research Program.
Figure 4.

Venn diagram of chlamydia, gonorrhea, and syphilis cases based on electronic health records data in the All of Us from 2010 to 2023.
Temporal trend of STI testing and STI rate
For chlamydia, the annual number of confirmed cases per 100 000 population with available EHR data and routine screening increased until 2019 and then declined, while possible/presumed cases rose markedly from 2014 and decreased after 2019. As for gonorrhea, confirmed cases increased from 2010 to a peak in 2020 and then decreased until 2023. Similar trends were observed for the number of routine screenings, while the significant change point was in 2019 (Figure 5 and Figure S1). Regarding syphilis, the number of past/active cases per participant with EHR data peaked in 2019 before decreasing, while the routine screening rate continuously increased from 2010 to 2022 and dropped slightly in 2023 (Figure 5 and Figure S1).
Figure 5.
The temporal trend of identified chlamydia, gonorrhea, and syphilis cases per 100 000 participants with electronic health record data in All of Us from 2010 to 2023.
The temporal trends of STI rates were broadly consistent across key demographic groups, with the highest rates observed among younger adults and Black and Hispanic participants, and lower rates among older adults and Asian/Other participants. In multiple demographic strata, presumed/possible cases exceeded laboratory-confirmed cases, suggesting that diagnosis and medication data captured additional clinically relevant infections beyond those identified through laboratory testing alone (Figures S2 and S3). For syphilis, the phenotype captured distinct temporal patterns of disease activity, with past/active infections more common among males before 2015 and more common among females after 2015 (Figure S4).
Performance assessment based on clinician annotation
For chlamydia, the algorithm showed good agreement with clinician annotation across confirmed infection, possible/presumed infection, and no infection categories. Sensitivity/recall ranged from 0.68 to 1.00, specificity ranged from 0.77 to 1.00, positive predictive value/precision ranged from 0.70 to 1.00, negative predictive value ranged from 0.84 to 1.00, and F1-score ranged from 0.81 to 0.94. For gonorrhea, the algorithm demonstrated moderate classification performance, with sensitivity/recall ranging from 0.63 to 1.00, specificity ranging from 0.73 to 1.00, positive predictive value/precision ranging from 0.63 to 1.00, negative predictive value ranging from 0.80 to 1.00, and F1-score ranging from 0.77 to 0.94. For syphilis activity, performance varied across the 4 activity groups, with sensitivity/recall ranging from 0.65 to 1.00, specificity ranging from 0.77 to 1.00, positive predictive value/precision ranging from 0.55 to 1.00, negative predictive value ranging from 0.86 to 1.00, and F1-score ranging from 0.71 to 1.00. Classification performance was strongest for negative syphilis status and lower for distinguishing past and active/past infection categories. Overall, these findings indicate that the algorithm performed generally well compared with clinician annotation, with particularly strong performance in identifying no infection and somewhat lower performance in separating confirmed from presumed/possible infection categories (Tables S4 and S5).
Demographic distribution of participants ever infected with STIs
Significant sociodemographic differences were observed between individuals with and without a confirmed history of any of the 3 STIs. Participants who were male (67.4% vs 60.8%), Hispanic (28.2% vs 20.9%), Black or African American (40.4% vs 17.1%), and gay (12.3% vs 2.1%) were more likely to have a confirmed STI history (P < .05 for all comparisons). Furthermore, individuals with lower socioeconomic status, indicated by annual household income less than $25,000 (40.7% vs 23.8%) and without health insurance coverage (7.7% vs 5.5%), were also at elevated risk of STIs (Table 2 and Table S6).
Table 2.
Demographic distribution for All of Us participants by the history of confirmed sexually transmitted infections
| Variable | Ever had a confirmed sexually transmitted infection* |
|||
|---|---|---|---|---|
| Total (N = 393 596) | No (N = 387 812) | Yes (N = 5784) | P-value | |
| Age group (years) | <.001 | |||
| <18 | 153 (0.0%) | 0 (0%) | 153 (2.6%) | |
| 18-29 | 32 883 (8.4%) | 30 497 (7.9%) | 2386 (40.8%) | |
| 30-44 | 86 166 (21.9%) | 84 136 (21.7%) | 2030 (34.7%) | |
| 45-54 | 59 069 (15.0%) | 58 446 (15.1%) | 623 (10.6%) | |
| 55-64 | 80 198 (20.4%) | 79 721 (20.6%) | 477 (8.2%) | |
| 65+ | 135 132 (34.3%) | 134 949 (34.8%) | 183 (3.1%) | |
| Sex | <.001 | |||
| Male | 239 565 (60.9%) | 235 620 (60.8%) | 3945 (67.4%) | |
| Female | 149 871 (38.1%) | 148 030 (38.2%) | 1841 (31.5%) | |
| Other/unknown | 4165 (1.1%) | 4099 (1.1%) | 66 (1.1%) | |
| Race | <.001 | |||
| White | 108 606 (27.6%) | 106 665 (27.5%) | 1941 (33.2%) | |
| Black or African American | 68 534 (17.4%) | 66 155 (17.1%) | 2379 (40.7%) | |
| Asian/other/unknown | 216 461 (55.0%) | 214 929 (55.4%) | 1532 (26.2%) | |
| Ethnicity | <.001 | |||
| Not Hispanic or Latino | 310 763 (79.0%) | 306 564 (79.1%) | 4199 (71.8%) | |
| Hispanic or Latino/unknown | 82 838 (21.0%) | 81 185 (20.9%) | 1653 (28.2%) | |
| Sexual orientation | <.001 | |||
| Straight | 346 090 (87.9%) | 341 827 (88.2%) | 4263 (72.8%) | |
| Bisexual | 15 871 (4.0%) | 15 370 (4.0%) | 501 (8.6%) | |
| Gay | 8926 (2.3%) | 8205 (2.1%) | 721 (12.3%) | |
| Lesbian | 4862 (1.2%) | 4821 (1.2%) | 41 (0.7%) | |
| None | 8120 (2.1%) | 7971 (2.1%) | 149 (2.5%) | |
| Other/unknown | 9732 (2.5%) | 9555 (2.5%) | 177 (3.0%) | |
| Health insurance | <.001 | |||
| Yes | 361 672 (91.9%) | 356 485 (91.9%) | 5187 (88.6%) | |
| No | 21 716 (5.5%) | 21 267 (5.5%) | 449 (7.7%) | |
| Unknown | 10 213 (2.6%) | 9997 (2.6%) | 216 (3.7%) | |
| Annual income ($) | <.001 | |||
| <25 000 | 94 613 (24.0%) | 92 208 (23.8%) | 2405 (41.1%) | |
| 25 000-50 000 | 59 281 (15.1%) | 58 384 (15.1%) | 897 (15.3%) | |
| >50 000 | 161 358 (41.0%) | 160 206 (41.3%) | 1152 (19.7%) | |
| Unknown | 78 349 (19.9%) | 76 951 (19.8%) | 1398 (23.9%) | |
| Education level | <.001 | |||
| High school or more | 372 279 (94.6%) | 366 770 (94.6%) | 5509 (94.1%) | |
| Less than high school | 12 238 (3.1%) | 12 087 (3.1%) | 151 (2.6%) | |
| Unknown | 9084 (2.3%) | 8892 (2.3%) | 192 (3.3%) | |
| Employment status | <.001 | |||
| Employed for wages/self-employed | 186 317 (47.3%) | 183 243 (47.3%) | 3074 (52.5%) | |
| Not employed for wages | 207 281 (52.7%) | 204 503 (52.7%) | 2778 (47.5%) | |
| Marital status | <.001 | |||
| Married/living with partner | 199 715 (50.7%) | 197 831 (51.0%) | 1884 (32.2%) | |
| Divorced/separated/widowed | 91 266 (23.2%) | 90 340 (23.3%) | 926 (15.8%) | |
| Never married | 92 667 (23.5%) | 89 892 (23.2%) | 2775 (47.4%) | |
| Unknown | 9953 (2.5%) | 9686 (2.5%) | 267 (4.6%) | |
*The history of sexually transmitted infections was limited to chlamydia, gonorrhea, and syphilis.
Discussion
To the best of our knowledge, this is one of the first efforts that developed comprehensive phenotyping algorithms to identify STI cases using multiple domains of EHR data (ie, medication, diagnosis code, and laboratory test) in AoU. The computable phenotyping algorithms developed may provide researchers with a tool to identify STI cases and understand patients’ STI history comprehensively, which, in turn, can inform resource allocation for public health interventions and targeted prevention efforts.
By integrating medication and diagnosis codes with laboratory test results, we identified 8512 possible/presumed chlamydia cases and 36 026 possible/presumed gonorrhea cases that would have been missed by existing approaches based only on laboratory test results. By applying our algorithms in AoU, researchers could identify various dimensions of dynamic STI patterns, such as infection type (eg, chlamydia trachomatis, gonorrhea, and syphilis), infection probability (eg, confirmed, presumed, and probable cases), infection time (eg, prior 30 days, prior 1 year, prior 2 years, and ever), recurrent infections (eg, the number of STIs), and the co-infection of different STIs. This comprehensive identification capability will enable registered researchers of AoU to perform more nuanced and accurate analyses of STI patterns and their implications.
A notable shift in STI cases and screening trends occurred in 2019 or 2020, with counts and percentages increasing from 2010 to 2019 or 2020 before declining through 2023 across 3 STIs. It is unclear whether the decrease in STIs was driven by less STI screening, a decrease in STI incidence, or a combination of these 2 factors. Beginning in 2020, the COVID-19 pandemic may have affected the case reporting of STIs, such as reduced screening and delayed reporting, and such an impact likely continued in 2023.18 According to CDC surveillance data, the impact of the COVID-19 pandemic on STI surveillance data was most acute at the beginning of the pandemic (ie, March and April 2020).3 Despite the decreasing trend after 2019, STI prevention and management remain critical public health priorities.19 Due to limited access to care during the pandemic, individuals with an STI may have prolonged infection and more opportunities to transmit infection to their sexual partners. Additionally, the change of sexual behaviors (eg, the number of new sexual partners) after the initial shelter-in-place order may accelerate the spread of STIs in sexual networks.18 Thus, caution is needed to interpret trends of STI cases during the pandemic.
Our study revealed significant sociodemographic disparities in confirmed STI history, emphasizing the disproportionate burden among specific subpopulations. Individuals who were Hispanic or Latino, Black or African American, sexual minority, and those with socioeconomic deprivation (eg, household income less than $25 000 and without health insurance) were significantly more likely to report a history of any of the 3 STIs examined. These findings are consistent with national surveillance data that highlight sexual minorities as key populations at elevated risk for STIs.20,21 According to CDC STI surveillance data, Black/African American people account for around a third of chlamydia, gonorrhea, and syphilis cases, yet make up just 12% of the US population. Gay, bisexual, and other men who have sex with men (MSM) represent around 4% of the US adult male population but account for 64% of all syphilis cases among men.22,23 These communities often encounter barriers to prevention and treatment services, and disparities in sexual networks and social determinants of health may further exacerbate the cycle of infection and lead to poorer health outcomes.2,20 Furthermore, the temporal trend of STI rates across demographic groups suggests that the multi-domain phenotype may reduce under-ascertainment of STI burden, particularly in groups where laboratory confirmation alone appears to capture only part of the observed cases. The larger proportion of presumed/possible than confirmed cases was most evident among younger adults, Black and White participants, men, and both Hispanic and non-Hispanic participants for chlamydia and gonorrhea, suggesting that laboratory-only phenotypes may miss additional clinically relevant infections in these groups.
The computable phenotypes developed in this study may have practical clinical applications for improving STI case identification, supporting population health surveillance, and informing quality improvement efforts. By integrating laboratory results with diagnosis and medication evidence, these phenotypes may help identify infections that would be missed by laboratory-only approaches, particularly when confirmatory testing is incomplete or unavailable. In future work, the phenotype should be prospectively validated in source EHR data and evaluated in real-world clinical workflows to determine whether it can support clinical decision support, case finding, and timely intervention for patients with unmet clinical and social needs.
The phenotyping algorithms developed in this study have some limitations. First, the current data cannot capture participants with STIs who received a diagnosis outside of the included institutions in AoU. Thus, the number of STI cases identified could not represent the true STI burden in AoU participants. Second, because confirmed chlamydia and gonorrhea infections were defined using relevant positive laboratory results, incomplete laboratory data in AoU could lead to an underestimation of confirmed cases. Several factors related to data transfer and curation may contribute to this type of information loss. Information loss may happen if a source laboratory result was not transferred to AoU, was recorded using a local or nonstandard code that was not mapped to the relevant OMOP concept, lacked a usable result value, had an invalid date, had a value or unit that could not be standardized, or was removed during cleaning as an invalid or extreme value.17 Without access to the original source EHR data, we could not directly measure the extent of such information loss. Therefore, confirmed case counts in this study should be interpreted as conservative estimates based on laboratory results available after AoU curation. Third, data linkage during data transfer or curation may also affect phenotype classification. For example, a participant with a relevant diagnosis or treatment record but an unlinked positive laboratory result may have been classified as presumed/possible rather than confirmed, or may have been missed. Fourth, direct comparison of the presented results with alternative phenotypes was not performed, and we added a clinician annotation process to assess the reliability of our phenotyping algorithms. However, the annotations were performed by a single clinician reviewer, so inter-rater reliability could not be assessed. Fifth, this study did not include other possible algorithms (eg, natural language processing methods and STI-related terminology algorithms based on unstructured clinical notes) due to limitations in data availability, which may lead to an underestimate of the true STI burden.
Conclusions
In this study, the computable phenotype algorithms identified both confirmed and possible/presumed STI cases, demonstrating that EHR data can capture clinically relevant infections that may not be identified by laboratory results alone. The complementary clinical information contained in EHR data also supports longitudinal disease characterization, as shown by the ability to distinguish syphilis activity patterns across active, past, active/past, and no infection categories. Together, these findings suggest that the computable phenotypes developed in this study provide a practical framework for more nuanced STI classification and downstream analysis in AoU.
Supplementary Material
Acknowledgments
We gratefully acknowledge All of Us participants for their contributions, without whom this research would not have been possible. We also thank the National Institute of Health’s All of Us Research Program for making available the participant and cohort data examined in this study.
Contributor Information
Fanghui Shi, South Carolina SmartState Center for Healthcare Quality, University of South Carolina Arnold School of Public Health, Columbia, SC 29208, United States; Department of Health Promotion, Education and Behavior, Arnold School of Public Health, University of South Carolina, Columbia, SC 29208, United States.
Huiyi Xia, South Carolina SmartState Center for Healthcare Quality, University of South Carolina Arnold School of Public Health, Columbia, SC 29208, United States; Department of Health Promotion, Education and Behavior, Arnold School of Public Health, University of South Carolina, Columbia, SC 29208, United States.
Sharon Weissman, South Carolina SmartState Center for Healthcare Quality, University of South Carolina Arnold School of Public Health, Columbia, SC 29208, United States; Department of Internal Medicine, School of Medicine, University of South Carolina, Columbia, SC 29208, United States.
Xiaoming Li, South Carolina SmartState Center for Healthcare Quality, University of South Carolina Arnold School of Public Health, Columbia, SC 29208, United States; Department of Health Promotion, Education and Behavior, Arnold School of Public Health, University of South Carolina, Columbia, SC 29208, United States.
Xueying Yang, South Carolina SmartState Center for Healthcare Quality, University of South Carolina Arnold School of Public Health, Columbia, SC 29208, United States; Department of Health Promotion, Education and Behavior, Arnold School of Public Health, University of South Carolina, Columbia, SC 29208, United States.
Author contributions
Fanghui Shi (Conceptualization, Formal analysis, Writing—original draft, Writing—review & editing), Huiyi Xia (Formal analysis, Writing—review & editing), Sharon Weissman (Conceptualization, Supervision, Writing—review & editing), Xiaoming Li (Conceptualization, Supervision, Writing—review & editing), and Xueying Yang (Conceptualization, Supervision, Writing—review & editing)
Supplementary material
Supplementary material is available at JAMIA Open online.
Funding
None declared.
Conflicts of interest
The authors declare no conflict of interest.
Human participant protection
This study was conducted using de-identified data from the All of Us Research Program, which is publicly available to authorized users through the Researcher Workbench. According to the All of Us Research Program’s policies, studies using only de-identified data from the Workbench do not constitute human subjects research and are therefore exempt from the Institutional Review Board approval.
Data availability
The data that support the findings of this study are available from the All of Us Researcher Workbench, but restrictions apply to the availability of these data. Access to the All of Us Researcher Workbench and data is free. All researchers must be authorized and approved via a 3-step process: registration, completion of ethics training, and attestation to a data use agreement.
References
- 1. Centers for Disease Control and Prevention. National Overview of STIs in 2023. Secondary National Overview of STIs in 2023. https://www.cdc.gov/sti-statistics/annual/summary.html
- 2. Centers for Disease Control and Prevention. Sexually Transmitted Infections Surveillance, 2022. Atlanta: US Department of Health and Human Services; 2024. [Google Scholar]
- 3. Pagaoa M, Grey J, Torrone E, Kreisel K, Stenger M, Weinstock H. Trends in nationally notifiable sexually transmitted disease case reports during the US COVID-19 pandemic, January to December 2020. Sex Transm Dis. 2021;48:798-804. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 4. Jamison DT, Breman JG, Measham AR, et al. Disease Control Priorities in Developing Countries. World Bank/OUP; 2006. [PubMed]
- 5. Centers for Disease Control and Prevention. Surveillance case definitions for current and historical conditions. National Notifiable Diseases Surveillance System. https://ndc.services.cdc.gov/
- 6. Mishra N, Grant R, Patel MT, et al. Automating case reporting of chlamydia and gonorrhea to public health authorities in Illinois clinics: implementation and evaluation of findings. JMIR Public Health and Surveill. 2023;9:e38868. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 7. Todd JV, Collins NV, Oakley J, et al. Automating case reporting of chlamydia and gonorrhea to public health authorities in Oregon clinics. Sex Transm Dis. 2022;49:38-42. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 8. Danforth B, Matthias J, Jashinsky J, McCorvey A. Evaluation of sexually transmitted disease surveillance system electronic laboratory processing in Florida: automating case creation, reporting, and closure of chlamydia and gonorrhea cases. Sex Transm Dis. 2023;50:252-257. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 9. Gupta V, Sharma VK. Syndromic management of sexually transmitted infections: a critical appraisal and the road ahead. Natl Med J India. 2019;32:147-152. [DOI] [PubMed] [Google Scholar]
- 10. Willis SJ, Cocoros NM, Randall LM, et al. Electronic health record use in public health infectious disease surveillance, USA, 2018–2019. Curr Infect Dis Rep. 2019;21:32-39. [DOI] [PubMed] [Google Scholar]
- 11. AoURP I. The “All of Us” Research Program. N Engl J Med. 2019;381:668-676. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 12. Forrest CB, McTigue KM, Hernandez AF, et al. PCORnet® 2020: current state, accomplishments, and future directions. J Clin Epidemiol. 2021;129:60-67. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 13. Reinecke I, Zoch M, Reich C, Sedlmayr M, Bathelt F. The usage of OHDSI OMOP—a scoping review. In: German Medical Data Sciences 2021: Digital Medicine: Recognize–Understand–Heal. 2021:95-103. [DOI] [PubMed]
- 14. Bhargava A, Kim T, Quine DB, Hauser RG. A 20-year evaluation of LOINC in the United States’ largest integrated health system. Arch Pathol Lab Med. 2020;144:478-484. [DOI] [PubMed] [Google Scholar]
- 15. Moseley I, Ragi SD, Ouellette S, Rao B. Condyloma acuminata in under-represented groups: an All of Us database analysis. Sex Transm Infect. 2022;98:620-621. [DOI] [PubMed] [Google Scholar]
- 16. AoU. Data Snapshots. Secondary Data Snapshots. 2024. https://www.researchallofus.org/data-tools/data-snapshots/
- 17. Ramirez AH, Sulieman L, Schlueter DJ, et al. ; All of Us Research Program. The All of Us Research Program: data quality, utility, and diversity. Patterns. 2022;3:100570. 10.1016/j.patter.2022.100570 [published Online First: 20220812]. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 18. Wright SS, Kreisel KM, Hitt JC, Pagaoa MA, Weinstock HS, Thorpe PG. Impact of the COVID-19 pandemic on Centers for Disease Control and Prevention–funded sexually transmitted disease programs. Sex Transm Dis. 2022;49:e61-e63. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 19. Centers for Disease Control and Prevention. Secondary Impact of COVID-19 on STIs November 12, 2024. https://www.cdc.gov/sti-statistics/about/impact-of-covid-19.html
- 20. Mann‐Jackson L, Alonzo J, Garcia M, et al. Using community‐based participatory research to address STI/HIV disparities and social determinants of health among young GBMSM and transgender women of colour in North Carolina, USA. Health Soc Care Community. 2021;29:e192-e203. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 21. Becasen JS, Denard CL, Mullins MM, Higa DH, Sipe TA. Estimating the prevalence of HIV and sexual behaviors among the US transgender population: a systematic review and meta-analysis, 2006–2017. Am J Public Health. 2019;109:e1-e8. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 22. Purcell DW, Johnson CH, Lansky A, et al. Estimating the population size of men who have sex with men in the United States to obtain HIV and syphilis rates. Open AIDS J. 2012;6:98-107. [DOI] [PMC free article] [PubMed] [Google Scholar]
- 23. Centers for Disease Control and Prevention. Syphilis & MSM (Men Who Have Sex with Men)—CDC Fact Sheet. Atlanta: CDC; 2014. [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Supplementary Materials
Data Availability Statement
The data that support the findings of this study are available from the All of Us Researcher Workbench, but restrictions apply to the availability of these data. Access to the All of Us Researcher Workbench and data is free. All researchers must be authorized and approved via a 3-step process: registration, completion of ethics training, and attestation to a data use agreement.



