CMS Chronic Conditions
Overview
The CMS Chronic Conditions data mart identifies patients with chronic conditions using the Centers for Medicare & Medicaid Services Chronic Conditions Data Warehouse (CCW) condition definitions. CMS publishes CCW condition algorithms for Medicare and Medicaid research and policy analysis, including chronic conditions and other chronic health, mental health, substance use, and potentially disabling conditions.
This Tuva data mart applies the CMS chronic condition hierarchy to the Core Data Model and produces both long-format and wide-format condition outputs. Use the long table when you want the qualifying encounter-level evidence for each person's conditions. Use the wide table when you want one row per person and data source with condition flags as columns.
Install this standalone package alongside Core using the data mart installation guide.
Methodology
The data mart starts from core.condition, core.encounter, core.pharmacy_claim, core.procedure, and core.patient. It maps diagnosis and related claim context to CMS chronic condition definitions using Tuva's CMS chronic condition value sets.
The package maps the available diagnosis, procedure, and selected pharmacy evidence to the condition hierarchy. Tuva 1.0 does not implement the full CMS claims-qualification algorithm, including all claim-count, claim-type, and look-back requirements. That work is deferred in issue #48. Use these outputs as Tuva condition evidence and cohort indicators; do not present them as fully qualified CMS CCW flags.
The CMS source material is available from the Chronic Conditions Data Warehouse pages for Chronic Conditions and Other Chronic Health, Mental Health, and Potentially Disabling Conditions. Tuva stores the package-ready hierarchy as a versioned value-set asset in public object storage.
Outputs
| Model | Description |
|---|---|
chronic_conditions.cms_chronic_conditions_long | One row per person, evidence event, condition, and data source; medication evidence can have a null encounter identifier. |
chronic_conditions.cms_chronic_conditions_wide | One row per person and data source with integer condition indicators pivoted into separate columns. |
Available CMS Chronic Conditions
Source table: chronic_conditions__cms_chronic_conditions_hierarchy
| Condition |
|---|
| ADHD, Conduct Disorders, and Hyperkinetic Syndrome |
| Acute Myocardial Infarction |
| Alcohol Use Disorders |
| Alzheimer's Disease |
| Anemia |
| Anxiety Disorders |
| Asthma |
| Atrial Fibrillation and Flutter |
| Autism Spectrum Disorders |
| Benign Prostatic Hyperplasia |
| Bipolar Disorder |
| Cancer, Breast |
| Cancer, Colorectal |
| Cancer, Endometrial |
| Cancer, Lung |
| Cancer, Prostate |
| Cancer, Urologic (Kidney, Renal Pelvis, and Ureter) |
| Cataract |
| Cerebral Palsy |
| Chronic Kidney Disease |
| Chronic Obstructive Pulmonary Disease |
| Cystic Fibrosis and Other Metabolic Developmental Disorders |
| Depression, Bipolar, or Other Depressive Mood Disorders |
| Depressive Disorders |
| Diabetes |
| Drug Use Disorders |
| Epilepsy |
| Fibromyalgia and Chronic Pain and Fatigue |
| Glaucoma |
| Heart Failure and Non-Ischemic Heart Disease |
| Hepatitis A |
| Hepatitis B (acute or unspecified) |
| Hepatitis B (chronic) |
| Hepatitis C (acute) |
| Hepatitis C (chronic) |
| Hepatitis C (unspecified) |
| Hepatitis D |
| Hepatitis E |
| Hip/Pelvic Fracture |
| Human Immunodeficiency Virus and/or Acquired Immunodeficiency Syndrome (HIV/AIDS) |
| Hyperlipidemia |
| Hypertension |
| Hypothyroidism |
| Intellectual Disabilities and Related Conditions |
| Ischemic Heart Disease |
| Learning Disabilities |
| Leukemias and Lymphomas |
| Liver Disease, Cirrhosis, and Other Liver Conditions (except Viral Hepatitis) |
| Migraine and Chronic Headache |
| Mobility Impairments |
| Multiple Sclerosis and Transverse Myelitis |
| Muscular Dystrophy |
| Non-Alzheimer's Dementia |
| Obesity |
| Opioid Use Disorder (OUD) |
| Osteoporosis With or Without Pathological Fracture |
| Other Developmental Delays |
| Parkinson's Disease and Secondary Parkinsonism |
| Peripheral Vascular Disease (PVD) |
| Personality Disorders |
| Pneumonia, All-cause |
| Post-Traumatic Stress Disorder (PTSD) |
| Pressure and Chronic Ulcers |
| Rheumatoid Arthritis/Osteoarthritis |
| Schizophrenia |
| Schizophrenia and Other Psychotic Disorders |
| Sensory - Blindness and Visual Impairment |
| Sensory - Deafness and Hearing Impairment |
| Sickle Cell Disease |
| Spina Bifida and Other Congenital Anomalies of the Nervous System |
| Spinal Cord Injury |
| Stroke/Transient Ischemic Attack |
| Tobacco Use |
| Traumatic Brain Injury and Nonpsychotic Mental Disorders due to Brain Damage |
| Viral Hepatitis (general) |
Example SQL
CMS Chronic Condition Prevalence
This query calculates patient counts and prevalence percentages for each CMS chronic condition.
with population as (
select data_source, count(distinct person_id) as patient_count
from core.patient
group by data_source
)
select
conditions.data_source
, conditions.condition_category
, conditions.condition
, count(distinct conditions.person_id) as patient_count
, cast(
count(distinct conditions.person_id) * 100.0
/ nullif(population.patient_count, 0)
as numeric(38, 2)
) as percent_of_patients
from chronic_conditions.cms_chronic_conditions_long as conditions
inner join population on conditions.data_source = population.data_source
group by
conditions.data_source
, conditions.condition_category
, conditions.condition
, population.patient_count
order by conditions.data_source, percent_of_patients desc;
CMS Chronic Condition Count Distribution
This query counts how many CMS chronic conditions are present for each patient, including patients with zero CMS chronic conditions.
with patients as (
select distinct person_id, data_source
from core.patient
)
, condition_count as (
select
patients.person_id
, patients.data_source
, count(distinct conditions.condition) as condition_count
from patients
left join chronic_conditions.cms_chronic_conditions_long as conditions
on patients.person_id = conditions.person_id
and patients.data_source = conditions.data_source
group by patients.person_id, patients.data_source
)
select
data_source
, condition_count
, count(*) as patient_count
, cast(
100.0 * count(*) / nullif(sum(count(*)) over (partition by data_source), 0)
as numeric(38, 1)
) as percent_of_patients
from condition_count
group by data_source, condition_count
order by data_source, condition_count;
Patients with a Specific CMS Chronic Condition
This query returns patients with diabetes evidence using the CMS chronic condition output.
select distinct
person_id
, data_source
, condition_category
, condition
from chronic_conditions.cms_chronic_conditions_long
where condition = 'Diabetes'
order by
data_source
, person_id;