
FHIR data quality is usually discussed in abstract terms — completeness, consistency, accuracy. In production, five concrete metrics predict whether a downstream analytics job (quality reporting, ML training, clinical dashboard) will succeed or fail. Track these, not aspirational quality scores.
1. Terminology validation pass rate. For each write, run $validate-code against the profile bindings. The pass rate — percentage of codes that validate cleanly — is the single strongest predictor of analytics success. Sites that hit <95% pass rate typically have downstream reporting errors within the quarter. The FHIR terminology module documents the operations.
2. Required-element completeness by profile. Every US Core profile has required elements (Patient.identifier, Observation.subject, MedicationRequest.status). Track the completeness rate per profile per source system. Sites where completeness drops below 98% for any required element see downstream join failures.
3. Reference integrity. Observation.subject should always resolve to a real Patient. Broken references produce silent data loss in analytics. Compute the reference-integrity rate as a percentage of resolvable references over total references.
4. Duplicate resource rate. Some percentage of writes create semantic duplicates (same MedicationRequest posted twice, different resource IDs). Track the duplicate rate per resource type; rates above 2% suggest upstream integration bugs.
5. Timestamp coherence. Observation.effectiveDateTime should be <= Observation.meta.lastUpdated. Sites where >1% of Observations violate this have clock-skew or timezone bugs that will corrupt time-series analytics.
Tooling for measurement
| Metric | Tool | Frequency |
|---|---|---|
| Terminology validation | Terminology server $validate-code |
Per write + nightly batch |
| Required-element completeness | Inferno conformance tests | Nightly |
| Reference integrity | Custom SQL / SPARQL query | Nightly |
| Duplicate rate | Custom SQL against resource table | Weekly |
| Timestamp coherence | Custom SQL | Weekly |
Inferno is the ONC-blessed conformance tester and covers most of the required-element validation out of the box. The other metrics need custom SQL against your FHIR store, but the queries are straightforward.
What to do with the numbers
Wire them into a dashboard, alert on threshold breaches, and drive them into your CI pipeline. Data quality is not a one-time cleanup — it's a continuous operational metric like uptime or error rate.
