Nikhila Veeramalla EMR Data Quality Profiler
Lab / 01  —  Data readiness

Is this data
fit to train on?

Profiles an EHR-style extract against the Kahn harmonised data-quality framework — completeness, conformance, plausibility — and returns a per-field and dataset verdict. The check most healthcare AI programmes skip, then die on.

01  How it works

Six passes over the extract.

Every number on this page is computed in your browser from the synthetic extract below. Nothing is hard-coded.

  1. Generate a reproducible extract. 3,000 synthetic encounters, 26 fields, from a seeded mulberry32 PRNG. Known defects are planted at known row counts so the profiler's output can be scored against ground truth at the bottom of the page.
  2. Completeness. Per-field missing rate; a Pearson chi-square test of independence between missingness and payerType with Cramér's V as effect size; record-level completeness against a defined core field set. Disguised missingness — codes such as Unknown that are conformant but carry no signal — is counted separately.
  3. Conformance, in Kahn's three subcategories. Value: regex and value-set checks, including ICD-10-CM syntax ^[A-Z][0-9][0-9A-Z](\.[0-9A-Z]{1,4})?$ — the third character is alphanumeric, so real roots such as Z3A and C4A pass rather than being reported as defects — CPT syntax ^[0-9]{4}[0-9FTMU]$, which admits the F, T, M and U suffixes of Category II, Category III, MAAA and PLA codes alongside five-digit Category I, and a documented subset of the NUBC UB-04 patient discharge status set. Relational: every encounter's patientId must resolve to the patient dimension. Computational: bmi recomputed from weightKg / (heightCm/100)² and compared at a 1.0 kg/m² tolerance.
  4. Plausibility. Uniqueness: duplicate encounterId keys, plus blocked pairwise comparison for near-duplicate patients. Atemporal: physiologic bounds per field, from the range table shown in the tool, plus the cross-field rule that systolic must exceed diastolic. Temporal: discharge before admit, birth after admit, negative stays, and stated length of stay against the date arithmetic.
  5. Distributional checks — an extension beyond Kahn's three named plausibility subcategories, and labelled as such. One-dimensional Lloyd k-means (k=2) in log space with Ashman's D for bimodality, median-ratio matching against known unit-conversion factors, day-of-month chi-square for date heaping, and Tukey 1.5×IQR outlier fences.
  6. Score and rule. Each firing check emits a finding with a severity derived from its own measured rate — the arithmetic is printed on every finding. Field verdict is the highest severity attributed to it: 70+ is UNFIT, 40+ is CAUTION. The dataset verdict aggregates, and separates fields that must be excluded from fields that can be repaired.
02  The profiler

Live profile.

Loaded and scored on page load. Move the severity threshold to see which findings survive a stricter or looser bar.

Synthetic data
Synthetic records. No real patient data is used anywhere in this tool. The extract is generated in your browser from a fixed seed and never leaves it.
Scope
Demonstration only. Not validated for clinical or compliance use. This is not a certified compliance control, not a quality-management system record, and not a medical device.
Extractseed —
Controls
0 — show everything100 — only maximal
Table

Only findings at or above the threshold count toward field and dataset verdicts. Severity is computed per check from the measured defect rate; the arithmetic is printed on each finding.

Dataset verdict
Per-field data quality
FieldKind MissingConformance failPlausibility fail VerdictDriving reason

Conformance and plausibility rates are over present values, not all rows — a field that is 90% missing can still be 100% conformant on what is there, and reading those two columns together is the point. A dash means the denominator was zero.

Missingness by payerField × payerType

Numeric distributionsTukey 1.5 × IQR fence
FieldDistributionn Median (IQR)Plausible range Tukey fenceOut of rangeBeyond fence

Sparklines are 22-bin histograms clipped at the 1st and 99th percentile so a single impossible value cannot flatten the axis. Vertical accent rules mark the lower and upper Tukey fences; the dark rule is the median. Plausible ranges are survivable-extreme bounds for a recorded human observation, not clinical reference ranges — a value inside the range can still be clinically abnormal, and a value outside it is not "abnormal", it is impossible. The Tukey fence is arithmetic on the quartiles and nothing else, so on a skewed or bounded column it lands outside the plausible range (a negative creatinine fence, an SpO₂ fence above 100%). That is the rule behaving correctly, and it is why the fence screens for attention rather than deciding anything. los is the one exception in the table: its out-of-range count is shown for reference but reported as a finding under temporal plausibility, so a negative stay is not counted twice.

Findings
Planted vs flaggedDetector scoring

Because the extract is synthetic, ground truth is known. This is how a profiler should be validated before anyone trusts its verdicts — and where flagged exceeds planted, the reason is stated rather than hidden.

Planted defectCheck PlantedFlaggedDifference explained
03  Method & limitations

What this catches, and what it cannot.

The framework is Kahn et al., A Harmonized Data Quality Assessment Terminology and Framework for the Secondary Use of Electronic Health Record Data (EGEMS, 2016). Its dimensions and subcategories are used as published; the distributional checks are an addition, labelled as such, because Kahn names only uniqueness, atemporal and temporal under plausibility.

It catches what is visible inside the extract — absent values, broken formats, rows that contradict themselves, two populations in one column. That is verification, not validation. It cannot tell you whether the extract represents the patients you think it does, whether a code was clinically right, or whether a cohort is silently absent.

Known limits: value sets are pinned to a documented subset, where production would bind to current NUBC, ICD-10-CM and CPT releases; the chi-square is suppressed below an expected cell of five and carries no multiple-comparison correction; near-duplicate matching produces chance pairs by construction; the temperature ratio holds only near body temperature; and every threshold is a defensible default, not a standard.

A human stays in the loop at three points — agreeing ranges and value sets, adjudicating duplicate and rare-cell findings, and signing the exclude-or-repair decision. The profiler ranks and evidences. It does not decide.