Research · Data science
Replacing random RT-PCR checks with data-driven traveller selection.
In 2023, travellers arriving at Toronto Pearson International Airport were chosen for RT-PCR report checks at random. For the STEM Fellowship Big Data and AI Challenge, four of us at Lambton College proposed a better way: combine WHO and Government of Canada COVID-19 data with each traveller's RT-PCR report to sort passengers into priority groups. Our paper was published in the challenge proceedings in the STEM Fellowship Journal.
Random selection treats every traveller the same. Our study scored each country's current COVID-19 risk from WHO data, used Government of Canada data to find the age groups most at risk of severe illness, extracted traveller RT-PCR reports from PDF with Python, and combined the three into priority levels, from "Immediate" to "Low". Paper: Eliminating Randomness in Selecting International Passengers for RT-PCR (doi:10.17975/sfj-2023-007). Code: GitHub.
The problem
By mid-2023, international travel had reopened with fewer restrictions, but COVID-19 had not gone away. New sub-variants such as Omicron "Arcturus" were spreading, and it was unclear how well existing vaccines protected against them. The numbers were still large:
RT-PCR tests were the most widely used way to detect the virus, and many travellers carried RT-PCR reports. But choosing whom to check at random ignores information that was already publicly available. Our question: could that data point the Immigration unit at Pearson to the travellers most likely to need attention?
The data
| Source | What we used |
|---|---|
| World Health Organization | New COVID-19 cases per country in the last 7 days, and per 100,000 people |
| Government of Canada | COVID-19 epidemiology: hospitalizations, ICU admissions and deaths, by age group and sex, over time |
| Traveller RT-PCR reports | Reports from travellers in several countries, with test date, age, gender, location and result. Some were created from sample reports available online. |
The method
1. A risk level for every country
From the WHO data, we calculated each country's share of new cases per 100,000 people over the last 7 days, then turned it into a simple risk level:
share (%) = cases_per_100k_last_7_days / sum(all countries) × 100
risk level = 2 if share > 2% (highly affected)
1 if 1% ≤ share < 2%
0 otherwise (low affected)
2. Who is most at risk of severe illness
We analysed six months of Government of Canada data by age, sex and outcome. People aged 70 and over made up the largest share of hospitalizations, ICU admissions and deaths, with the 50 to 69 group next. That gave us three age bands for the model: 70 and over, 50 to 69, and 0 to 49.
3. Reading the RT-PCR reports
We extracted the reports from PDF into a structured CSV file with Python: test date, result, gender, age and location, with the country derived from the location. We also added how old each report was, in days since the test date.
4. Priority groups
Combining the three gave each traveller a priority level:
| Priority | Age | RT-PCR report | Country risk |
|---|---|---|---|
| Immediate, level 3 | 70+ | Positive, more than 14 days old | High (2) |
| Immediate, level 2A | 70+ | Positive, less than 14 days old | High (2) |
| Immediate, level 2B | 70+ | Positive, more than 14 days old | Low (1 or less) |
| High, level 3 | 50 to 69 | Positive, more than 14 days old | High (2) |
| High, level 2A | 50 to 69 | Positive, less than 14 days old | High (2) |
| High, level 2B | 50 to 69 | Positive, more than 14 days old | Low (1 or less) |
| Medium, level 2A | 50+ | Negative | Any |
| Medium, level 2B | 0 to 49 | Positive | Any |
| Low | 0 to 49 | Negative | Any |
Immediate priority means the traveller should be selected for an RT-PCR check. High and medium priority travellers can be sampled at random but don't need immediate attention. Everyone else is low priority.
Results
Applied to the reports we collected, the model placed 2 travellers in Immediate level 2B, 8 in High level 2B and 19 in Medium level 2A. Instead of a random draw, officers would have had a short, ranked list with a reason attached to every name.
Random selection is not an optimal strategy when the data to do better is already public.
What we learned
- Public data is enough to start. WHO and Government of Canada data, combined with the reports travellers already carry, supported a clear and explainable selection policy.
- Simple, transparent rules are a strong first step. Every priority level can be explained in one sentence, which matters for a decision that affects people at a border.
- Automated report processing is the foundation. Nothing works until reports in PDF become clean, structured data.
- Collaboration and mentorship made it possible. Professor Ashish Gupta's guidance kept the work rigorous and focused.
Scope and next steps
As a challenge project, the study was designed to demonstrate the approach. Taking it further would mean:
- applying the method to a larger set of real traveller reports;
- validating the priority rules against real screening outcomes;
- reviewing, with fairness and legal experts, which traveller attributes are appropriate to use.
How we would build it with today's tools
If we started the project in 2026, the same idea would go much further:
Read any report, in any format or language
We wrote Python to extract fields from PDF reports with a fixed layout. Today, multimodal AI models can read PDFs, photos and scans in many languages and layouts, and return the test type, date, result and lab as structured JSON that follows a fixed schema, ready to validate. I describe that pattern in JSON as the contract between your systems and AI.
From rules to a tested model
With real outcome data, such as which selected travellers actually tested positive on arrival, the rules could become a trained model. Gradient-boosted trees such as XGBoost or LightGBM are a strong, explainable choice for this kind of tabular data, and SHAP values show which factors drive each prediction, so officers still get a reason with every recommendation. The model would be tested on held-out data and compared against random selection before anyone relied on it.
Faster research with AI assistants
AI coding assistants would speed up data cleaning, visualization and experiment code, the work that filled our notebooks. The research questions, the judgment calls and the checking would still be ours.
Fairness, privacy and people in the loop
- Fairness: test how often each group is selected, and prefer factors about the trip and the test, like report age and current case rates at the origin, over personal characteristics wherever possible.
- Privacy: treat RT-PCR results as health data under Canadian privacy law: collect the minimum, protect it, delete it when it is no longer needed.
- Human decisions: the model prioritizes, an officer decides.
- Monitoring: case rates and variants change weekly, so risk levels and the model need regular updates.
The paper and the code
- Paper title
- Eliminating Randomness in Selecting International Passengers for RT-PCR
- Authors
- Umid Ghimire, Dharmik Limbani, Erwin Mongui, Sairam Kilari (Lambton College)
- Mentor
- Professor Ashish Gupta, Lambton College
- Written for
- STEM Fellowship National Inter-University Big Data and AI Challenge 2023 (paper dated June 11, 2023)
- Published in
- STEM Fellowship Journal, Leveraging open data analytics and machine learning to improve diagnosis of diseases, patients' care, and support: Proceedings from the 2023 Inter-University Big Data and AI Challenge
- Code
- Jupyter notebooks on GitHub: COVID-19 data visualization, RT-PCR report processing and traveller segmentation
We are grateful to Professor Gupta for his mentorship, and to the STEM Fellowship for organizing the challenge and giving us the chance to contribute.
Get my next case studies and articles in Google Search.