Back to search

primary diagnosis

prim_diag_cd
clinical·Updated Jun 23, 2026

Definition

ISO-11179 Definition

The principal ICD-10 diagnosis code identifying the main condition treated or investigated during a healthcare encounter. On inpatient claims the primary diagnosis is the condition established after study to be chiefly responsible for the admission. On outpatient claims it is the condition responsible for the visit.

Healthcare data engineers use the primary diagnosis code as a key dimension in claims analytics, quality measure calculation, and HCC risk adjustment pipelines.

Standard Abbreviation

prim_diag_cd

Category

clinical

Production DDL — FACT_CLINICAL_EVENT

FACT_CLINICAL_EVENT.sql
CREATE OR REPLACE TABLE FACT_CLINICAL_EVENT (
    clin_evt_key  INTEGER        NOT NULL  -- surrogate key,
    mbr_key       INTEGER        NOT NULL  -- FK to DIM_MEMBER,
    prvdr_key     INTEGER        NOT NULL  -- FK to DIM_PROVIDER,
    diag_cd       VARCHAR(10)              -- ICD-10 diagnosis code,
    hcc_cd        VARCHAR(10)              -- HCC category code,
    proc_cd       VARCHAR(10)              -- procedure code,
    svc_dt        DATE                     -- service date,
    pos_cd        VARCHAR(2)               -- place of service,
    raf_scr       DECIMAL(10,3)            -- RAF score,
    admit_dt      DATE                     -- admission date,
    dsch_dt       DATE                     -- discharge date,
    drg_cd        VARCHAR(10)              -- DRG code,
    los_days      SMALLINT                 -- length of stay,
    readmt_ind    CHAR(1)                  -- readmission indicator,
    load_dt       TIMESTAMP_NTZ  NOT NULL  -- load timestamp
);

Standard Snowflake DDL for the canonical clinical table. Convert to BigQuery or Databricks →

Why This Term Matters

Clinical terms are the building blocks of risk adjustment, quality measurement, and value-based care analytics. A data engineer who understands this terminology can design schemas that correctly capture patient conditions, procedures, and encounters — enabling accurate HCC scoring, HEDIS measure attribution, and CMS reporting. Misclassifying clinical fields in a data warehouse cascades into incorrect RAF scores and failed regulatory submissions.

Looking for more healthcare terms?

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

Browse All Terms