Research
Linking patients without merging them by mistake
A score rather than a single rule, three confidence thresholds, a placebo test to measure chance and a monthly human check: linking sources without creating chimeric patients.
The problem
The same patient appears in several cohorts, exam exports and registries, with a typo, a married name, or the day and month swapped. Merging too quickly creates chimeric patients; not merging leaves duplicates that distort the counts. A single rule (“same name and same date of birth”) fails in both directions.
Step-by-step method
- A score, not a single rule: identity is compared with tolerance for errors (accents, married name, first name and surname swapped), the date of birth with a tolerance (day and month swapped, one digit off), then a body of evidence (sex, compatible exam dates, site of origin) adds or removes points.
- Three thresholds: certain (merged), probable (merged and flagged as such), doubtful (not merged). Never a merge on a single item, even an identical one.
- The “unique date of birth” rule: a date of birth shared by several people, counted over the whole scope and not just in the current file, no longer counts as strong evidence. A record can be linked to only a small number of others at most; beyond that, it signals an error, not a patient with a lot of follow-up.
- Doubtful links stay in the database with their score and reason. They are neither deleted nor merged: at query time, an “include doubtful links” box shows whether the result depends on them.
- A placebo test: shift every date of birth artificially by a few days and run the linkage again. Links still found are due to chance: this is the criterion’s “chance rate”, which must stay very low.
- A monthly human check: a random sample of “certain” links is reviewed by an authorised person on the workstation; the false-positive rate is recorded and tracked from month to month.
- Every merge is traced (index version, score, evidence, date) and can be undone without loss; a correction produces a new version of the index.
- Incidents become tests: a mistaken merge between two people who shared the same date of birth and a similar name gave rise to the rule in step 3; phantom patients born of a transposed sheet (headers read as identities) gave rise to a check at every import.
Deliverable
A linkage index with three confidence levels, a measured chance rate, a false-positive rate tracked every month, and counts that no longer shift from one version to the next without a reason.
Safeguards
Linkage is done on the authorised workstation, from the vault: Claude writes the script and tests it on a synthetic dataset, and the authorised person runs it. No identity ever enters the conversation; only counts per level come out. No link is deleted; a merge is undone, never erased.
Starter prompt
Here is the structure (column names only) of two sources to link. Write a score-based linkage script with three thresholds (certain, probable, doubtful), the “unique date of birth” rule counted over the whole scope, a placebo test by shifting dates and a report with counts only. Test it on a synthetic dataset that you generate. Do not open any patient data.