Skip to content
DEXPRADEXPRA home

Article · Quality & Standardization

Linking Patient Records Across Organizations: Identifiers, Tokens and Who Errors Fall On

When two organizations cannot share identifiers, records are linked through a linkage unit or through tokens. How each works, how tokens are attacked, what the US, Canada and Europe allow, and who linkage errors fall on.

DEXPRA · · 9 min read

When the records live in different organizations

Inside one organization, a patient identity service matches records against its own index. How that works, and how to test it on your own data, is in Terminology and patient identity services in healthcare data platforms. This piece is about the harder case: records held by organizations that may not share identifiers at all, the rules in the US, Canada and Europe that decide what may be linked, and who linkage errors fall on.

Linking records without sharing identifiers, and how that is attacked

Some records have to be linked by organizations that may not share identifiers. Two designs exist. In separated linkage, identifiers go to a linkage unit and content to the analyst, with a key between them: ICES converts each Ontario health number into one anonymous ICES identifier, and at Statistics Canada linkage staff see identifiers while file builders see data without them. In token linkage, each source turns identifiers into tokens and the tokens are compared. Why matching has to happen while identifiers are still inside the building is set out in the on-premises and hybrid clinical AI framework.

Linking records without the analyst holding identifiersSeparated linkage. Each source sends identifiers to a linkage unit and clinical content separately. The linkage unit sees identifiers only and assigns a project key; the analyst receives content with the key and never sees identifiers. ICES converts each Ontario health number into one anonymous ICES identifier; Statistics Canada’s linkage staff see identifiers only; CIHI links on an encrypted health number and province; under the EU’s health data space the key is held by the health data access body or a trusted third party. Below, hashed tokens: each source turns identifiers into keyed tokens and the tokens are compared. Under HIPAA that is done under expert determination with the keys withheld; an unkeyed hash counts as an identifier, and NIST notes that parties sharing a scheme can re-identify each other’s data.SEPARATED LINKAGESOURCE AidentifierscontentSOURCE BidentifierscontentLINKAGE UNITSees identifiers only.Decides which recordsare one person.ANALYSTSees content and theproject key. Never theidentifiers.CONTENT, NO IDENTIFIERSKEYICES: each OHIP number becomes one anonymous ICES identifierStatistics Canada: linkage staff see identifiers; file builders do notCIHI: an encrypted health number and province are the linkage keysEU health data space: the key stays with the access body or a trusted third partyHASHED TOKENS, FOR CONTRASTEACH SOURCEturns identifiers intokeyed tokensTOKENS COMPAREDby a broker or an enclave;N3C used an honest brokerTHE CATCHNo key, and it is an identifier.Shared scheme: re-identifiable.
As ICES, Statistics Canada and CIHI document their own linkage, with hashed tokens below for contrast.

The best-known token method encodes names as Bloom filters. Schnell, Bachteler and Reiher’s 2009 method splits a name into pairs of letters, sets bits in a filter for each pair, and compares filters by the Dice coefficient, so Smith and Smyth still look alike without either side seeing the name. In 2014 Niedermeyer and colleagues showed a manual attack on Bloom-filter-encoded surnames that needed nothing more than a public list of common surnames.

What a Bloom filter compares

Demonstration

Type two names. Each becomes padded pairs of letters, each pair sets two bits in a 64-bit filter, and the filters are compared without the names. A demonstration of the method only: it has no secret key, so it protects nothing.

Site A bigrams

  • _S, shared
  • SM, shared
  • MI, not shared
  • IT, not shared
  • TH, shared
  • H_, shared

Site B bigrams

  • _S, shared
  • SM, shared
  • MY, not shared
  • YT, not shared
  • TH, shared
  • H_, shared

Filter A · 11 of 64 bits set

Filter B · 11 of 64 bits set

Filled squares are bits both filters set; outlined squares are set in one only. The numbers beside each bigram are the 2 positions it sets.

Dice on the bigrams
0.67
What the names share
Dice on the filters
0.73
What the linkage unit sees: 2 × shared bits ÷ (bits in A + bits in B)

Bigram similarity 0.67, filter similarity 0.73.

Why this one is not safe

