A high score is a lead for review, not a finding of wrongdoing. On this public page, prescriber names, NPIs and cities are withheld; inside the lakehouse they are protected by a Unity Catalog column mask. Figures come from the real pipeline run on CMS data year 2024.

Part D prescribing integrity overview

Each prescriber is compared with peers of the same specialty, in the same state where the group is large enough, using robust (median/MAD) z-scores on five prescribing metrics.

Share of scored prescribers flagged for review

By state · hover for counts

Specialties with the highest flag rate

Specialties with at least 30 scored prescribers

Composite score distribution

Log scale. The dotted line is the review threshold (3.5).

State summary

gold.state_summary

Prescriber risk explorer

All prescribers flagged for review. Select a row to see which metrics drove the score and where the prescriber sits among peers.

OIG-excluded prescribers with Part D claims

Federal health programs may not pay for items prescribed by excluded individuals (42 CFR 1001.1901). Each row is a potential overpayment for referral. The matching is on NPI, with the exclusion window checked against the data year.

Peer benchmarks

Peer medians in natural units. MAD is shown on the scoring scale: log1p for cost and days' supply, which are heavily skewed. Groups with fewer than 30 prescribers fall back to the national specialty group.

Median by peer group

Data quality

The same SQL expectations run as Delta Live Tables expectations on Databricks and as quarantine rules in the local runner. Rows that fail are kept, with the rules they broke, instead of being silently dropped.

Suppressed or blank values

CMS blanks counts under 11 for privacy. They are stored as null, never as zero.

Expectations applied in silver

How it's built

Download source code (.zip)PySpark transforms, DLT pipeline, Unity Catalog SQL, Terraform, Asset Bundle, CI and 12 tests

Architecture

CMS data APIPart D by Provider, 2024
→
Landing volumeraw files + SHA-256 manifest
→
BronzeAuto Loader, strings + lineage
→
Silvertyped, deduped, expectations
→
Goldbenchmarks, risk scores, OIG matches
→
Dashboardthis page / Databricks App

Engineering decisions

  • One rule set, two runtimes. Pure PySpark transforms and SQL expectations are shared by the Lakeflow/DLT pipeline and a local Delta runner.
  • Robust statistics. Median/MAD z-scores, log1p for skewed metrics, a capped composite averaged over all five metrics, and a state → national peer fallback.
  • Governance. Unity Catalog grants for four personas, state-level row filters, and name masking for everyone except case investigators.
  • Delivery. Terraform for the catalog, schemas, volume, groups and cluster policy; a Databricks Asset Bundle with a monthly job; GitHub Actions CI; 12 PySpark unit tests.

An iteration worth telling

The first scoring version flagged 8.5% of Tennessee prescribers, and its top 10 were all cost-per-patient outliers at the score cap. A skewed metric on a raw-dollar scale, combined with a composite averaged only over the metrics a prescriber had, rewarded a single extreme value.

Log-scaling the skewed metrics and averaging over all metric weights brought flag rates to 0.6–2.1%. The top leads became multi-metric opioid outliers, which is what investigators actually want.