Methods Inf Med 2023; 62(05/06): 183-192
DOI: 10.1055/a-2165-5552
Original Article

Performance Characteristics of a Rule-Based Electronic Health Record Algorithm to Identify Patients with Gross and Microscopic Hematuria

Jasmine Kashkoush
1   Department of Urology, Geisinger, Danville, Pennsylvania, United States
Mudit Gupta
2   Phenomic Analytics and Clinical Data Core, Geisinger, Danville, Pennsylvania, United States
Matthew A. Meissner
1   Department of Urology, Geisinger, Danville, Pennsylvania, United States
Matthew E. Nielsen
3   Department of Urology, University of North Carolina at Chapel Hill School of Medicine, Chapel Hill, North Carolina, United States
4   Department of Epidemiology, University of North Carolina at Chapel Hill, Gillings School of Global Public Health, Chapel Hill, North Carolina, United States
5   Department of Health Policy & Management, University of North Carolina at Chapel Hill, Gillings School of Global Public Health, Chapel Hill, North Carolina, United States
H. Lester Kirchner
6   Department of Population Health Sciences, Geisinger, Danville, Pennsylvania, United States
Tullika Garg
6   Department of Population Health Sciences, Geisinger, Danville, Pennsylvania, United States
7   Department of Urology, Penn State Health Milton S. Hershey Medical Center, Hershey, Pennsylvania, United States
› Author Affiliations
Funding Geisinger Clinic Research Fund. SRC S-80


Background Two million patients per year are referred to urologists for hematuria, or blood in the urine. The American Urological Association recently adopted a risk-stratified hematuria evaluation guideline to limit multi-phase computed tomography to individuals at highest risk of occult malignancy.

Objectives To understand population-level hematuria evaluations, we developed an algorithm to accurately identify hematuria cases from electronic health records (EHRs).

Methods We used International Classification of Diseases (ICD)-9/ICD-10 diagnosis codes, urine color, and urine microscopy values to identify hematuria cases and to differentiate between gross and microscopic hematuria. Using an iterative process, we refined the ICD-9 algorithm on a gold standard, chart-reviewed cohort of 3,094 hematuria cases, and the ICD-10 algorithm on a 300 patient cohort. We applied the algorithm to Geisinger patients ≥35 years (n = 539,516) and determined performance by conducting chart review (n = 500).

Results After applying the hematuria algorithm, we identified 51,500 hematuria cases and 488,016 clean controls. Of the hematuria cases, 11,435 were categorized as gross, 26,658 as microscopic, 12,562 as indeterminate, and 845 were uncategorized. The positive predictive value (PPV) of identifying hematuria cases using the algorithm was 100% and the negative predictive value (NPV) was 99%. The gross hematuria algorithm had a PPV of 100% and NPV of 99%. The microscopic hematuria algorithm had lower PPV of 78% and NPV of 100%.

Conclusion We developed an algorithm utilizing diagnosis codes and urine laboratory values to accurately identify hematuria and categorize as gross or microscopic in EHRs. Applying the algorithm will help researchers to understand patterns of care for this common condition.

Supplementary Material

Publication History

Received: 09 May 2022

Accepted: 31 August 2023

Accepted Manuscript online:
04 September 2023

Article published online:
06 October 2023

© 2023. Thieme. All rights reserved.

