Back to packs

FHIR Clinical Data Quality

HL7_FHIRfree

12 data-quality rules for HL7 FHIR R4 clinical data (US Core), covering the core clinical resources exchanged across EHRs and APIs — Patient, Encounter, Condition, Observation, MedicationRequest, Procedure, AllergyIntolerance, and DiagnosticReport. Checks resource conformance, required US Core elements, subject-reference resolution, terminology bindings (LOINC, SNOMED CT, RxNorm, ICD-10-CM), status vocabularies, date plausibility, and duplicate suppression.

26 rules 0 downloadsNo ratings yet
fhirus-coreclinical-datainteroperabilityloincsnomedhealthcare
0.0(0 ratings)

Sign in to rate this pack

Test this pack with your data

Download the template, fill in your data, and see quality results instantly.

Test This Pack

Download & Install

Choose your tool — get a ready-to-run file

Run this on your data? Upload your CSV — we'll auto-map the columns, validate, and report the bad rows.Test my dataWant this certified on your data? Book a 30-min demo.Book a demo
Or use the CLI
$ npx dqhub install fhir-clinical-data-quality --format soda --table YOUR_TABLE

Reference data required

This contract's checks join against 5 reference tables. Load them into your warehouse — DQHub ships the public ones, the rest link to their source. All reference data →

Customer-loaded — source

About this pack

12 data-quality rules for HL7 FHIR R4 clinical data (US Core), covering the core clinical resources exchanged across EHRs and APIs — Patient, Encounter, Condition, Observation, MedicationRequest, Procedure, AllergyIntolerance, and DiagnosticReport. Checks resource conformance, required US Core elements, subject-reference resolution, terminology bindings (LOINC, SNOMED CT, RxNorm, ICD-10-CM), status vocabularies, date plausibility, and duplicate suppression.

What's included

9referential integrity rules
9format rules
4completeness rules
3consistency rules
1uniqueness rules

Checks included (26)

Subject Resolves to a Patient

The subject reference on every clinical resource must resolve to an existing Patient resource.

Observation Code Is Valid LOINC

US Core laboratory and vital-signs Observations must be coded with a valid LOINC code.

Condition Coded in SNOMED / ICD-10

Condition.code must use a valid SNOMED CT or ICD-10-CM code per US Core.

MedicationRequest Coded in RxNorm

MedicationRequest medication must be coded with a valid RxNorm code.

Observation Quantity Unit Is UCUM

An Observation.valueQuantity must use a valid UCUM unit code (US Core Vital Signs and lab results require UCUM).

Procedure Code Is Valid (CPT/HCPCS/SNOMED)

Procedure.code must be a valid CPT/HCPCS or SNOMED CT procedure code.

DiagnosticReport Results Resolve to Observations

Each DiagnosticReport.result reference must resolve to an existing Observation.

Immunization Vaccine Is Valid CVX

Immunization.vaccineCode must be a valid CVX code.

Encounter References Resolve

Where a clinical resource cites an Encounter, that Encounter must exist.

Observation Status Is Valid(status)

Observation.status must be a value from the FHIR observation-status value set (registered, preliminary, final, amended, corrected, cancelled, entered-in-error, unknown).

Condition Clinical Status Is Valid(clinical_status)

Condition.clinicalStatus must be a value from the condition-clinical value set (active, recurrence, relapse, inactive, remission, resolved).

Patient Gender Is Valid(gender)

Patient.gender must be from the administrative-gender value set (male, female, other, unknown).

Encounter Status Is Valid(status)

Encounter.status must be from the encounter-status value set (planned, arrived, triaged, in-progress, onleave, finished, cancelled, entered-in-error, unknown).

Procedure Status Is Valid(status)

Procedure.status must be from the event-status value set (preparation, in-progress, not-done, on-hold, stopped, completed, entered-in-error, unknown).

AllergyIntolerance Clinical Status Is Valid(clinical_status)

AllergyIntolerance.clinicalStatus must be active, inactive, or resolved.

AllergyIntolerance Verification Status Is Valid(verification_status)

AllergyIntolerance.verificationStatus must be unconfirmed, presumed, confirmed, refuted, or entered-in-error.

DiagnosticReport Status Is Valid(status)

DiagnosticReport.status must be from the diagnostic-report-status value set (registered, partial, preliminary, final, amended, corrected, appended, cancelled, entered-in-error, unknown).

MedicationRequest Status & Intent Are Valid(status)

MedicationRequest.status must be from the medicationrequest-status value set (active, on-hold, cancelled, completed, entered-in-error, stopped, draft, unknown).

Resource ID Present(resource_id)

Every clinical resource must carry a logical id.

Clinical Resource Has a Subject(subject_id)

Clinical resources (Observation, Condition, MedicationRequest, etc.) must reference the patient they describe via subject/patient.

US Core Must-Support Elements Present

US Core "must support" elements for each resource type must be populated (e.g. Patient.identifier/name/gender/birthDate, Observation.code/status).

Patient Birth Date Present(birth_date)

US Core requires Patient.birthDate as a must-support element.

Final Observation Has a Value

An Observation with status "final" must carry a value or a dataAbsentReason — a final result with neither is incomplete.

Effective Date Not in the Future

An Observation's effectiveDateTime (or a resource's clinical date) cannot be in the future relative to when it was recorded.

Encounter Period Start Before End

An Encounter.period.start must not be after its period.end.

No Duplicate Resources(resource_key)

Each resource (resourceType + id) must appear once.