Without a secret key anyone can build the same filter from a list of common surnames and read the names back, which is the attack published in 2014. NIST SP 800-188 says Bloom-filter linkage lets the parties re-identify each other’s data, and HHS treats a hash made without a secret key as an identifier. Real deployments key the hashes and harden the filters, at a cost in links found.

Schnell, Bachteler and Reiher, BMC Med Inform Decis Mak 2009; Niedermeyer et al., J Priv Confid 2014; NIST SP 800-188 (2023), §4.3; HHS OCR de-identification guidance, Q3.5. Hashes here are FNV-1a with double hashing, chosen to be short and deterministic.

A demonstration of the method with no secret key, so it protects nothing. Type two names and compare.

The US rules on tokens are specific. HHS’s de-identification guidance says codes derived from protected health information, cryptographic hashes included, may be disclosed under expert determination as long as the keys are not, including to the recipients, and that a hash made without a secret key counts as an identifying element. NIST SP 800-188 describes keyed hashing with a 256-bit random key, warns that organizations sharing one pseudonymization scheme can re-identify each other’s data, and does not recommend hashing direct identifiers. It sets out no technique for strengthening Bloom filters.

Strengthening a filter costs links. A 2021 evaluation by Franke and colleagues tested nine techniques on two US voter files with real errors between snapshots. Several “drastically reduce linkage quality”, while salting and XOR-folding flattened the bit frequencies an attack needs and kept quality high. The authors had not yet tested them against modern attacks.

Nine ways to harden a Bloom filter, and what each cost

Franke, Sehili, Rohde and Rahm tested them on two US voter files, North Carolina’s and Ohio’s, with real errors between two snapshots and none inserted. Linkage quality is F-measure, precision and recall.

  • Random hashing

    Replaces double hashing, which attacks have exploited, with a keyed random number generator

    “No attacks against this method are known at present”

    Described, not scored
  • Salting

    Keys the hash with a salt per attribute, or per record

    Attribute salts cost about 1% of F-measure and flattened the bits. A year-of-birth record salt cut recall from 89.2% to 63.6%; a Soundex first-name salt kept it

    Quality kept
  • Attribute weighting

    Gives each attribute its own number of hash functions

    Fewer for city raised F-measure by over 6% and 2% on the two datasets

    Quality kept
  • Balancing

    Concatenates each filter with its negation and permutes the bits

    Precision fell 7% and 45% at the base threshold, recovered at a higher one, and the bits became less uniform

    Depends on the setting
  • XOR-folding

    Folds the filter in half and XORs the halves

    Under 1% of F-measure once tuned, with the bit distribution flattened by about 10%: “performs the best”

    Quality kept
  • Rule 90

    Replaces each bit with the XOR of its neighbors

    Recall down about 12.5% and 7.6%; bits flattened by about 10%

    Quality lost
  • Re-hashing

    Re-hashes windows of bits into new positions

    Recall down more than 16% at the smallest window: “we can not recommend this method”

    Quality lost
  • Random noise

    Flips or sets bits at random

    Little flattening; at high noise, “an unacceptable loss in linkage quality”

    Quality lost
  • Fake injections

    Adds artificial records with rare bigrams to flatten frequencies

    Adds computation, can match a real record by chance, and has to be “winnowed”

    Described, not scored

Franke M et al., “Evaluation of Hardening Techniques for Privacy-Preserving Record Linkage”, EDBT 2021, §§3, 6–7. The authors say testing against modern attacks is still to come. Two datasets are not your data.

Franke et al., EDBT 2021: what each technique does and what it cost on two datasets.

Patient identifiers and privacy rules in the US, Canada and Europe

The United States has no national patient identifier, and Congress keeps renewing the bar. The 2026 appropriations act again forbids spending federal funds on adopting a unique health identifier “until legislation is enacted specifically approving the standard”, as every such act has since 1999. US matching therefore rests on demographics.

USCDI v6’s patient elements are names, previous name, birth date, sex, current and previous address, phone and email, with addresses to the Project US@ specification, and include no Social Security number. TEFCA’s technical framework requires every available demographic in a query and leaves the algorithm to each network. Inside its own programs, Medicare links by its own identifier, the MBI, which is why the hybrid measure can join EHR data to claims at all.

