Hospital Revenue Cycle Management Path · Mission 9 of 25Medium

Denial rate per CPT — high-volume CPTs only

Conditional aggregation + HAVING + multi-table chain. Denial rate per CPT is the canonical RCM diagnostic for finding the codes that drive denials operations work; the volume floor (HAVING claim_count >= N) is essential to filter out small-N noise where a single denial creates a misleadingly high rate.

The Brief

James OrtizDenials Specialistslack-dm

Wednesday denials prevention review — Sarah wants the denial rate by CPT, but only for high-volume CPTs (200+ claims). Without the volume floor, a niche CPT with 5 claims and 1 denial would show a 20% denial rate — meaningless noise. From fact_claims joined back through fact_charges to dim_cpt, give me four columns: cpt_code, description, claim_count, denial_pct (rounded to 1 decimal). Sort by denial_pct descending so the worst offenders lead. HAVING claim_count >= 200 to keep the noise out.

You'll practice

Conditional aggregationINNER JOINHAVING threshold

Tables & columns available

fact_claimsfact6 columns
ColumnTypeKey
claim_idINTPK
charge_idINTFK → fact_charges
payer_idINTFK → dim_payer
submission_dateTEXT
claim_statusTEXT
submitted_amountREAL
fact_chargesfact7 columns
ColumnTypeKey
charge_idINTPK
patient_idINTFK → dim_patient
provider_idINTFK → dim_provider
cpt_codeTEXTFK → dim_cpt
service_dateTEXT
billed_amountREAL
posted_amountREAL
dim_cptdim5 columns
ColumnTypeKey
cpt_codeTEXTPK
descriptionTEXT
service_lineTEXT
charge_amountREAL
rvuREAL

Hints (3)

Each hint you reveal reduces the XP you can earn. Try the query first.

Hint 1

Three-table chain: fact_claims joins to fact_charges (via charge_id) which joins to dim_cpt (via cpt_code). Aggregate at the cpt_code grain.

Hint 2

Two aggregates per group — COUNT(*) for the volume + SUM(CASE WHEN claim_status='denied' THEN 1 ELSE 0 END) for the denials. Float-promote the ratio with 100.0 BEFORE dividing.

Hint 3

HAVING filters AFTER the GROUP BY — that's where the volume floor goes (the COUNT can't be referenced in WHERE because it doesn't exist yet at row-scan time). Sort denial_pct DESC so the highest offenders lead the meeting.