← Back to selected work

Supporting project P4 · Pharmaceutical procurement analytics · Public data (NADAC 2026, CMS)

A benchmark desk for drug prices — and what expires while you wait

Twelve molecules that anchor essential-medicine dispensing, tracked through 42 weekly NADAC snapshots in 2026: drift, volatility and dispersion — real. Plus an expiry-exposure simulator whose assumptions are printed on the page, so nobody mistakes a method demo for a measurement.

Completed v1.0 · REAL + MIXED tiers labelled Data: US Government public domain (NADAC 2026) MIXED tier = simulator assumptions × real prices
98,735NADAC rows pulled via the public API
42weekly snapshots, 2026-01-07 → 2026-10-21
−16.8%omeprazole median YTD drift (REAL)
+55.1%amlodipine single-week median jump, 2026-05-20 (REAL)
985×within-molecule NDC price dispersion, metformin (REAL)
11,400 uexpired at 8-wk shelf under the disclosed policy (MIXED)

What is real and what isn't — on this page

Real

  • Every price statistic: computed from the NADAC 2026 dataset (data.medicaid.gov public API), pulled 2026-10-24.
  • Slice rule disclosed: 12 keyword-filtered molecules; analytics restricted to generics × unit "EA" (8,045 rows dropped and counted).
  • 5 real build mistakes in AI_GOT_IT_WRONG.md — including one wrong FIFO law caught by a prediction test.

Modelled / assumptions

  • MIXED expiry ladder: deterministic FIFO simulator with disclosed parameters (1,200 u/wk bought, 700 used; shelves 8/13/26/52 wk) × real weekly NADAC medians. Not a real pharmacy's stock record.
  • NADAC is a survey-derived reference price, not a transaction log.
  • Nothing here is clinical advice or a real purchase order.

00 The two-minute version

Headline: benchmark weekly at matched-unit medians — molecule medians drifted −1% to −17% YTD-2026, two lines swing 14–15% CV week-to-week, and "the price of a molecule" is really a dispersion of up to 985×.

Business question
What would a procurement-grade price desk say about 2026 — and how much stock value expires under stated policies?
Data
NADAC 2026 (CMS, public domain): 98,735 rows → 12 molecules × 42 weekly publishes. REAL
Method
API pagination → audit → G×EA slice → weekly medians → volatility/dispersion/movers → FIFO cohort simulator (MIXED). REAL + MIXED, labelled
Result
Drift down for most; albuterol CV 15.2%, amlodipine CV 14.1% with a +55.1% week; dispersion to 985×. REAL
Recommendation
Weekly benchmark cadence at molecule×unit grain; CV-ledger-driven order flexibility; exposure simulator as method, locally re-priced.
Limitations
Survey-derived reference; EA unit only; MIXED layer obeys its disclosed assumptions.
Next steps
Add CMS price-change reason codes; local Nigerian price capture pilot; sensitivity run over policy parameters.

01 The problem

Pharmacy procurement dies quietly twice: once at the tender (anchored to stale average prices) and once on the shelf (stock expiring behind good intentions). The fix for both starts with a honest benchmark desk: a canonical weekly price series, a volatility ledger, and an exposure method whose assumptions are in the open — not buried in a spreadsheet someone's cousin built.

NADAC is the best test-bench available: US federal, public-domain, weekly, freely queryable. Twelve molecules were chosen for overlap with Nigerian essential-medicine dispensing, making the method directly portable to a Drug Revolving Fund or formulary audit.

02 The data

ItemDetailVerifiedStatus / limit
DatasetNADAC (National Average Drug Acquisition Cost) 2026 — data.medicaid.gov DKAN dataset2026-10-24REAL — public
LicenceUS Government public domain (PD-1.0 label)metastore recordfreest possible tier; attribution still carried voluntarily
Access pathDKAN datastore query API (/api/1/datastore/query/{uuid}/0), 500-row pages, keyword LIKE filtersfetch log + row countsUUID discovered live; no hardcoded download URLs
Slice98,735 rows = 12 molecules (keyword-matched) × 42 weekly publishes (2026-01-07 → 2026-10-21)per-drug counts printedyearly scope; 2026 YTD only
Analytic framegenerics (class G) × unit EA → 90,690 rows; 8,045 dropped (brands/non-EA), disclosedaudit tableEA excludes inhalers/syrups per-mL; albuterol EA rows are unit doses
Known textureNADAC is survey-derived; effective_date can backdate; per-NDC prices span strengths/formsboundary auditmedians at molecule-week grain; dispersion charted, not hidden

