title: Distinguishing incident and prevalent diabetes in an electronic medical records database.
abstract: OBJECTIVE
  To develop a method to identify incident diabetes mellitus (DM) using an electronic medical records (EMR) database and test this classification by comparing incident and prevalent DM with common outcomes related to DM duration.
  
  
  METHODS
  Incidence rates (IRs) of DM (defined as a first diagnosis or prescription) were measured in 3-month intervals through 36 months after registration in The Health Improvement Network, a primary care database, from 1994 to 2012. We used Joinpoint regression to identify the point where a statistically significant change in the trend of IRs occurred. Further analyses used this point to distinguish those likely to have incident (n = 50 315) versus prevalent (n = 28 337) DM. Incident and prevalent cohorts were compared using Cox regression for all-cause mortality, cardiovascular disease (CVD), diabetic retinopathy, diabetic nephropathy, and diabetic neuropathy. Analyses were adjusted for age, sex, smoking, obesity, hyperlipidemia, hypertension, and calendar year.
  
  
  RESULTS
  Trends in DM IRs plateaued 9 months after registration (p = 0.04). All cause-mortality was increased (hazard ratio (HR) 1.62, 95% CI 1.53-1.70) among patients diagnosed with DM prior to 9 months following registration (prevalent DM) compared to those diagnosed after 9 months (incident DM). Similarly, the risk of DM-related complications was higher in prevalent versus incident DM patients [CVD, HR 2.24 (2.08-2.40); diabetic retinopathy, HR 1.31 (1.24-1.38); diabetic nephropathy, HR 2.30 (1.95-2.72); diabetic neuropathy, HR 1.28 (1.16-1.41)].
  
  
  CONCLUSIONS
  Joinpoint regression can be used to identify patients with newly diagnosed diabetes within EMR data. Failure to exclude patients with prevalent DM can lead to exaggerated associations of DM-related outcomes.
authors.affiliation: Abramson Cancer Center, University of Pennsylvania, Philadelphia, PA, USA.
authors.forename: Ronac
authors.initials: R
authors.lastname: Mamtani
authors.forename: Kevin
authors.initials: K
authors.lastname: Haynes
authors.forename: Brian S
authors.initials: BS
authors.lastname: Finkelman
authors.forename: Frank I
authors.initials: FI
authors.lastname: Scott
authors.forename: James D
authors.initials: JD
authors.lastname: Lewis
mesh_terms: D000328:Adult; D000368:Aged; D015331:Cohort Studies; D016208:Databases, Factual / Q000706:statistics & numerical data*; D048909:Diabetes Complications / Q000453:epidemiology* / Q000401:mortality / Q000503:physiopathology; D003920:Diabetes Mellitus / Q000453:epidemiology* / Q000401:mortality; D057286:Electronic Health Records / Q000706:statistics & numerical data*; D005260:Female; D005500:Follow-Up Studies; D006801:Humans; D015994:Incidence; D008297:Male; D008875:Middle Aged; D015995:Prevalence; D016016:Proportional Hazards Models; D012044:Regression Analysis; D012189:Retrospective Studies; D012307:Risk Factors
keywords: bias; cohort studies; diabetes; electronic medical records; incidence; pharmacoepidemiology