{'fraction_non_alphanumeric': 0.0319323488577559, 'fraction_numerical': 0.018301148554840337, 'mean_word_length': 5.126618983181906, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Cardiovascular disease risk prediction for people with type 2 diabetes in a population-based cohort and in electronic health record data

Abstract Objective Electronic health records (EHRs) have become a common data source for clinical risk prediction, offering large sample sizes and frequently sampled metrics. There may be notable differences between hospital-based EHR and traditional cohort samples: EHR data often are not population-representative random samples, even for particular diseases, as they tend to be sicker with higher healthcare utilization, while cohort studies often sample healthier subjects who typically are more likely to participate. We investigate heterogeneities between EHR- and cohort-based inferences including incidence rates, risk factor identifications/quantifications, and absolute risks. Materials and methods This is a retrospective cohort study of older patients with type 2 diabetes using EHR from New York University Langone Health ambulatory care (NYULH-EHR, years 2009–2017) and from the Health and Retirement Survey (HRS, 1995–2014) to study subsequent cardiovascular disease (CVD) risks. We used the same eligibility criteria, outcome definitions, and demographic covariates/biomarkers in both datasets. We compared subsequent CVD incidence rates, hazard ratios (HRs) of risk factors, and discrimination/calibration performances of CVD risk scores. Results The estimated subsequent total CVD incidence rate was 37.5 and 90.6 per 1000 person-years since T2DM onset in HRS and NYULH-EHR respectively. HR estimates were comparable between the datasets for most demographic covariates/biomarkers. Common CVD risk scores underestimated observed total CVD risks in NYULH-EHR. Discussion and conclusion EHR-estimated HRs of demographic and major clinical risk factors for CVD were mostly consistent with the estimates from a national cohort, despite high incidences and absolute risks of total CVD outcome in the EHR samples.


BACKGROUND AND SIGNIFICANCE
As healthcare systems transition from paper charts to electronic health records (EHRs), investigators have an unprecedented opportunity to use these rich data sources for public health research purposes on chronic diseases. [1][2][3] It is important to acknowledge that there may be notable differences between hospital-based EHR and traditional cohort samples, the latter of which often have representative sampling weights, regular sampling time and follow-up, and standardized data collection metrics. 4 With the exception of universal-registration EHR such as in the United Kingdom or Scottish Care Information-Diabetes (SCI-Diabetes database), EHR often are not population-representative random samples, even for populations with a particular disease, as EHR samples tend to be sicker and have higher healthcare utilization. 5,6 They often are limited to patients presenting to a particular healthcare provider, which may further limit their representation of the general population. 7 In contrast, cohort studies often sample healthier participants who typically are more likely to respond to surveys. 8 Type 2 diabetes mellitus (T2DM) has become one of the most prevalent chronic diseases worldwide, estimated to have affected 8.8% of the population in 2017, 9 and this prevalence is expected to continue rising. 10 The International Diabetes Federation estimated the 2015 direct global cost of diabetes at $673 billion and predicted this will rise to approximately $802 billion by 2040. [11][12][13][14] Cardiovascular disease (CVD) is the most prevalent cause of morbidity and mortality among T2DM patients, affecting approximately 32% and causing 47% of deaths within this patient population. [15][16][17] As the population ages and T2DM prevalence increases, improving our understanding of CVD heterogeneity is key to minimizing long-term complications in elders. 18 Traditionally, CVD risk prediction algorithms are developed utilizing data from clinical trials and cohort studies. [19][20][21][22][23][24] Examples include the original Framingham Risk Score (FRS) to predict hard CVD risk, 21 subsequently updated to provide total CVD risk estimate. 23 The American College of Cardiology/American Heart Association (ACC/AHA) pooled cohort atherosclerotic CVD risk equations were developed to predict the risk of hard CVD events based on the same factors as the FRS. 19 There also have been T2DM-specific total and hard CVD risk predictions, including QRISK2, 24 ADVANCE, 25 and Swedish National Diabetes Register (NDR) 26 risk scores. Internal c-statistics for these risk scores ranged between 0.64 and 0.82, but an external study yielded c-statistics of 0.66-0.67 for each of these scores, with the weakest discrimination among older adults. 27

OBJECTIVE
The purpose of this study is to investigate the heterogeneities between EHR-and cohort-based inferences including incidence rates (IRs), identifications and quantifications of risk factors, and absolute risks (ARs). We investigate these heterogeneities by comparing risk predictions of the same outcome (subsequent incident CVD) in the same target population (incident T2DM adult patients) using the same eligibility criteria in a nationwide U.S. cohort, the Health and Retirement Survey (HRS), 28 and a large hospital EHR-based ambulatory care sample from New York University Langone Health (NYULH-EHR). We hypothesized that EHR estimates of CVD risk factors would be population-generalizable despite higher CVD IRs and that AR predictions derived from population-based cohorts would tend to underestimate actual risk observed in EHR samples.

Study design and participants
We define inclusion criteria for both samples as age !50 years, with incident T2DM and no CVD (defined below) at T2DM incidence. We chose incident T2DM since the year of T2DM diagnosis can be consistently defined without recall bias.
Within NYULH-EHR, eligible patients are defined as having a visit history of !1 year with an NYULH ambulatory primary care physician between 2009 and 2017 and having T2DM by a rulebased phenotyping algorithm. We excluded patients seen for consultation only and patients in the emergency department, inpatient, or specialist settings, as these lacked consistent T2DM documentation. We defined T2DM incidence as any of (1) !2 encounters with a T2DM International Classification of Diseases (ICD)-10 code, or (2) !2 abnormal HbA1C results (! 6.5%) and !1 encounter with a T2DM ICD-10 code, or (3) a T2DM medication prescription, excluding metformin and acarbose. The date of T2DM is defined as the date the first T2DM diagnostic code was recorded. Among NYULH-EHR patients, we excluded patients with T2DM diagnosis at EHR-entry as the diagnosis date was unknown. We excluded LAY SUMMARY As we transition from paper charts to electronic health records (EHRs), there is an unprecedented opportunity to use all available data within the EHR for public health research. Despite this advantage, it is important to recognize that EHR often are not random samples from the population and risk prediction models generated from EHR may be biased. In this study, we calculated the risk of subsequent cardiovascular disease following type 2 diabetes mellitus diagnosis in two cohorts: the Health and Retirement Study (HRS), which is a nationally representative longitudinal study, and the NYU Langone Health ambulatory care EHR. Although identical eligibility criteria were used for both cohorts, EHR patients tended to be sicker than their HRS counterparts. Despite these differences, risk estimates were generally comparable between the two samples. This is encouraging as it provides credence that EHR may be used to generate risk prediction estimates of the general population.
T2DM patients with an ICD-10 code for CVD (defined below) preceding or at T2DM diagnosis ( Figure 1A).
HRS is a biennial longitudinal health interview survey of over 37 620 older adults in the United States and is well-established as nationally representative. [28][29][30][31][32] A multistage, national area-clustered probability sampling frame was used and blacks, Hispanics, and Florida residents were oversampled to ensure adequate representation. 33 Baseline response rates averaged 73.0%, while follow-up response rates were 68.8-92.3%. 33 Each HRS biennial wave provides self-reported chronic diseases, including T2DM, and was adjudicated using HbA1C and medication information to address inconsistencies across waves. 34 Year of T2DM onset was estimated as the year of the first-reported T2DM without T2DM in previous wave(s). We excluded respondents who reported T2DM at entry, as diagnosis year was unknown, and respondents who reported CVD before or concurrently to T2DM onset ( Figure 1B). This study was approved by the NYULH-IRB and data were deidentified to assure anonymity.

Outcome
Total CVD was defined in NYULH-EHR as !3 encounters with an ICD-10 code for ischemic heart disease, ischemic or hemorrhagic cerebrovascular events, peripheral vascular disease, congestive heart failure, or other ischemic CVD (Supplementary Table S2). 23,35,36 Hard CVD was defined as !1 encounter with an ICD-10 code for myocardial infarction, ischemic stroke, hemorrhagic stroke, or hospitalization or death from other CVD outcomes (Supplementary  Table S2). 19,35,36 Date of CVD is defined as the encounter date when the first CVD diagnostic code was recorded. Time-to-CVD was defined as the time between T2DM diagnosis and CVD diagnosis for CVD cases. Patients without subsequent CVD were censored with time-to-event defined as the time from T2DM diagnosis to the last known encounter. Total CVD was defined by self-reported heart disease or stroke in HRS. We adjudicated self-reported outcomes using the same adju-dication methodology. 34 Year of incident CVD onset was estimated as the year when the respondent first reported heart disease or stroke. Time-to-CVD was defined as the time between the year of T2DM onset and the year of CVD for CVD cases. Patients without subsequent CVD were censored with time-to-event defined as the time from T2DM onset to the year of the last interview.

Risk factors
CVD risk factors considered include age, sex, race, ethnicity, smoking, and biomarkers, including systolic blood pressure (SBP), body mass index (BMI), HbA1c, total cholesterol (TC), and high-density lipoprotein (HDL). Smoking was defined as a previous or current smoker. Additional NYULH-EHR risk factors included albumin, creatinine, and estimated glomerular filtration rate (eGFR). Bloodbased biomarker data, including TC, HDL, HbA1c, C-reactive protein (CRP), and cystatin C (CysC), between 2006 and 2014 were used in HRS. Biomarker collection is staggered such that alternate halves of the HRS sample are tested in each biennial core survey. 37,38 NYULH-EHR medication prescriptions were grouped by therapeutic class codes of antihyperglycemic, antihypertensive, and lipid-lowering, and prescriptions any time during follow-up were considered the use of the respective medication. Self-report antihypertensive and antihyperglycemic medication was included in HRS biennial core surveys, and self-reports at any time were considered the use of the respective medication. 28

Absolute 5-year CVD risk scores
Three established CVD risk functions were evaluated: the FRS total CVD function 23 in both the NYULH-EHR and HRS cohorts, and the ACC/AHA 19 and Swedish NDR 26 risk prediction functions for hard CVD outcomes in the NYULH-EHR cohort only. For FRS total CVD and ACC/AHA functions, age, TC, HDL, and SBP values were defined with measurements at T2DM onset, or at the closest measurements following T2DM onset if no concurrent measurements. Hypertension treatment was defined with antihypertensive  Figure S1, we first limited the analysis cohort to encounters with patients 50 years of age or older. We then reduced the eligible cohort to patients ! 50 years of age who had T2DM, as defined in Supplementary Figure S1. We removed patients who met the criteria for T2DM status at initial encounter since date of initial diagnosis could not be reliably estimated. Finally, we removed patients who already met the criteria for CVD diagnosis, so that subsequent incident CVD cases could be identified. (B) Inclusion criteria for the HRS cohort. Among respondents to the HRS between 1992 and 2014, we first limited the analysis cohort to respondents who were 50 years of age or older during at least one interview. We then reduced the eligible cohort to respondents age ! 50 years with self-reported and subsequently adjudicated T2DM. 34 We also eliminated T2DM cases that were self-reported at the first interview since date of initial diagnosis could not be reliably estimated. Finally, we removed respondents with self-reported, and subsequently adjudicated, 34 CVD or stroke at or before the first interview at which T2DM was reported so that subsequent incident CVD cases could be identified.
prescriptions occurring within 3 months preceding the predictor measurement date in NYULH-EHR, and with self-report antihyperglycemic usage on the year of predictor measurement in HRS. Sexspecific equations were used. For the ACC/AHA risk score, African American (AA) coefficients were used for AAs and white coefficients for all others. We replaced 10-year baseline survival estimates with 5-year estimates by assuming exponential survival distributions to align with available follow-up of our cohorts. 39 For the Swedish NDR risk prediction, measurements were defined as described above and T2DM duration was defined as years from T2DM diagnosis to the date of predictor measurements. Lipid-reducing treatment was defined by prescriptions occurring within the 3 months preceding the predictor measurement date.

Statistical analysis
Demographics and risk factors were summarized using means (standard deviations) for continuous measures and frequencies (percentages) for categorical. Comparisons were performed using twosample t-tests and chi-squared tests, respectively. IRs of subsequent CVD were estimated from the time of T2DM onset. Time-to-CVD was analyzed using Cox proportional hazard models. Model 1 included demographic covariates only, including age at T2DM onset, sex, race, ethnicity, and smoking status; while models 2-11 included the demographic covariates from model 1 and a biomarker in each model. We included the annual number of encounters as an additional covariate in NYULH-EHR models to mitigate the bias in EHRs that patients with CVD are likely to have more encounters; and compared with the analyses without adjusting for encounters. 5 Hazard ratios (HRs) (HRs) were estimated per 1-standard deviation increase in the respective biomarker. When multiple biomarker measurements were available for a patient between T2DM incidence and earlier of subsequent CVD diagnosis or final visit/interview, the average of all available measurement values was used. Cochran's Qtest was used to determine whether the adjusted HR estimates from the cohorts were significantly different. IRs and HRs were estimated treating the death as a competing risk. We compared covariate missingness probabilities by CVD outcome status in both cohorts. We presented primary results from complete data analysis as EHR data typically violates the missing-at-random assumption required for most imputation techniques. 5,6 We used Harrell c-statistics to assess the discriminatory ability of each risk score within each applicable cohort and calibration plots to assess the performance of each risk score to predict AR. For each risk function, we divided the cohorts into deciles of predicted 5-year risk of the corresponding CVD outcome and calculated mean predicted risk within each decile. We calculated the observed Kaplan-Meier estimate within each decile and plotted the observed vs. predicted risk estimates. 39 Analyses were conducted using R version 1.2.5019.

RESULTS
The NYULH-EHR analysis flowchart is shown in Figure 1A. Overall, 105 793 NYULH ambulatory patients were eligible and 19 849 (19.4%) had a query-based T2DM diagnosis (Supplementary Table  S1 and Figure S1). We performed sensitivity analyses by modifying key components of this algorithm, including the number of diagnostic codes and T2DM medication types (Supplementary Table S1 Figure 1B. Among 37 610 HRS respondents with self-reported T2DM and CVD responses, 33 016 respondents denied T2DM at baseline. 3032 subsequently developed T2DM with no CVD at T2DM onset, and 667 (22.0%) developed subsequent CVD, with a 20-year maximum follow-up (median 8 years, IQR 4-12 years). There were 13 415 interviews for the 3032 respondents (median 4 per person). Table 1 presents characteristics of the NYULH-EHR and HRS subjects overall and by subsequent CVD status. Compared with HRS participants, NYULH-EHR T2DM patients were slightly younger, had a higher proportion of women and minority groups, and a lower proportion of smokers. Average SBP and HDL were similar between the two cohorts, while BMI, hypertension medication usage and HbA1c were higher within NYULH-EHR. In both cohorts, patients who developed CVD were more likely to be non-Hispanic Caucasians, more likely to smoke and had lower HDL levels. Within HRS, patients with subsequent CVD had higher BMI, SBP, and HbA1c, as well as more frequent antihypertensive medication use, but these differences were not significant within NYULH-EHR. Increased age was significantly associated with subsequent CVD in NYULH-EHR, but not within HRS. Sex was not associated with development of CVD in either cohort. Worse renal function was seen among those with CVD, demonstrated by lower albumin, lower eGFR, and higher creatinine in NYULH-EHR and higher CysC in HRS. Higher CRP was associated with CVD in HRS. In NYULH-EHR, CVD cases had more frequent encounters than controls, while sampling frequencies were fixed in HRS with bi-annual interviews.
In NYULH-EHR, 1% of samples had missing vitals, 8% missing HbA1c, 5-32% missing renal function biomarkers, and 13% missing lipid biomarkers. In HRS, $35% of T2DM patients had missing biomarkers, consistent with the reported missing biomarker proportions in HRS as they were not sampled in the biomarker surveys. 37,38 (Supplementary Table S3). In NYULH-EHR, CVD cases were more likely to have missing data than controls. In contrast, CVD controls had more missing data than cases in HRS.

Higher CVD IR estimates in NYULH-EHR
The estimated subsequent total CVD IR was 37.5 (95% confidence interval [CI] 34.8-40.5) and 90.6 (86.5-95.0) per 1000 person-years since T2DM onset in HRS and NYULH-EHR, respectively. We performed sensitivity analyses by modifying the required recurrent encounters with CVD ICD-10s and found that the subsequent CVD incidence ranged between 126.8 (requiring one encounter), 120.1 (two encounters) to 87.6 (four encounters) per 1,000 person-years, robustly higher than that estimated from HRS. The estimated subsequent hard CVD IR was 32.9 (95% CI 31.0-35.0) per 1000 personyears since T2DM onset in the NYULH-EHR.

Comparison of HR estimates for demographic covariates and biomarkers
Time-to-CVD from T2DM onset was analyzed using multivariable Cox proportional hazards models (Table 2). In both cohorts, increasing age, Caucasian race, smoking, elevated BMI, and lower HDL were associated with subsequent CVD, while increased SBP was not significantly associated with CVD development in either cohort. Worse renal function, indicated by higher creatinine, lower albumin, and lower eGFR in NYULH-EHR, and higher CysC in HRS, was associated with worsened CVD risk. Elevated CRP levels also were associated with CVD in HRS. In both cohorts, AA race and Hispanic/Latino ethnicity were associated with decreased CVD risk. Females demonstrated a decreased CVD risk in both cohorts, but  <0.001 -Model 1 is a Cox model with demographic covariates including age at T2DM diagnosis, sex, race, ethnicity, smoking status and, for NYULH-EHR, number of encounters. Models 2 to 11 are Cox models with covariates in Model 1 and one biomarker per model. Each biomarker was modeled separately, adjusting for the demographic covariates in Model 1 to accommodate not all biomarkers were available for the two datasets. HRs are per 1 standard deviation increase in the continuous covariates. The number of encounters was significant in more models. When multiple measurements were available for a patient longitudinally for a biomarker, the average of all available measurements values was used. HRs were estimated treating death as a competing risk. Cochran's Q-test was used to determine whether the adjusted HR estimates from the datasets were significantly different for each covariate. this was only significant within NYULH-EHR. Lower TC and HbA1c were associated with decreased CVD risk only in NYULH-EHR. HRs of most covariates showed no significant differences between the two datasets, except AA race, TC, and HbA1c. As a sensitivity analysis, we analyzed NYULH-EHR models without adjustment for the number of encounters (Supplementary Table S4) and these results were robust.

Under-estimation of total CVD risk in NYULH-EHR
Calibration plots comparing predicted and observed CVD risks are shown in Figure 2. The FRS had comparable discrimination ability for total CVD risk in HRS (c-index 0.62, Figure 2A) and NYULH-EHR (c-index 0.58, Figure 2B). In NYULH-EHR, the predicted total CVD risks underestimated the observed CVD risks in all deciles due to the higher observed subsequent total CVD incidence. For hard CVD outcomes in NYULH-EHR, the ACC/AHA risk score ( Figure 2C) showed discrimination with c-index 0.61 and the Swedish NDR risk score ( Figure 2D) showed similar discrimination with c-index 0.62. However, there was no systematic under-estimation of ACC/AHA or Swedish NDR risk scores compared to observed hard CVD risks in NYULH-EHR.

DISCUSSION
The fundamentally different sampling mechanisms in EHRs compared to traditional cohort studies were often ignored, although it Figure 2. Calibration plots comparing predicted and observed 5-year risks. (A) HRS cohort using Framingham risk score to predict total CVD outcome; (B) NYULH-EHR cohort using Framingham risk score to predict total CVD outcome; (C) NYULH-EHR cohort using ACC/AHA pooled cohort equations to predict hard CVD outcome; (D) NYULH-EHR cohort using Swedish NDR to predict hard CVD outcome. Risk factors included in the FRS global CVD function and the ACC/AHA function are age, TC, HDL, SBP, treatment for hypertension, smoking, and T2DM status (all yes). Sex-specific risk equations were applied to males and females separately. For the ACC/AHA risk score, African American (AA) coefficients were used for AAs and white coefficients were used for all other patients. We replaced 10-year baseline survival estimates with 5-year estimates by assuming exponential survival distributions to align with the available follow-up of the present cohorts. Risk factors included in the Swedish NDR risk prediction functions include onset age of T2DM, T2DM duration, sex, BMI, smoking, HbA1c, SBP, and antihypertensive and lipid-reducing drugs. We divided the cohorts into deciles of the predicted risk and calculated the mean predicted risk value within each decile. We calculated the observed risk from the Kaplan-Meier estimate within each decile and plotted the observed vs. predicted risk functions.
has been acknowledged that this may lead to biased associations. 4 In this manuscript, we performed the first systematic investigation on how different sampling mechanisms impact their inferences of incidence rates, relative risks, and absolute risks of the same outcome in the same target population. For this purpose, we compared the estimates of subsequent CVD incidence and HRs of demographic/clinic risk factors with CVD outcomes obtained from the T2DM patients in NYULH-EHR hospital-based ambulatory care and from the T2DM patients in HRS.
We found that the estimated incidence of subsequent total CVD was substantially higher for NYULH-EHR T2DM patients than HRS T2DM participants, even with varying numbers of required recurrent diagnostic codes in the EHR phenotyping algorithm. [5][6][7] Total CVD risk predictions, established from traditional cohort studies, consequently underestimated the observed total CVD risks in NYULH-EHR, yet not in HRS. This consistent with the literature that hospital-based EHR samples are not random samples from the population, even for disease-specific populations, as they tend to be sicker and with higher healthcare utilization. 5,6,40 In contrast, the HRS CVD identification relies on adjudicated self-reported heart disease or stroke, which may be biased by inaccurate recall, underdiagnosis, or inclusion of healthier patients. 8 Despite these differences, traditional demographic and biomarker CVD risk factors showed comparable risk estimates in NYULH-EHR and HRS. The HR estimates and c-indices were consistent with what was reported from the literature, 20,[41][42][43] providing credence of the utility of a well-curated single-institution EHR sample as a feasible cohort to investigate risk factors and refine risk prediction models. Although there was no direct comparison of hard CVD outcomes because no details in CVD outcomes were collected in HRS, we did not observe systemic overestimation for hard CVD outcomes in NYULH-EHR versus ACA/AHA and Swedish NDR risk predictions. This indicates hard CVD outcome is more robust and consistent between EHRs and cohort studies, which may be a result of hard CVD outcomes being diagnosed more consistently between providers than softer CVD outcomes.
Several additional differences between the two datasets were observed. First, the frequency of encounters was significantly higher in patients with CVD in NYULH-EHR, whereas this was fixed by design in HRS. 5,6 It therefore is important to adjust for this as a potential confounding effect and to compare its impact with the unadjusted model in EHR association analysis. These indicators are treated as confounding variables and are not meant to be causal variables or interpreted as such. 44 Second, missingness is higher in CVD patients in NYULH-EHR while lower in CVD patients in HRS, both of which are associated with outcome status. The observed differences in missing probability may be caused by the differences in follow-up time. In NYULH-EHR, patients with CVD had a shorter time to event than those with no CVD and therefore had fewer lab results available. However, in HRS, participants with longer followup time were more likely to observe CVD outcomes, and more likely to be included in the biomarker substudy. Neither sample satisfies missing-at-random assumptions, therefore specific methods to handle missing data are warranted.
Possibly unintuitive findings, yet consistently supported by both datasets, were as following. First, the FRS had limited discrimination c-indices for total CVD events in both two datasets, and the ACC/AHA PCE and Swedish NDR risk scores had limited c-indices for hard CVD events in NYULH-EHR. Our population is an older, exclusively diabetic cohort, which differs from the general population cohorts used to develop the FRS, ACC/AHA, and Swedish NDR risk scores. Therefore, the estimated c-indices are presented to compare performance in the two data sources, not to conclude the invalidity of these risk scores. However, the moderate discriminations and under-estimation of total CVD risk for older ambulatory T2DM patients warrants further investigation as US and international guidelines for primary prevention of CVD have all recommended the use of global CVD absolute risk assessment for decision-making about the intensity of lifestyle and pharmacological preventive interventions. [45][46][47][48][49] Both cohorts showed lower subsequent CVD incidence for Hispanic and non-Caucasian T2DM patients despite their higher T2DM prevalence, consistent with previous findings termed the "Hispanic Paradox". 50,51 The observed difference was not explained by heterogeneous CVD prevalence before or at the time of T2DM diagnosis, nor by the incidence of death as a competing outcome. One plausible explanation is the underdiagnosis/reporting of CVD outcomes for minority T2DM subjects, especially in a hospital-based EHR sampling scheme. 5 In NYULH-EHR, minority T2DM patients had shorter follow-up (Hispanic median 1.3, AA 2.4, Caucasian 3.5 years since T2DM diagnosis) and fewer encounters. AA and Hispanics showed significant protective HRs in the encounter-adjusted results. In HRS, follow-up is comparable by design with slightly fewer interviews among minority patients (average 3.7, 4.1, and 4.5 bi-annual interviews since T2DM onset for Hispanics, AA, and Caucasians, respectively). These findings support a need for greater understanding of data reliability and potential racial/ethnicity confounding factors CVDs to appropriately model CVD prevalence, incidence, risk, and resilience, and improve targeting of intervention efforts for racial/ethnicity minorities. 50 Our study has several limitations. First, there are secular differences in T2DM and CVD management between the NYULH-EHR and HRS data collection years. We observed higher HbA1c in NYULH-EHR compared to HRS (7.18% vs. 6.65%) as more recent guidelines from the American College of Physicians have recommended targeting HbA1c levels between 7% and 8%, whereas the previous target had been 6.5%. 52 Second, the HRS time-to-CVD outcome is in 2-year units as it is obtained from bi-annual interviews, while the NYULH-EHR time-to-outcome has a more realtime resolution. However, the NYULH-EHR sample has a shorter follow-up period than the HRS sample, so our risk estimates may not be capturing later incident CVDs. Third, NYULH-EHR was from a single ambulatory healthcare system in the New York City metropolitan area. These findings do not apply to EHR data from universal-registration of national single-payer system such as in the United Kingdom or Scottish Care Information-Diabetes (SCI-Diabetes database), which present the overall national population under care. Finally, our assessment of CVD risk prediction functions was limited to risk scores utilizing measurements available in the NYULH-EHR and HRS cohorts, and as such may not be reflective of algorithms more commonly used in clinical practice such as the Multi-Ethnic Study of Atherosclerosis (MESA) risk score. Future studies at additional ambulatory care centers with longer follow-up and additional clinical feature collection certainly are warranted to confirm these findings.
To our knowledge, this is the most comprehensive study of incident CVD among older chronic T2DM patients in a hospital-based ambulatory care setting in direct comparison to a US populationbased longitudinal cohort. Being able to compare NYULH-EHR to HRS and ultimately demonstrating that a single institution's EHRbased cohort estimated relative risks reasonably well is a crucial first step towards utilizing EHRs for general population inference.

CONCLUSION
Subsequent total CVD IR was higher in the T2DM patients of a hospital-based ambulatory care EHR cohort than the T2DM respondents of the national cohort Health and Retirement Survey. Therefore, the FRS prediction for total CVD outcomes underestimated the observed CVD risks in the T2DM EHR samples. However, the HRs of demographic factors (including age, gender, race, ethnicity, and smoking status) and major clinical risk factors were generally concordant between the two cohorts.

SUPPLEMENTARY MATERIAL
Supplementary material is available at Journal of the American Medical Informatics Association online.