03 The process

  1. Discover, don't hardcode. The dataset UUID came from the live DKAN search; a failed CKAN-catalog detour is logged, not hidden (ledger #1).
  2. Reproducible slice. 12 keyword filters documented by name; row counts per drug printed and reconciled against API-side totals.
  3. Audit before analytics: unit mix, class mix, NDC-key sanity, range checks; analytic frame cut (G × EA) with the drop count published.
  4. Weekly medians as the canonical series — robust to the strength/form dispersion that the dispersion chart keeps honest.
  5. Volatility ledger: CV, moved-weeks, max single-week jump per molecule — every figure traceable to outputs/volatility.csv.
  6. MIXED expiry desk: cohort-FIFO simulator; the parameter block and the FIFO front-age law are printed in the script and on this page.

04 What the data showed

Indexed weekly median price paths for 12 molecules across 42 weeks of 2026
So what: a quiet year for most lines (index pinned near 100), but albuterol and amlodipine swing — omeprazole drifts steadily down (−16.8% YTD).
Volatility ranking: albuterol 15.2 percent CV, amlodipine 14.1, rest single digits
So what: two lines carry the year's forecasting risk. Order flexibility belongs with the double-digit CV lines; fixed windows are fine for the bottom five.
Twelve largest single-week median moves; amlodipine plus 55.1 percent tops
So what: the +55.1% amlodipine week (2026-05-20) and the −34.2% April move are the same story: medians jump when the underlying mix of surveyed NDCs shifts. Treat single-week moves as survey events before treating them as market moves.
Within-molecule NDC price dispersion up to 985x for metformin
So what: "the price of metformin" is a 985-fold range across strengths and forms at the latest snapshot. Any benchmark that ignores form matching is measuring apples against orchards.
Median unit price levels from azithromycin 59.7 cents to metformin 2.5 cents
So what: unit-price levels differ 24× across the desk — exposure math must always multiply through the specific molecule's level, never a desk average.

05 The expiry desk — MIXED by design

Assumptions, printed on purpose: buy 1,200 units/week; use 700 units/week; FIFO dispensing; shelf lives 8 / 13 / 26 / 52 weeks; 42-week NADAC-2026 window. Under FIFO the front of the queue ages ≈ 0.417 weeks per calendar week (depletion advances 700/1200 cohorts weekly — the corrected form, after the ledger-caught first-pass error). So front age peaks ≈18.6 weeks: short shelves expire, long shelves don't.

Simulated expired value vs shelf life across molecules, log scale
So what: expiry is a policy outcome first and a price outcome second: the same simulator costs $4,200 on albuterol and $280 on metformin at identical unit counts. Ordering behaviour sets the unit loss count; NADAC sets its value.

This panel teaches a reproducible method (cohort FIFO × real benchmark prices). It is not, and is not presented as, a measurement of any real pharmacy's waste.

06 Limitations

  • Reference ≠ transactions: NADAC is survey-derived; single-week jumps often reflect survey-mix shifts.
  • EA unit only; inhaler-per-mL and syrup lines are excluded by the analytic frame (drop count published).
  • 2026 YTD only (dataset scope); cross-year elasticity isn't claimed.
  • MIXED layer: deterministic usage; real pharmacies have variance, backorders and batch dating — flagged as extension, not assumed away.

07 Impact & recommendation

  • Weekly cadence, molecule×unit grain — annual-average tenders misprice volatile lines by design.
  • CV-ledger triage: flexibility for albuterol/amlodipine-class lines; fixed windows for metformin/lisinopril-class lines.
  • Port the desk, not the dollars — the desk structure (canonical table, volatility ledger, labelled simulator) is the Nigerian-deliverable asset; prices re-derive locally.

Next steps: join CMS explanation codes to movers; local price-capture pilot; stochastic-usage extension of the simulator.

08 Tools used

Python (paginated API fetch, charts) · base R (audit, medians, volatility, FIFO simulator) · hand-coded HTML/CSS. AI-assisted with the published 5-entry bug ledger.

Named paths (R/…, AI_GOT_IT_WRONG.md, SOLUTIONS_LOG.md) are relative to this project's repo folder — browse the files on GitHub ↗ (verified live 2026-10-25).