Abstract
Purpose:
Using data from Ontario, Canada, this report shows how provincial government-assigned health card numbers can be used for individual-level randomization in large pragmatic trials. We describe how health card numbers are assigned and analyze the distribution of health card digits in a trial setting. We then provide an example of how they can be used for randomization and discuss the methodological and practical considerations of the approach.
Key Findings:
In Ontario, Canada, health card numbers are randomly generated and assigned without regard to the applicant’s characteristics. The number is a 10-digit string connected with hyphens followed by a version code (ie, 1234-567-890-XX). The number is unique to each individual and assigned for life. Before assignment, some numbers within the 10 digits are altered using proprietary business rules. We demonstrate how to use certain digits for individual-level randomization and provide an example of how we will use the tenth digit for randomization in a large new trial of different dialysate bicarbonate concentrations. While this approach has many practical and methodological advantages, it does not allow for stratification. Before using this approach, teams should consider if it will affect the integrity of the randomization and the trial, which will be influenced by the setting and the type of intervention tested.
Implications:
Using provincial government-assigned health card numbers for pragmatic randomized trials appears viable, but the merits must be carefully considered on a trial-by-trial basis. The approach can streamline and reduce the cost of conducting such trials.
Background
Large, multicenter pragmatic randomized trials provide the best estimates of treatment effects to guide clinical decision-making and policy. Unfortunately, more than 75% of treatment decisions are made without evidence from large trials. 1 Pragmatic trials are particularly useful for evaluating treatments already delivered in routine care, such as dialysis treatments, hospital procedures, and immunization protocols.2-4 In embedded trials, where the trial is integrated into routine care, health care staff treat patients according to the trial’s random assignment, with the treatments provided in the same way as they would be in clinical practice. For low-risk treatments already provided in routine care, an altered consent process, such as a waiver of participant consent or an opt-out consent process, may be justifiable and approved by research ethics boards (REBs) to make trial conduct possible and to ensure that it mimics usual care as closely as possible. 5 Such decisions are made after extensive consultation with stakeholders.6,7
Trials conducted with these techniques offer many advantages. They are often more feasible and cost-efficient than traditional trials and enable a broader inclusion of patient populations, with minimal or no need for research coordinators at participating sites. In Canada and other regions, baseline and outcome data can be obtained from existing data sources, such as administrative health care databases. 8 These trials are ideal for testing treatments delivered in well-defined settings, such as dialysis centers or emergency departments, where all patients who would receive the treatment in routine care are included in the trial. Done well, pragmatic trials yield results that are highly generalizable to real-world clinical practice.
The Challenge of Randomizing Individual Patients in Pragmatic Trials Using Routinely Collected Data
Despite the many efficiencies of pragmatic trials, individual-level randomization poses challenges. Here, we describe the challenges and a proposed solution for trials using administrative health data in Ontario, although the issues discussed have wider applicability.
First, to provide some context, Ontario residents have universal access to hospital care and physician services through a government-funded single-payer system. As part of routine health care, patient-level data are collected (without requiring consent) for administrative purposes (to record and reimburse care). Access to these data for research purposes is governed by policies and procedures approved by the Information and Privacy Commissioner of Ontario. The data are stored securely in databases held at ICES, and data sets must be linked with unique encoded identifiers and analyzed at ICES. Studies using these data must pass an ICES privacy impact assessment but do not require an REB review, and patient consent is not needed for the data collection or analysis.
For clinical trials, REB approval is required for intervention delivery; however, if an opt-out or waived-consent treatment protocol is approved, patient consent is not required for the intervention, which is delivered as part of routine care by health care staff. If all trial data are analyzed at ICES, no specific consent is needed from patients for data collection or analysis. For example, in MyTEMP, a cluster-randomized clinical trial conducted from 2017 to 2021 in Ontario, 84 dialysis centers were randomly assigned (1:1) to provide low-risk treatment protocols. 2 A waiver of written patient consent was approved for the intervention, which was delivered by health care staff. While patients and their providers could opt-out of the trial-assigned intervention, adherence to the intervention remained high throughout the trial. Data on patient baseline characteristics and the primary outcome were collected as part of routine health care and analyzed at ICES; therefore, no research personnel were needed for data collection, and no specific consent was needed from patients for the data collection or analysis. At the end of the trial, the ICES analyst selected all patients who received maintenance hemodialysis at the participating dialysis centers and who met certain eligibility criteria; in total, 15 413 patients were included in the analysis of the trial outcomes. 2
In contrast, for a randomized clinical trial with individual patient randomization and an opt-out or waived-consent treatment protocol, patient consent will be needed for research personnel to record and transmit data with patient identifiers to the trial’s central coordinating center for central randomization and privacy-compliant database linkage. Consent may also be needed to link the patients’ treatment-assignment records to the health care databases at ICES and to stipulate how the coordinating center handles their identifying information. Formal data-sharing agreements—likely multiple agreements—will be needed between different organizations.
A Proposed Solution
Instead of performing the randomization centrally, we investigated if on-site patient-level randomization could be done using patients’ provincial health card numbers, which are assigned by the Government of Ontario. These numbers are randomly generated, are assigned without regard to the patient’s characteristics, are unique to each patient, and are assigned for life. Health card numbers are needed to access all provincially insured health care services and are also contained in administrative databases held at ICES. This method could enable large pragmatic trials to randomize individual patients (which is more statistically efficient than cluster randomization)9,10 without the need for research personnel at each study site or for new data-sharing agreements (provided all data are analyzed at ICES).
We considered that using the entire 10-digit health card number for random assignment would be impractical. Manually entering each patient’s health card number into an online system to obtain the assignment could be daunting for busy health care personnel and lead to errors. Furthermore, health care personnel may need the patient’s consent to do this, as this number is a personal identifier. We determined that a more feasible approach to randomization would be to use 1 or 2 digits of the health card number.
In this report, we show how certain digits of Ontario health card numbers can be used for individual patient randomization in large pragmatic trials of low-risk treatments.
Report Aims
We first describe how health card numbers are assigned in Ontario. Then, using the sample of 15 413 patients who were included in the MyTEMP trial, 2 we show how the values of the 10 health card digits in the patients’ health card numbers are distributed in this sample. Next, we report the results of a test exercise in which we randomly assigned patients in the MyTEMP trial to one of 2 groups using the last digit (the tenth digit) of their health card numbers. We then describe how we will use this randomization approach in a new pragmatic trial—the Dial-Bicarb Trial—which will test whether a lower versus higher dialysate bicarbonate concentration alters patient outcomes. 11 Finally, we discuss the methodological and practical implications of this randomization approach.
Ontario Health Card Numbers and Their Assignment
The Ontario government issues health card numbers to residents through the Ontario Health Insurance Plan (OHIP). 12 This number is essential for accessing provincially insured health services. To apply for an Ontario health card, residents provide the necessary documents to verify their identity, residency, and eligibility. Most applications are submitted shortly after birth or after immigration to the province. Once a person’s application is approved, they are assigned a unique health card number consisting of a 10-digit numeric string connected with hyphens followed by 2 letters (the version code). Specifically, as shown in Figure 1, a number, such as 1234-567-890-XX, is generated and assigned to the applicant. The numeric digit portion of the health card number is unique to the person and assigned for life. When a card is renewed (usually every 5 years) or updated (for reasons, such as a name change), only the version code following the numeric digit portion changes.

