Automated data extraction of electronic medical records: Validity of data mining to construct research databases for eligibility in gastroenterological clinical trials

  • Nora Joseph Department of Medical Sciences, Gastroenterology and Hepatology, Uppsala University, Uppsala
  • Ida Lindblad IQVIA Sweden AB, Solna, Stockholm, Sweden
  • Sara Zaker IQVIA Sweden AB, Solna, Stockholm, Sweden
  • Sharareh Elfversson IQVIA Sweden AB, Solna, Stockholm, Sweden
  • Maria Albinzon IQVIA Sweden AB, Solna, Stockholm, Sweden
  • Øyvind Ødegård IQVIA Sweden AB, Solna, Stockholm, Sweden
  • Li Hantler IQVIA Sweden AB, Solna, Stockholm, Sweden
  • Per M. Hellström Department of Medical Sciences, Gastroenterology and Hepatology, Uppsala University, Uppsala
Keywords: Big data, data analytics, data extraction, data mining, electronic medical records


Background: Electronic medical records (EMRs) are adopted for storing patient-related healthcare information. Using data mining techniques, it is possible to make use of and derive benefit from this massive amount of data effectively. We aimed to evaluate validity of data extracted by the Customized eXtraction Program (CXP).

Methods: The CXP extracts and structures data in rapid standardised processes. The CXP was programmed to extract TNFα-native active ulcerative colitis (UC) patients from EMRs using defined International Classification of Disease-10 (ICD-10) codes. Extracted data were read in parallel with manual assessment of the EMR to compare with CXP-extracted data.

Results: From the complete EMR set, 2,802 patients with code K51 (UC) were extracted. Then, CXP extracted 332 patients according to inclusion and exclusion criteria. Of these, 97.5% were correctly identified, resulting in a final set of 320 cases eligible for the study. When comparing CXP-extracted data against manually assessed EMRs, the recovery rate was 95.6–101.1% over the years with 96.1% weighted average sensitivity.

Conclusion: Utilisation of the CXP software can be considered as an effective way to extract relevant EMR data without significant errors. Hence, by extracting from EMRs, CXP accurately identifies patients and has the capacity to facilitate research studies and clinical trials by finding patients with the requested code as well as funnel down itemised individuals according to specified inclusion and exclusion criteria. Beyond this, medical procedures and laboratory data can rapidly be retrieved from the EMRs to create tailored databases of extracted material for immediate use in clinical trials.


Download data is not yet available.


  1. Sheikh A, Jha A, Cresswell K, Greaves F, Bates D. Adoption of electronic health records in UK hospitals: lessons from the USA. Lancet. 2014;384:8–9. doi: 10.1016/S0140-6736(14)61099-0

  2. De Lusignan S. Benefits and disbenefits of computerised medical records (CMR): clinical, patient-centered, implementation and sociotechnical plus a more accessible approach to modelling. J Innov Health Inform. 2016;23:864. doi: 10.14236/jhi.v23i1.864

  3. Elstein SA, Schwartz A. Clinical problem solving and diagnostic decision making: selective review of the cognitive literature. BMJ. 2002;324:729–32. doi: 10.1136/bmj.324.7339.729

  4. Sun W, Cai Z, Li Y, Liu F, Fang S, Wang G. Data processing and text mining technologies on electronic medical records: a review. J Healthc Eng. 2018;2018;4302425. doi: 10.1155/2018/4302425

  5. Marinov M, Mosa AS, Yoo I, Boren SA. Data-mining technologies for diabetes: a systematic review. J Diab Sci Technol. 2011;5:1549–56. doi: 10.1177/193229681100500631

  6. Maheshwari AK. Big data essentials. Seattle: Routledge Taylor & Francis Group; 2016.

  7. Bellinger C, Mohomed Jabbar MS, Zaïane O, Osornio-Vargas A. A systematic review of data mining and machine learning for air pollution epidemiology. BMC Public Health. 2017;17:907. doi: 10.1186/s12889-017-4914-3

  8. Salazar J, Espinoza C, Mindiola A, Bermudez V. Data mining and endocrine diseases: a new way to classify? Arch Med Res. 2018;49:213–15. doi: 10.1016/j.arcmed.2018.08.005

  9. Sundermann AJ, Miller JK, Marsh JW, Saul MI, Shutt KA, Pacey M, et al. Automated data mining of the electronic health record for investigation of healthcare-associated outbreaks. Infect Control Hosp Epidemiol. 2019;40:314–19. doi: 10.1017/ice.2018.343. Erratum in: Infect Control Hosp Epidemiol. 2019;40:618.

  10. Chen LA, Fawcett TN. Using data mining strategies in clinical decision making: a literature review. Comput Inform Nurs. 2016;34:448–54. doi: 10.1097/CIN.0000000000000282

  11. Prasad YL. Big data analytics made easy. Chennai: Notion Press; 2016.

  12. Ankam V. Big data analytics. Mumbai: Packt Publishing; 2016.

  13. Södra Älvsborgs Sjukhus, Medicinsk beredningsgrupp. Skanning av journalhandlingar SÄS. Borås: Västra Götalandsregionen; 2020.

  14. Olsson Kullberg A-C, Magnusson B. Scanning i samarbete HSF - KS (arbetsversion 0.24). Scanning i samarbete HSF Gotland-KS. Gotland; 2006. Available from: [cited 19 January 2022].

  15. Inera. Nationell patientöversikt – NPÖ. Stockholm; 2019. Available from: [cited 25 November 2021].

  16. Martinell M, Stålhammar J, Hallqvist J. Automated data extraction – a feasible way to construct patient registers of primary care utilization. Ups J Med Sci. 2012;117:52–6. doi: 10.3109/03009734.2011.653015

  17. Available from: [cited 1 January 2022].

  18. Lewis JD, Chuai S, Nessel L, Lichtenstein GR, Aberra FN, Ellenberg JH. Use of the noninvasive components of the Mayo score to assess clinical response in ulcerative colitis. Inflamm Bowel Dis. 2008;14:1660–6. doi: 10.1002/ibd.20520

How to Cite
Joseph N., Lindblad I., Zaker S., Elfversson S., Albinzon M., Ødegård Øyvind, Hantler L., & Hellström P. M. (2022). Automated data extraction of electronic medical records: Validity of data mining to construct research databases for eligibility in gastroenterological clinical trials. Upsala Journal of Medical Sciences, 127(1).
Original Articles