Comparing regular expression and machine learning approaches to predict immigrant status from primary care electronic medical record data in Ontario, Canada

New immigrants often face barriers when navigating the healthcare system, which can create unmet healthcare needs and contribute to health inequities. Primary care practices, as the gateway to the healthcare system, could use information about their patients' immigrant status to ensure accessible care and equitable resource allocation. However, this is not routinely collected or documented in primary care. The objective of this study was to explore two approaches (regular expression and machine learning) to determine patient-reported immigrant status from primary care electronic medical records (EMRs). De-identified EMR data from the St. Michael's Hospital Academic Family Health Team in Toronto, Ontario, Canada was used, including the reference set of patient-reported responses to a health equity questionnaire. Two approaches were tested and compared: 1) a regular expression classifier (using key text terms), and 2) supervised machine learning classifier (specifically XGBoost). Discrimination and calibration metrics were calculated using self-reported immigrant status from the patient surveys. Among eligible patients in the analytic cohort (N = 12,998), 44.5% reported being born outside of Canada. Although the XGBoost model outperformed the regular expression approach (XGBoost sensitivity = 53.1% and positive predictive value = 72.6%; regular expression sensitivity = 5.2% and positive predictive value = 96.8%), neither approach was accurate enough for use in practice. While understanding patients' immigrant status is important for the provision of high quality, comprehensive primary health care, our work demonstrates the challenges of using EMR data to derive immigrant status. For now, primary care practices should continue to rely on obtaining immigrant status through initial patient intakes or surveys.

Authors

Institutions

Publication Details

Journal
PLOS Digital Health
Published
2026-04-17
DOI
https://doi.org/10.1371/journal.pdig.0001336
Primary Topic
Migration, Health and Trauma
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Comparing regular expression and machine learning approaches to predict immigrant status from primary care electronic medical record data in Ontario, Canada

Karen Weyman, Andrew D. Pinto, Stephanie Garies, Noah Crampton et al.
PLOS Digital Health
Migration, Health and Trauma
article

Comparing regular expression and machine learning approaches to predict immigrant status from primary care electronic medical record data in Ontario, Canada

Karen Weyman, Andrew D. Pinto, Stephanie Garies, Noah Crampton, Gary Bloch, Christopher Meaney, Nassim Vahidi-Williams, Ri Wang, Jessica Gronsbell, Karen Tu
article en

Abstract

New immigrants often face barriers when navigating the healthcare system, which can create unmet healthcare needs and contribute to health inequities. Primary care practices, as the gateway to the healthcare system, could use information about their patients' immigrant status to ensure accessible care and equitable resource allocation. However, this is not routinely collected or documented in primary care. The objective of this study was to explore two approaches (regular expression and machine learning) to determine patient-reported immigrant status from primary care electronic medical records (EMRs). De-identified EMR data from the St. Michael's Hospital Academic Family Health Team in Toronto, Ontario, Canada was used, including the reference set of patient-reported responses to a health equity questionnaire. Two approaches were tested and compared: 1) a regular expression classifier (using key text terms), and 2) supervised machine learning classifier (specifically XGBoost). Discrimination and calibration metrics were calculated using self-reported immigrant status from the patient surveys. Among eligible patients in the analytic cohort (N = 12,998), 44.5% reported being born outside of Canada. Although the XGBoost model outperformed the regular expression approach (XGBoost sensitivity = 53.1% and positive predictive value = 72.6%; regular expression sensitivity = 5.2% and positive predictive value = 96.8%), neither approach was accurate enough for use in practice. While understanding patients' immigrant status is important for the provision of high quality, comprehensive primary health care, our work demonstrates the challenges of using EMR data to derive immigrant status. For now, primary care practices should continue to rely on obtaining immigrant status through initial patient intakes or surveys.

PLOS Digital HealthVol. 5(4)
St. Michael's Hospital (CA), University Health Network (CA), University of Calgary (CA), University of Toronto (CA), North York General Hospital (CA), Public Health Ontario (CA)
Canadian Institutes of Health Research
Reduced inequalities
Openalex Percentile: Top 17%
Migration, Health and Trauma
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.