Georg Thieme Verlag KG
Rüdigerstraße 14, 70469 Stuttgart, Germany

  • References

  • 1 David SA, Patil D, Alemozaffar M, Issa MM, Master VA, Filson CP. Urologist use of cystoscopy for patients presenting with hematuria in the United States. Urology 2017; 100: 20-26
  • 2 Davis R, Jones JS, Barocas DA. et al; American Urological Association. Diagnosis, evaluation and follow-up of asymptomatic microhematuria (AMH) in adults: AUA guideline. J Urol 2012; 188 (6, Suppl): 2473-2481
  • 3 Georgieva MV, Wheeler SB, Erim D. et al. Comparison of the harms, advantages, and costs associated with alternative guidelines for the evaluation of hematuria. JAMA Intern Med 2019; 179 (10) 1352-1362
  • 4 Barocas DA, Boorjian SA, Alvarez RD. et al. Microhematuria: AUA/SUFU guideline. J Urol 2020; 204 (04) 778-786
  • 5 Richesson RL, Hammond WE, Nahm M. et al. Electronic health records based phenotyping in next-generation clinical trials: a perspective from the NIH Health Care Systems Collaboratory. J Am Med Inform Assoc 2013; 20 (e2): e226-e231
  • 6 Wiese AD, Roumie CL, Buse JB. et al. Performance of a computable phenotype for identification of patients with diabetes within PCORnet: The Patient-Centered Clinical Research Network. Pharmacoepidemiol Drug Saf 2019; 28 (05) 632-639
  • 7 Newton KM, Peissig PL, Kho AN. et al. Validation of electronic medical record-based phenotyping algorithms: results and lessons learned from the eMERGE network. J Am Med Inform Assoc 2013; 20 (e1): e147-e154
  • 8 Kirby JC, Speltz P, Rasmussen LV. et al. PheKB: a catalog and workflow for creating electronic phenotype algorithms for transportability. J Am Med Inform Assoc 2016; 23 (06) 1046-1052
  • 9 Pendergrass SA, Crawford DC. Using electronic health records to generate phenotypes for research. Curr Protoc Hum Genet 2019; 100 (01) e80
  • 10 Garg T, Pinheiro LC, Atoria CL. et al. Gender disparities in hematuria evaluation and bladder cancer diagnosis: a population based analysis. J Urol 2014; 192 (04) 1072-1077
  • 11 Loo RK, Lieberman SF, Slezak JM. et al. Stratifying risk of urinary tract malignant tumors in patients with asymptomatic microscopic hematuria. Mayo Clin Proc 2013; 88 (02) 129-138
  • 12 Mariani AJ, Mariani MC, Macchioni C, Stams UK, Hariharan A, Moriera A. The significance of adult hematuria: 1,000 hematuria evaluations including a risk-benefit and cost-effectiveness analysis. J Urol 1989; 141 (02) 350-355
  • 13 Edwards TJ, Dickinson AJ, Natale S, Gosling J, McGrath JS. A prospective analysis of the diagnostic yield resulting from the attendance of 4020 patients at a protocol-driven haematuria clinic. BJU Int 2006; 97 (02) 301-305 , discussion 305
  • 14 Khadra MH, Pickard RS, Charlton M, Powell PH, Neal DE. A prospective analysis of 1,930 patients with hematuria to evaluate current diagnostic practice. J Urol 2000; 163 (02) 524-527
  • 15 Ganguli I, Simpkin AL, Lupo C. et al. Cascades of care after incidental findings in a US national survey of physicians. JAMA Netw Open 2019; 2 (10) e1913325-e13
  • 16 Lai WS, Ellenburg J, Lockhart ME, Kolettis PN. Assessing the costs of extraurinary findings of computed tomography urogram in the evaluation of asymptomatic microscopic hematuria. Urology 2016; 95: 34-38
  • 17 Committee on the Learning Health Care System in America; Institute of Medicine. Smith M, Saunders R, Stuckhardt L. et al., eds. Best Care at Lower Cost: The Path to Continuously Learning Health Care in America. Washington, DC: The National Academies Press; 2013
  • 18 Murphy DR, Meyer AND, Vaghani V. et al. Application of electronic algorithms to improve diagnostic evaluation for bladder cancer. Appl Clin Inform 2017; 8 (01) 279-290
  • 19 Mommsen S, Aagaard J, Sell A. Presenting symptoms, treatment delay and survival in bladder cancer. Scand J Urol Nephrol 1983; 17 (02) 163-167
  • 20 Lyratzopoulos G, Abel GA, McPhail S, Neal RD, Rubin GP. Gender inequalities in the promptness of diagnosis of bladder and renal cancer after symptomatic presentation: evidence from secondary analysis of an English primary care audit survey. BMJ Open 2013; 3 (06) e002861
  • 21 Scosyrev E, Noyes K, Feng C, Messing E. Sex and racial differences in bladder cancer presentation and mortality in the US. Cancer 2009; 115 (01) 68-74
  • 22 Mitra AP, Skinner EC, Schuckman AK, Quinn DI, Dorff TB, Daneshmand S. Effect of gender on outcomes following radical cystectomy for urothelial carcinoma of the bladder: a critical analysis of 1,994 patients. Urol Oncol 2014; 32 (01) 52.e1-52.e9
  • 23 Waldhoer T, Berger I, Haidinger G, Zielonke N, Madersbacher S. Sex differences of ≥ pT1 bladder cancer survival in austria: a descriptive, long-term, nation-wide analysis based on 27,773 patients. Urol Int 2015; 94 (04) 383-389
  • 24 Cohn JA, Vekhter B, Lyttle C, Steinberg GD, Large MC. Sex disparities in diagnosis of bladder cancer after initial presentation with hematuria: a nationwide claims-based investigation. Cancer 2014; 120 (04) 555-561
  • 25 Bassett JC, Alvarez J, Koyama T. et al. Gender, race, and variation in the evaluation of microscopic hematuria among Medicare beneficiaries. J Gen Intern Med 2015; 30 (04) 440-447
  • 26 Khadhouri S, Gallagher KM, MacKenzie KR. et al; IDENTIFY Study group. The IDENTIFY study: the investigation and detection of urological neoplasia in patients referred with suspected urinary tract cancer - a multicentre observational study. BJU Int 2021; 128 (04) 440-450
  • 27 PCORnet Common Data Model. PCORnet Common Data Model. Accessed February 3, 2022 at:
  • 28 Ross TR, Ng D, Brown JS. et al. The HMO research network virtual data warehouse: a public data model to support collaboration. EGEMS (Wash DC) 2014; 2 (01) 1049
  • 29 Richesson R, Smerek M, Cameron CB. A framework to support the sharing and reuse of computable phenotype definitions across health care delivery and clinical research applications. EGEMS (Wash DC) 2016; 4 (03) 1232