Back to search

National Drug Code

ndc
pharmacy
Updated 5/29/2026

Definition

The National Drug Code (NDC) is the FDA's universal product identifier for human drugs, including prescription drugs, over-the-counter products, and insulin. Every drug product marketed in the United States is assigned a unique NDC that identifies the labeler (manufacturer or distributor), the specific drug product formulation, and the specific package size and type. The NDC is an 11-digit number structured as three segments: a 5-digit labeler code, a 4-digit product code, and a 2-digit package code. The same active ingredient at the same strength available from different manufacturers will have different labeler codes, making NDC the finest-grained drug product identifier in the US healthcare system. NDC codes are the primary drug identifier in pharmacy claims transactions (NCPDP D.0 standard), PBM adjudication systems, formulary management, medication adherence analytics, and drug safety surveillance. HEDIS pharmacy-based quality measures such as Medication Adherence for Diabetes, Cholesterol, and Hypertension medications rely on NDC codes to identify qualifying drug dispensing events. Drug Enforcement Administration (DEA) controlled substance schedules are mapped to NDC codes for pharmacovigilance and formulary tier management. The FDA updates the NDC directory weekly as new drug products are approved and existing products are discontinued. Healthcare data engineers face a pervasive normalization challenge with NDC codes because the same drug product arrives from different source systems in incompatible formats: 5-4-2 dash-segmented (12345-6789-01), 11-digit flat with leading zeros (12345678901), 10-digit without leading zeros (1234567890), and various hybrid formats. All must be normalized to 11-digit no-dash format by stripping dashes and left-padding with zeros before joining to the FDA NDC directory or CMS drug reference files. NDC columns should be stored as VARCHAR(11) — never as integers, which drop leading zeros. Common data model components include a drug reference dimension table populated from the FDA NDC directory containing proprietary name, nonproprietary name, dosage form, route, strength, DEA schedule, and therapeutic class, joined to pharmacy claims fact tables via the normalized 11-digit NDC. Related identifiers include the Generic Product Identifier (GPI), RxNorm for normalized drug concepts, and HCPCS J-codes for injectable drugs billed on medical claims.

Standard Abbreviation

ndc

Category

pharmacy

Database Usage

-- Example column naming
CREATE TABLE claims (
  clm_id VARCHAR(50),
  ndc VARCHAR(11),  -- National Drug Code (max 11 chars)
  ...
);

-- Example in SELECT
SELECT
  clm_id,
  ndc as national_drug_code
FROM claims;

Why This Term Matters

Pharmacy data is among the most regulated and codified data in healthcare, governing controlled substances, PBM adjudication, and Medicare Part D reporting. A data engineer fluent in pharmacy terminology builds pipelines that correctly parse NDC codes, validate DEA numbers, and detect drug utilization anomalies before they reach compliance teams. Errors in pharmacy field definitions frequently trigger PBM contract disputes and CMS audit findings.

Common uses in healthcare data

  • PBM claims adjudication and drug utilization review
  • Controlled substance monitoring and DEA compliance
  • Pharmacy data warehouse and ETL pipeline design
  • Prior authorization and step therapy workflows
  • Medicare Part D reporting and CMS submissions
  • PBM feed normalization in Snowflake pharmacy claims fact tables
  • Epic Willow and Cerner Pharmacy integration data mapping and reconciliation
  • Databricks streaming pipeline for real-time drug utilization monitoring and alerting

Related Healthcare Standards

NCPDP SCRIPT

The ANSI-accredited standard for electronic prescribing and pharmacy transactions, defining data fields and message formats used by PBMs and pharmacies.

NDC (FDA)

The National Drug Code — the FDA's universal product identifier for drugs, used in all pharmacy claims, dispensing records, and formulary data.

DEA Controlled Substance Regulations (21 CFR)

Governs controlled substance prescribing, dispensing, and reporting requirements, including DEA number format and Schedule classification.

Data Quality Considerations

  • NDC codes arrive in multiple formats (5-4-2 segmented, 11-digit flat, with or without dashes) — normalize to 11-digit no-dash format at ingestion to prevent duplicate drug records in Snowflake or Databricks.
  • DEA number check-digit validation (using the standard DEA checksum algorithm) catches a significant share of data entry errors before they reach claim submission — implement this as a mandatory ETL quality gate.
  • Days supply values from PBM feeds frequently contain outliers (e.g., 999 for unlimited supply) — cap at clinically valid maximums per drug class and flag for pharmacy analytics review downstream.

Looking for more healthcare terms?

Browse our complete library of 100,000+ standardized healthcare data terms

Browse All Terms