Game-changing algorithm helps to better identify people experiencing homelessness
The innovative algorithm developed at ICES helps researchers gain a deeper understanding of the health impacts of homelessness in Canada.

Homelessness is one of Canada’s most pressing social issues and has major impacts on the health and well-being of both individuals and communities. Yet, for decades, researchers struggled to capture its scope accurately. The absence of linked, population-level data—compounded by legal, privacy, and administrative barriers—made it nearly impossible to study homelessness at scale.
Dr. Stephen Hwang, an ICES Scientist and Director at MAP Centre for Urban Health Solutions, spent years navigating these challenges, relying on resource-heavy primary data collection linked at ICES to uncover the connections between housing instability and health outcomes.
To address these challenges, a team of researchers at ICES Central and Western, led by Dr. Salimah Shariff and Lucie Richard, developed and validated an algorithm that provided a reliable and less costly way to follow individuals experiencing homelessness over time. Initial findings showed limited capture of unhoused people, but a breakthrough in 2018 changed everything.
That year, the Canadian Institute for Health Information (CIHI) took a pivotal step forward by mandating that all Canadian hospitals record homelessness in data abstracts using the ‘Z590’ code from the International Classification of Disease-10th Revision (ICD-10). This code, part of the ‘Z’ series, allows coding of social health determinants of health, such as housing status and unemployment, alongside clinical diagnoses.
Since the CIHI mandate there was a notable increase in the identification of patients experiencing homelessness across Canada, and an updated validation study by Lucie Richard and Dr. Hwang confirmed the mandate’s impact: the new coding practice more than doubled the databases’ ability to identify people experiencing homelessness in Toronto.
A new era in homelessness research
This algorithm allows researchers to use administrative health data to reliably identify unhoused individuals, providing a cost-effective and scalable alternative to primary data collection. “We need actionable insights to address the impact of homelessness on health,” says Dr. Hwang. “This methodology accelerates our research and complements hands-on work in the community, giving us a fuller picture in less time.”
This approach also reduces research burden. “We’ve heard from people with lived experience that participating in research studies can be challenging in the midst of so many competing priorities,” says Lucie Richard, a MAP Adjunct Scientist. “This method allows us to focus primary research on topics where this method is not appropriate, while still producing essential insights.”
With this tool, ICES and their partners have unlocked new opportunities to study the intersection of housing and health at a population level—faster, cheaper, and with less disruption to this disadvantaged population.
Research that saves lives
Early ICES work using this algorithm provided some of the earliest evidence about disproportionate risks in COVID-19 infection and complications among unhoused people in Canada. The findings contributed to Ontario’s decision to prioritize this group for early vaccination in February 2021.
And this was only the beginning. The method has since garnered significant research funding and enabled numerous studies that shed light on critical disparities:
- COVID-19: Two additional COVID- 19 vaccination and infection studies continued to measure and highlight disparities in COVID-19 related outcomes between people experiencing homelessness and housed individuals.
- Opioid-related mortality: A study of opioid-related overdose deaths found that people experiencing homelessness represented for an increasing proportion of total deaths in Ontario. This research has been cited by the Association of Municipalities of Ontario to advocate for greater provincial and federal investment in resources to address both the opioid and homelessness crises.
- Hospitalization trends: Differences in hospitalization trends and for overdoses in the early stages of the pandemic were observed among unhoused individuals compared to stably housed and low-income housed comparators, highlighting the heavier reliance of this group on acute healthcare services even in times of crisis.
- Cold weather injuries: An investigation of cold weather-related injuries and emergency department visits plausibly to avoid cold weather exposure by unhoused individuals found significant disparities in injuries and a significant increase in recent ED usage to avoid cold weather exposure. The findings of this work are being used to continue advocacy efforts to improve winter service planning in the City of Toronto and other municipalities, as well as a recent success in adjusting the temperature threshold for opening warming centres in Toronto.
- Diabetes care gaps: A burgeoning body of diabetes-related research indicates there are substantial differences in outpatient processes of diabetes care, disease-related complications as well as mortality among unhoused people as compared to housed people with diabetes.
- Dementia: The first study in Canada to explore the intersection of homelessness and dementia revealed a significantly higher prevalence of this condition among people experiencing homelessness, particularly among those with early-onset dementia.
Additional studies are underway (for example, around hepatitis C, youth homelessness, elderly homelessness, brain injuries, amputation, end-of-life palliative care, and quality of dementia care and mortality), broadening our understanding of the complex health needs of unhoused individuals. Researchers are also working to replicate the validation of this methodology in other provinces, as well as in smaller urban, rural, and remote regions of Ontario, where lack of dedicated homeless services may create an urban bias in the data. Inspired by the validation methodology, researchers have also developed a new case definition for people who inject drugs, another highly marginalized population.
Beyond the numbers: shaping policy and practice
The influence of this methodology extends beyond the research. In healthcare settings like St. Michael’s Hospital in Toronto, teams are reviewing coding practices to further improve homelessness documentation. Meanwhile, researchers are continuing advocacy efforts with CIHI to further improve coding practices, in particular around strategies to minimize false positives by distinguishing between individuals with past and present homelessness. Various public health units, hospital networks, and community organizations are also at different stages in adopting this method to conduct their own low-barrier research, surveillance, and evaluation efforts.
This work exemplifies how thoughtful innovation in data can spark real-world change. From driving pandemic policy to reshaping service delivery for cold weather planning, the ability to capture homelessness in healthcare data is transforming research and improving lives.
Acknowledgements
Many other researchers, policy makers, and trainees have contributed to and continue to advance work using this algorithm, including:
- Dr. Richard Booth, Associate Professor and Arthur Labatt Family Chair in Nursing at Western University, and Adjunct Scientist at ICES Western
- Dr. David Campbell, Associate Professor, Cumming School of Medicine, Department of Medicine, University of Calgary
- Dr. Cheryl Forchuk, Scientist and Assistant Director at Lawson Health Research Institute
- Dr. Tara Gomes, Scientist at the Li Ka Shing Knowledge Institute of St. Michael’s Hospital and ICES, and a Principal Investigator of the ODPRN
- Zoë Greenwald, PhD Candidate in Epidemiology at the University of Toronto and ICES Fellow.
- Dr. Jeffrey Kwong, Senior Scientist at ICES, Associate Scientist at Sunnybrook Research Institute, and Associate Professor in the Department of Family and Community Medicine and Dalla Lana School of Public Health at the University of Toronto
- Michael Liu, medical student, Harvard University
- Dr. Ruchi Sharan, Western University
- Dr. Kathryn Wiens, medical student, University of Toronto