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.
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
| Item | Detail | Verified | Status / limit |
|---|---|---|---|
| Dataset | NADAC (National Average Drug Acquisition Cost) 2026 — data.medicaid.gov DKAN dataset | 2026-10-24 | REAL — public |
| Licence | US Government public domain (PD-1.0 label) | metastore record | freest possible tier; attribution still carried voluntarily |
| Access path | DKAN datastore query API (/api/1/datastore/query/{uuid}/0), 500-row pages, keyword LIKE filters | fetch log + row counts | UUID discovered live; no hardcoded download URLs |
| Slice | 98,735 rows = 12 molecules (keyword-matched) × 42 weekly publishes (2026-01-07 → 2026-10-21) | per-drug counts printed | yearly scope; 2026 YTD only |
| Analytic frame | generics (class G) × unit EA → 90,690 rows; 8,045 dropped (brands/non-EA), disclosed | audit table | EA excludes inhalers/syrups per-mL; albuterol EA rows are unit doses |
| Known texture | NADAC is survey-derived; effective_date can backdate; per-NDC prices span strengths/forms | boundary audit | medians at molecule-week grain; dispersion charted, not hidden |
03 The process
- Discover, don't hardcode. The dataset UUID came from the live DKAN search; a failed CKAN-catalog detour is logged, not hidden (ledger #1).
- Reproducible slice. 12 keyword filters documented by name; row counts per drug printed and reconciled against API-side totals.
- Audit before analytics: unit mix, class mix, NDC-key sanity, range checks; analytic frame cut (G × EA) with the drop count published.
- Weekly medians as the canonical series — robust to the strength/form dispersion that the dispersion chart keeps honest.
- Volatility ledger: CV, moved-weeks, max single-week jump per molecule — every figure traceable to
outputs/volatility.csv. - 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
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.
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).