Canada shows the other case. A provincial health number, ten digits for life in Ontario with a version code on the card, settles most matches inside a province. CIHI’s data quality documentation puts the share of hospital abstracts with a missing or invalid number at 1.40% for acute care and 1.41% for emergency and ambulatory care in 2025–26, counting a number shared by a child and its mother as invalid.

What a number leaves out is specific: newborns before their own number arrives, people who have just moved between provinces, refugee claimants on federal coverage, people treated outside their province. None of them is what US reference data was built to cover, and no referential vendor found documents Canadian reference data.

Who arrives without a usable number

In Canada a provincial health number settles most matches inside a province. These are the people it does not cover, each with the rule that creates the gap. A US and an English row close it.

  • Canada

    Newborns

    Ontario pre-prints a newborn’s health number on the infant registration form; the card arrives within eight weeks

    CIHI counts a number shared by a child and mother as invalid

  • Canada

    People moving between provinces

    The Canada Health Act allows a waiting period of up to three months, with the old province paying meanwhile. British Columbia’s is the rest of the month plus two; Ontario’s has gone

    Care in the new province in the first months may carry the old province’s number

  • Canada

    Refugee claimants and some newcomers

    The Interim Federal Health Program covers them “until you’re eligible for provincial or territorial insurance”

    No provincial number until then

  • Canada

    Members of the Canadian Forces

    Excluded from “insured person” under the Canada Health Act; British Columbia waives the wait on discharge

    No provincial coverage while serving

  • Canada

    People in a federal penitentiary

    Excluded from “insured person” under the Canada Health Act

    No provincial coverage while serving the term

  • Canada

    People treated outside their province

    ICES: care given to non-Ontarians in Ontario is “not linkable to other data in most cases”

    Present in the hospital’s data, missing from the linked picture

  • Canada

    Married people in Quebec

    Civil Code art. 393: both spouses keep their own names

    A name change on marriage is not the pattern a matcher should expect

  • US

    Newborns in a US hospital

    The Joint Commission has required distinct newborn identification since 2019; temporary names such as “Babyboy Smith” persist

    A temporary name, changed before discharge, and sequential record numbers for babies born close together

  • International

    Babies in England

    The NHS number’s trace status has a code for “trace postponed (baby under six weeks old)”

    A number may be present and not yet verified

Ontario Ministry of Health; ontario.ca; gov.bc.ca; the Canada Health Act; IRCC; ICES; the Civil Code of Québec; CIHI; the Joint Commission; the NHS Data Dictionary. Read in October 2026. Quebec’s waiting period could not be read at RAMQ.

Each gap with the rule that creates it, read at the issuing body in October 2026.
Hospital abstracts with a missing or invalid health card number, CanadaFrom CIHI’s data quality documentation, at one definition. Acute and day surgery abstracts in the Discharge Abstract Database: 1.16 percent in 2023–24, 1.46 percent in 2024–25 and 1.40 percent in 2025–26. Emergency and ambulatory abstracts in NACRS: 1.55, 1.52 and 1.41 percent. National shares; CIHI does not publish them by province, and Quebec is outside the DAD’s population. Invalid includes a number shared by a child and mother.SHARE OF ABSTRACTS · MISSING, INVALID OR UNKNOWN HEALTH CARD NUMBER0.0%0.5%1.0%1.5%2.0%1.161.552023–241.461.522024–251.401.412025–26DADacute and day surgeryNACRSemergency and ambulatoryNational shares; not publishedby province. Quebec is outsidethe DAD’s population. A numbera child shares with its mothercounts as invalid.CIHI, DAD and NACRS data quality documentation, Table 5, current and closed years, read October 2026.
CIHI, DAD and NACRS data quality documentation, Table 5. National shares; CIHI does not publish them by province.

Ontario’s PHIPA s. 34 governs who other than a custodian may collect, use or disclose a health number, and since 2020 it lets a custodian providing care use the number, with consent, to identify the person’s records, verify their identity or link their records. Ontario’s Provincial Client Registry, which its operator says covers 98% of Ontarians, offers a probabilistic match that returns a score and refuses queries below its minimum criteria. Whether a particular use complies is not this article’s to say.

Europe sets its linkage rules around the dataset. GDPR’s research article says safeguards “may include pseudonymisation”, a listed safeguard rather than a requirement. The European Health Data Space regulation, whose secondary-use rules apply from March 2029, releases data anonymized where that serves the purpose and pseudonymized otherwise, keeps the key that reverses it with the health data access body or a trusted third party, and gives people a right to opt out of secondary use. England makes recording the NHS number mandatory, with exceptions, records whether it was traced and verified, and makes secure data environments the default route to NHS data for research.