Ontario health card. 12
We consulted with government officials who confirmed that health card numbers are randomly generated and assigned without knowing an applicant’s characteristics. However, before assignment, some numbers within the 10 digits are altered using proprietary business rules, which are in place for security and privacy reasons; as well, the first digit is never assigned a value of zero.
Distribution of Health Card Digits in Patients Included in the MyTEMP Trial
We examined the distribution of values for each digit in Ontario health card numbers in the sample of 15 413 patients who were included in the MyTEMP trial. 2
This analysis was done at ICES using unique encoded identifiers—ICES key numbers, which are assigned to each Ontario resident. Certain members of the Data Quality and Information Management group at ICES had access to the ICES key numbers and the associated Ontario health card numbers, and these data were linked to perform the analysis. We report the P values from a chi-square test for equal proportions of different digits.
First, in isolation, we considered the first digit with 9 possible values (“1,” “2”. . . to “9”). In the trial sample, the 9 groups ranged from 10.5% to 11.7% of the patients (ie, each group did not contain 11.1% of individuals; [100%/9 possible digits = 11.1%]). We found a statistically significant difference in the proportions among the 9 groups (chi-square P value .004).
Second, in isolation, we considered the tenth (last) digit with 10 possible values (“0,” “1,” “‘2,”. . . “9”). In the trial sample, each of the 10 groups contained about 10% of the patients (100%/10 digits = 10%). There was no statistically significant difference in these proportions among the 10 groups (chi-square P value .87).
Third, we considered the ninth and tenth digits together with 100 possible values (“00,” “01,” “02,” . . . “99”). In the trial sample, each of the 100 groups ranged from 0.4% to 1.7% of patients (ie, each group did not contain approximately 1% of the patients; [100%/100 digits = 1%]). There was a statistically significant difference in the proportions among the 100 groups (chi-square P value < .001).
Fourth, in isolation from the middle set of the 10-digit number, we considered the seventh digit with 10 possible values (“0,” “1,” “2,” . . . “9”). In the trial sample, each of the 10 groups contained approximately 10% of the patients (100%/10 digits = 10%), and there was no statistically significant difference in the proportions among the 10 groups (chi-square P value = .87).
Finally, we considered the sixth and seventh digits together with 100 possible values (“00,” “01,” “02,” . . . “99”). In the trial sample, each of the 100 groups contained approximately 1% of the patients (100%/100 digits = 1%), and there was no statistically significant difference in the proportions among the 100 groups (chi-square P value .84).
Using the Last (the Tenth) Digit of Ontario Health Card Numbers to Allocate Individual Patients Into Two Groups: Results of a Test Exercise
We conducted the following test exercise using the sample of 15 413 patients included in the MyTEMP trial. 2 The analysis was done at ICES using unique encoded identifiers as described above.
As described above, the last digit of a health card number has 10 values that range from 0 to 9. We randomly selected 5 values, and patients whose health card numbers ended in these values were allocated to group 1 (n = 7646), and patients whose health card numbers ended in the other 5 values were allocated to group 2 (n = 7767).
We then compared groups 1 and 2 on the set of baseline characteristics used in the MyTEMP trial. As shown in Table 1, the characteristics are well-balanced between groups (based on visual inspection). We also compared groups 1 and 2 on the set of outcomes examined in the MyTEMP trial. We expected to see no differences, and as shown in Table 2, the outcomes did not differ meaningfully between groups (as there were multiple comparisons, we did not perform statistical testing).
Note. ACEi = angiotensin-converting enzyme inhibitor; ARB = angiotensin II receptor blocker.
The sample included all 15 413 patients who were included in the MyTEMP trial; the characteristics were measured at the time of entry into the trial, which ran from April 3, 2017 to March 31, 2021. 2
Data are mean ± standard deviation, median (25th percentile, 75th percentile), or n (%).
Medication assessment was restricted to patients with universal outpatient prescription drug coverage.
Data available on whether a first nephrologist visit occurred within 3 months of starting dialysis: 6861 of 7646 in group 1 and 6935 of 7767 in group 2.
Note. CI = confidence interval.
The sample included all 15 413 patients who were included in the MyTEMP trial; outcomes were assessed from the date of trial entry (April 3, 2017) until March 31, 2021, emigration from the province, death, or the occurrence of a censoring event. 2
Data are n (%).
An unadjusted cause-specific Cox proportional hazard model censoring for all events other than the outcome of interest. Results were similar in Fine and Gray’s subdistribution hazards model, treating death (or non-cardiovascular death when relevant) and loss to follow-up (which occurred when an individual emigrated from the province) as a competing risk. For all time-to-event outcomes, follow-up ended at the outcome, death, loss to follow-up, or the date of maximum follow-up (March 31, 2021).
For the hazard ratio, the referent group is the control group. This ratio is unadjusted for baseline characteristics.
The primary outcome is a composite of cardiovascular mortality or hospital admission with myocardial infarction, ischemic stroke, or congestive heart failure.
Using Health Card Numbers for Randomized Group Assignment in a New Pragmatic Trial—The Dial-Bicarb Trial
We are currently planning a large new trial, the Dial-Bicarb Trial, which is set to begin in April 2025. We plan to allocate patients into 2 treatment groups using their health card numbers. The trial protocol, which describes this randomization method, has been approved by the REB at Western University.
Briefly, bicarbonate (ie, baking soda) is added to the hemodialysis fluid to correct the metabolic acidosis caused by kidney failure. 13 Some hemodialysis units in Canada add bicarbonate to a level of 32 mmol/L, while other units add bicarbonate to a level of 38 mmol/L. Currently, we lack high-quality evidence on whether a lower or higher bicarbonate level is better for patient health.
The Dial-Bicarb Trial will be a parallel-group, 1:1 randomized clinical trial of outpatients receiving maintenance hemodialysis in Ontario. The trial will test whether a lower versus higher concentration of dialysate bicarbonate (32 vs 38 mmol/L) alters mortality risk and other outcomes assessed through Ontario’s administrative health care databases. 11 We expect that the trial will include several thousand patients who will be followed for trial outcomes for at least 2 years.
Patients will be allocated into 2 treatment groups using the last (tenth) digit of their health card number (which has 10 values that range from 0 to 9). As described above, 5 values will be randomly selected, and patients whose health card numbers end in these values will be allocated to group 1, and those whose card numbers end in the other 5 values will be allocated to group 2.
As a hypothetical example, when the value of the tenth digit of the health card is “0,” “3,” “4,” “7,” or “9” sites will be instructed to order patients a bicarbonate level of 32 mmol/L. When the value is “1,” “2,” “5,” “6,” or “8” sites will be instructed to order patients a bicarbonate level of 38 mmol/L. Health care providers will deliver and document the treatment as they would in routine care, and no research coordinators will be needed for data collection at participating sites.
The same randomization scheme will be provided to all dialysis centers participating in the trial, and the random assignment will be applied to all patients receiving dialysis at participating centers during the trial period (including patients who start dialysis during this time). Patients can choose not to receive the trial-assigned bicarbonate concentration (ie, they can opt-out of the assigned intervention; specifics detailed in the trial protocol), although based on extensive consultation with patients and nephrologists, we expect very few will choose to do so. Patients receiving hemodialysis at the participating trial centers cannot opt-out of the trial data collection or analysis as the data are collected as part of routine health care, and the analysis will be done at ICES. To monitor adherence to the trial-assigned bicarbonate concentration, we will collect monthly samples of de-identified data on the bicarbonate concentration from the dialysis run sheets at participating trial centers. The analysis of the primary outcomes will follow an intent-to-treat approach, where patient outcomes will be analyzed based on their randomized group assignment, even if a patient or their nephrologist chooses not to follow the assigned bicarbonate level.
Methodological and Practical Considerations of Using Health Card Numbers for Randomized Group Assignment
Randomized group assignment using health card numbers may be best suited to trials conducted within a pre-defined clinical setting (eg, dialysis centers, intensive care units, and physician offices) where all patients who receive routine care in the setting are included in the trial. Before using this randomization method, trial teams should consider the following factors.
Informed Consent
In traditional clinical trials, research participants willingly understand a trial’s purpose, risks, and benefits. They express their autonomy through their consenting decision to participate or not participate. 14 However, some types of treatments and trials pose minimal risk to participation beyond what would otherwise occur in routine care. In such cases, the research ethics review board may approve an altered consent process if specific criteria are met and justified (Canada’s Tri-Council Policy Statement-2 [TCPS-2] Article 3.7A). 5 Allowing an altered approach to consent requires abundant caution and should only be considered after extensive consultation and approval by a broad group of partners, including representation from potential participants. 6
Concealment of Allocation
When health card numbers are used for randomization, the randomization scheme cannot be concealed from patients and/or health care staff unless, possibly, it is generated and/or applied through electronic medical records. In the Dial-Bicarb Trial, knowledge of the randomization scheme will not influence patient inclusion in the trial, as the data for all eligible patients will be included in the analysis regardless of whether they follow the trial-assigned treatment. However, this method could lead to selective trial participation and selection bias if this was not the case. The value of concealed randomization and the consequences of predictable treatment assignment are discussed in more detail elsewhere.15,16
Blinding
This method will be unsuitable if trial teams want providers and/or patients to remain unaware of the random assignment during the trial period because it will likely not be possible to conceal the treatment assignment during the trial and placebos are usually not used. Knowledge of the treatment group may influence the use of co-interventions, which the trial team may wish to track and report. Of note, in the Dial-Bicarb Trial, the primary outcome will be recorded in provincial databases by medical coders who are unaware of the trial or a patient’s group assignment.
Adherence to Trial-Assigned Treatment
While trials should be analyzed according to the random assignment (ie, intent-to-treat approach), trial teams may want to monitor adherence to the randomly assigned therapy to help interpret results (ie, if the trial result is neutral but there was low adherence to trial-assigned treatment then it cannot be concluded that the treatment was ineffective). They will want to consider adherence for the overall trial sample and by treatment group.
Integrity of the Randomization
The process by which health card numbers are randomly assigned should maintain randomization integrity. A randomization scheme is generated for certain health card digit(s). With a sufficiently large trial sample, measured and unmeasured baseline characteristics should be balanced between the 2 groups, so that, any observed difference between the groups on outcomes can be attributable to the treatment.
Some organizations that hold data adopt certain processes to adhere to jurisdictional privacy legislation (eg, the Ontario Personal Health Information Protection Act [PHIPA]). 17 In a 2-arm trial, the randomization scheme would be created by randomly allocating 50% of the values of a given health card digit to each arm of the trial. Once the trial is complete and the administrative data are available, an analyst could create a cohort of trial participants with encoded personal identifiers from the administrative data. After that, another individual with access to the encoded personal identifiers, the health card numbers, and the randomization scheme would link random assignments to the list of trial participants. Data with health card numbers omitted would then be returned to the analyst to analyze the encoded data according to the assigned treatment. This process can also be carried out using the group labels “a” and “b” if there is an interest in analyzing trial outcomes without knowledge of the treatment assignment.
Future Changes on How Health Card Numbers Are Assigned
Trial teams need to be vigilant for any changes in how the government issues health card numbers, as new business rules could influence the integrity of the randomization. Vigilance is essential for trials with long accrual periods.
Lack of Stratification and Block Randomization
Traditional multi-center randomized clinical trials often stratify the randomization by center and may also stratify it by other characteristics. They typically also use block randomization, which helps achieve a similar number of patients in each group in each stratum. Stratification and block randomization will not be possible when provincial health card numbers are used for randomization, and lack of block randomization may result in a different number of patients in each trial group (Table 1). Nonetheless, randomization by health card numbers enables large sample sizes, which greatly diminishes the value of stratification given that prognostic factors tend to balance naturally with large numbers. 18 If desired, investigators can still adjust analyses for prespecified covariates.
Which of the 10 Digits Should Be Used for Randomization?
In many electronic medical records, health card numbers are displayed as one large number rather than broken up into 3 sections, as shown on a health card. There is an ease in using the health card’s last digit for randomization and describing the assignment in order sets, orientation materials, and standard operating procedures. We expect no unusual correlation of patient characteristics or outcomes by digit value; if there were, the correlation would need to be accounted for in the analysis so as not to inflate the type I error rate (ie, the chance of observing a significant effect that is not truly there). With 10 possible values, a single digit allows for 1:1 randomization with 2 approximately equal-sized groups; the same is not true for a 3-equal-arm parallel-group trial or some other allocation ratios (eg, 1:2), though other digit combinations may allow for this.
Conclusion
Using provincial government-assigned health card numbers for certain types of randomized trials conducted in Ontario, Canada, appears viable. Doing so may improve efficiency and reduce the cost of such trials.
Footnotes
Declaration of Conflicting Interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.
Funding
The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This study was supported by ICES, and the analysis was completed by ICES Kidney, Dialysis, and Transplantation personnel at ICES Western. This site receives core funding from the Academic Medical Organization of Southwestern Ontario, the Schulich School of Medicine and Dentistry, Western University, and the Lawson Health Research Institute; ICES is funded by an annual grant from the Ontario Ministry of Health (MOH) and the Ministry of Long-Term Care (MLTC). This study also received CIHR grant funding through Accelerating Clinical Trials Canada (NPI Dr. PJ Devereaux) and Health Data Research Network Canada (NPI Kimberlyn McGrail). The use of the data in this project is authorized under section 45 of Ontario’s Personal Health Information Protection Act (PHIPA) and does not require review by a Research Ethics Board. This document used data adapted from the Statistics Canada Postal Code OM Conversion File, which is based on data licensed from Canada Post Corporation, and/or data adapted from the Ontario Ministry of Health Postal Code Conversion File, which contains data copied under license from ©Canada Post Corporation and Statistics Canada. Parts of this material are based on data and/or information compiled and provided by the MOH, the MLTC, the Canadian Institute for Health Information (CIHI), and Ontario Health. However, the analyses, conclusions, opinions, and statements expressed herein are solely those of the authors and do not reflect those of the funding or data sources; no endorsement is intended or should be inferred. We thank IQVIA Solutions Canada for use of their Drug Information File. MyTEMP was funded by grants from the Canadian Institutes of Health Research, Strategy for Patient Orientated Research for Innovative Clinical Trials (MYG 151209), the Heart and Stroke Foundation of Canada (G-16-00012589), the Ontario Renal Network, the Ontario Strategy for Patient-Oriented Research Support Unit, Dialysis Clinic, Inc. (#C-3858), ICES, the Lawson Health Research Institute, and Western University. The study was approved by the Health Sciences Research Ethics Committee of Western University and used the Clinical Trials Ontario Research Ethics Review System (CTO ID: 0736, Sponsor Study ID: IA2014-405003). Dr Amit Garg was supported through the Dr Adam Linton Chair in Kidney Health Analytics. Dr Pavel Roshanov was supported by the Academic Medical Organization of Southwestern Ontario Opportunities fund.
