A problem that hides in plain sight
Ask a hospital's EHR system, its lab system, and its billing system "who is patient P002," and all three will answer confidently. Ask them to agree on his exact date of birth, and two of the three will disagree with each other, silently, with no error anywhere in any of the systems involved.
This isn't a hypothetical edge case. It's the ordinary, predictable outcome of three different systems, entered by three different people, at three different points in a patient's visit, none of them automatically checking their answer against the other two.
Where the three versions actually come from
graph LR
A[Registration Desk<br/>enters patient into EHR] --> D[Patient Record]
B[Lab Tech<br/>enters patient into Lab System] --> D
C[Billing Staff<br/>enters patient into Billing System] --> D
D --> E{Do all three<br/>actually agree?}
E -->|Usually assumed yes| F[Nobody checks]
E -->|Sometimes, quietly, no| G[Inconsistent record,<br/>discovered later or never]
Three separate humans, three separate keyboards, three separate moments, entering what should be the same facts about the same person. Nothing in this picture forces agreement. It only happens to align when everyone happens to type the same thing the same way, which is common, but not guaranteed, and there's usually no automated check confirming it actually did.
Making it concrete: three small, real systems
A tiny example: three patients, entered independently into an EHR, a lab system, and a billing system.
ehr = pd.DataFrame([
{"patient_id": "P001", "name": "Maria Gonzalez", "dob": "1985-03-14"},
{"patient_id": "P002", "name": "James O'Brien", "dob": "1972-11-02"},
{"patient_id": "P003", "name": "Wei Zhang", "dob": "1990-07-22"},
])
lab = pd.DataFrame([
{"patient_id": "P001", "name": "Maria Gonzales", "dob": "1985-03-14"}, # misspelled
{"patient_id": "P002", "name": "James OBrien", "dob": "1972-11-20"}, # DOB day/year swapped
{"patient_id": "P003", "name": "Wei Zhang", "dob": "1990-07-22"},
])
billing = pd.DataFrame([
{"patient_id": "P001", "name": "Maria Gonzalez", "dob": "1985-03-14"},
{"patient_id": "P002", "name": "James O'Brien", "dob": "1972-11-02"},
{"patient_id": "P003", "name": "W. Zhang", "dob": "1990-07-22"}, # abbreviated
])
Every one of these entries is exactly the kind of small, human, entirely explainable difference that happens constantly: a name spelled slightly differently, two digits transposed in a date, a name abbreviated for speed. None of it looks malicious or even careless in isolation.
Running a real check across all three
def reconcile(ehr, lab, billing):
merged = ehr.merge(lab, on="patient_id", suffixes=("_ehr", "_lab"))
merged = merged.merge(billing, on="patient_id")
mismatches = []
for _, row in merged.iterrows():
issues = []
if row["name_ehr"] != row["name_lab"]:
issues.append(f"name differs: EHR={row['name_ehr']!r} vs Lab={row['name_lab']!r}")
if row["dob_ehr"] != row["dob_lab"]:
issues.append(f"DOB differs: EHR={row['dob_ehr']} vs Lab={row['dob_lab']}")
# ...same checks against billing...
if issues:
mismatches.append({"patient_id": row["patient_id"], "issues": issues})
return mismatches
P001:
- name differs: EHR='Maria Gonzalez' vs Lab='Maria Gonzales'
P002:
- name differs: EHR="James O'Brien" vs Lab='James OBrien'
- DOB differs: EHR=1972-11-02 vs Lab=1972-11-20
P003:
- name differs: EHR='Wei Zhang' vs Billing='W. Zhang'
3 of 3 patients have at least one cross-system inconsistency
Every single patient in this small, real example has at least one real disagreement between systems. That's not a claim about hospitals generally, it's what this specific, deliberately small demonstration shows directly, and it's exactly the kind of thing that happens at real scale, quietly, across thousands of records, with nobody's job being to check for it continuously.
Why "the systems all have the patient" isn't the same as "the systems agree on the patient"
Every one of these three systems would, if asked separately, confirm patient P002 exists and looks correct. None of them, on their own, has any way to notice that the date of birth recorded in the lab system doesn't match the one in the EHR. Each system is internally consistent and individually correct by its own standards; the inconsistency only exists in the gap between them, and nothing about normal, day-to-day operation of any single system surfaces that gap. It takes an active, deliberate reconciliation check, run regularly, to catch it, exactly the kind of small script demonstrated above, scaled to the real size of the actual patient population.
This matters beyond tidiness. A date-of-birth mismatch between systems is a real identity-matching risk, the kind of ambiguity that complicates matching a lab result to the correct patient record with full confidence, and healthcare data quality research consistently names exactly this kind of cross-system inconsistency as a leading, real contributor to bad outcomes, not a theoretical concern (Acceldata, NCBI).
What actually closes the gap
Not a single master database, replacing three systems with one is rarely realistic in healthcare, where different systems exist for real regulatory and operational reasons. What closes the gap is a real, running reconciliation process: a scheduled job that checks records against each other the way the small script above does, flags real discrepancies before they cause a downstream problem, and gives someone a concrete, specific list to act on, "these three patients have a DOB mismatch," rather than a vague sense that data quality is probably fine because nothing's obviously on fire.
The takeaway
Three systems each being individually correct says nothing about whether they agree with each other, and the gap between "each system looks fine" and "the systems agree" is exactly where real patient-matching risk lives. A small, direct reconciliation check, the kind shown here, run regularly rather than once, is what turns an invisible gap into a specific, fixable list.
Comments
Loading comments...