Skip to main content

Field Validations

Spotlight DQ evaluates fields across three input-layer tables. Each field is checked for completeness (null vs non-null). Fields in the terminology summary are additionally validated against reference data or business rules.

Eligibility fields

FieldCompletenessTerminology validation
genderYesValid values: male, female, unknown
raceYesMust exist in terminology__race
dual_status_codeYesMust exist in terminology__medicare_dual_eligibility
original_reason_entitlement_codeYesValid values: 0, 1, 2, 3
medicare_status_codeYesValid values: 00, 10, 11, 20, 21, 31, 40
birth_dateYesMust be after 1900-01-01 and before current date
death_dateYesMust be after 1900-01-01 and before current date
social_security_numberYes9 digits or ###-##-#### format
addressYesNon-null, non-blank, not literal "NULL"
cityYesNon-null, non-blank, not literal "NULL"
stateYesMust exist in reference_data__ansi_fips_state (abbreviation, name, or code)
zip_codeYes5-digit or 9-digit (with or without hyphen)
phoneYes10 digits, or 11 digits starting with 1
emailYesNon-null and contains @

Medical claim fields

FieldCompletenessTerminology validationApplicability
claim_typeYesValid values: professional, institutionalAll
claim_start_dateYesAfter 1970-01-01 and before current dateAll
claim_end_dateYesAfter 1970-01-01 and before current dateAll
claim_line_start_dateYesAfter 1970-01-01 and before current dateAll
claim_line_end_dateYesAfter 1970-01-01 and before current dateAll
admission_dateYesAfter 1970-01-01 and before current dateAll
discharge_dateYesAfter 1970-01-01 and before current dateAll
paid_dateYesAfter 1970-01-01 and before current dateAll
service_unit_quantityYesMust be greater than 0All
hcpcs_modifier_1YesNon-null (presence only)All
drg_codeYesMust exist in terminology__ms_drg or terminology__apr_drg (based on drg_code_type)Institutional
revenue_center_codeYesMust exist in terminology__revenue_centerInstitutional
hcpcs_codeYesMust exist in terminology__hcpcs_level_2All
diagnosis_code_1YesMust exist in terminology__icd_10_cmAll
diagnosis_code_2YesMust exist in terminology__icd_10_cmAll
diagnosis_code_3YesMust exist in terminology__icd_10_cmAll
procedure_code_1YesMust exist in terminology__icd_10_pcsInstitutional
procedure_code_2YesMust exist in terminology__icd_10_pcsInstitutional
procedure_code_3YesMust exist in terminology__icd_10_pcsInstitutional
discharge_disposition_codeYesMust exist in terminology__discharge_dispositionInstitutional
admit_source_codeYesMust exist in terminology__admit_sourceInstitutional
admit_type_codeYesMust exist in terminology__admit_typeInstitutional
bill_type_codeYesMust exist in terminology__bill_typeInstitutional
place_of_service_codeYesMust exist in terminology__place_of_serviceProfessional
rendering_npiYesMust exist in terminology__providerAll
billing_npiYesMust exist in terminology__providerAll
facility_npiYesMust exist in terminology__providerAll

Pharmacy claim fields

FieldCompletenessTerminology validation
prescribing_provider_npiYesMust exist in terminology__provider
dispensing_provider_npiYesMust exist in terminology__provider
dispensing_dateYesAfter 1970-01-01 and before current date
ndc_codeYesMust exist in terminology__ndc
quantityYesMust be greater than 0
days_supplyYesMust be greater than 0
refillsYesMust be greater than 0
paid_dateYesAfter 1970-01-01 and before current date

How validation works

For each field in the terminology summary:

  1. Total rows: all rows in the source table for the data_source / payer / plan combination.
  2. Applicable rows: rows where the field is expected to have a value (respects claim-type applicability rules).
  3. Null rows: applicable rows where the value is null or blank.
  4. Non-null rows: applicable rows with a value present.
  5. Valid rows: non-null rows where the value passes the terminology check (reference table join or rule).
  6. Invalid rows: non-null rows where the value fails the terminology check.

The key metric for most monitoring is valid_rows_applicable_pct, the percentage of applicable, non-null values that are valid. A drop in this metric across runs signals terminology drift or data quality degradation.

Spotlight DQ Results Viewer — terminology validation detail

The DQ Results Viewer shows pass/fail status against configurable thresholds, with per-metric validity distributions for quick triage.