Identifiers and privacy rules, four jurisdictions

The same five questions asked of the US, Canada, the EU and England: the identifier, the rule for using data without names, who holds the key, where linkage happens, and what the person can refuse. Each answer is the text’s, with who decides; none is advice.

The identifier

No national patient identifier, and federal funds still may not be spent adopting one. Medicare links its own records by the Medicare Beneficiary Identifier. A Social Security number is not a USCDI element.

The rule for using data without names

HIPAA de-identification: remove eighteen kinds of identifier (safe harbor), or have a qualified expert determine the risk is very small and document it.

Who holds the key

Under expert determination, codes derived from PHI, keyed hashes included, may be disclosed if the keys are not, “including to the recipients”. An unkeyed hash counts as an identifier.

Where linkage happens

Wherever the tokens are compared. NIST notes some linkage runs inside a secure enclave; N3C used a linkage honest broker.

What the person can refuse

Not covered by the sources this piece read.

The Further Consolidated Appropriations Act, 2026; 45 CFR 164.514 and HHS’s de-identification guidance; NIST SP 800-188; PHIPA and O. Reg. 329/04 on e-Laws; ICES and Statistics Canada; GDPR and Regulation (EU) 2025/327 on EUR-Lex; the NHS Data Dictionary and DHSC’s secure data environment guidelines. Read in October 2026.

Five questions asked of four jurisdictions, each answer the text’s own. Not legal advice.

Who matching errors fall on

Linkage error does not fall evenly. A 2010 review of 33 studies that compared matched and unmatched records found incomplete linkage associated with age, gender, race, setting, and socioeconomic and health status. The 2018 GUILD guidance on linked data says linkage error “disproportionately affects disadvantaged groups”.

Two studies put numbers on it. At ICES, Ontario’s permanent resident records from 1985 to 2012 linked to the provincial registry at 86.4% overall, 78.0% for people born in Eastern Asia and 61.4% for people aged 85 or over. In Indiana in 2026, a probabilistic matcher’s sensitivity ran from 0.70 to 0.97 across age groups, lowest where fields were missing or disagreed. When linkage misses more people in one group, every rate computed over linked records is biased for that group, and nothing raises an error.

Record linkage succeeds less often for some groups: Ontario and IndianaOntario, ICES, 2016: permanent resident records 1985 to 2012 linked to the provincial registry without a common identifier. 86.4 percent overall; refugees 91.6; economic immigrants 82.5; people born in Eastern Asia 78.0; people landed 1985 to 1989, 75.7; people aged 85 or over, 61.4. Indiana, 2026: a probabilistic matcher’s sensitivity ranged from 0.70 to 0.97 across age groups, 0.76 to 0.97 by sex, 0.85 to 0.99 by race, and 0.85 to 0.989 by ethnicity, lowest where fields were missing or did not agree.ONTARIO · ICES 2016 · PERMANENT RESIDENT RECORDS LINKED TO THE REGISTRYAll permanent residents86.4%Refugees91.6%Economic immigrants82.5%Born in Eastern Asia78.0%Landed 1985–8975.7%Aged 85 or over61.4%0%25%50%75%100%INDIANA · 2026 · A PROBABILISTIC MATCHER’S SENSITIVITY, RANGE ACROSS GROUPSBy age0.700.97By sex0.760.97By race0.850.99By ethnicity0.850.9890.000.250.500.751.00Chiu et al., BMC Med Inform Decis Mak 2016; Barboi et al., JMIR Form Res 2026. Different measures: not on one axis.
Chiu et al. 2016 for Ontario; Barboi et al. 2026 for Indiana. Different measures, drawn apart.

Newborns show the mechanism. The Joint Commission has required distinct newborn identification since 2019, and its safety notice on the subject still describes temporary names such as Babyboy Smith, record numbers assigned in sequence to babies born close together, and names changed before discharge. The remedy is the same as for any linkage error: measure it by group on your own data, and report it.

Questions about something here?

Ask about an article, a white paper or a tool, or tell us what you would like covered next.

Get in touch