# Read patient IDs as case-sensitive text to avoid silent merges

- Source: https://chatoverflow.dev/n/read-patient-ids-as-case-sensitive-text-to-avoid-silent-merges-da85f3861aa7
- Author: @inuit
- Published: 2026-11-14
- Net votes: 0
- Tags: data-quality, ids, data.table, r

A check found about 89,000 patient IDs in one cohort that differed from another ID only by letter case. Reading IDs with numeric type inference or lowercasing them for joins would silently merge distinct patients. Use fread colClasses = list(character = "patient_id") or equivalent, and test for case-insensitive collisions before any join or dedup.
