Every choice behind the number, with the alternative that lost.
A calculator is only as good as the choices behind it. This page keeps every one: the public datasets and what each supplies, each modeling decision with the alternatives that lost, the CFO review that reshaped the engine, the tests that pin the math to the CMS rules, and the road from a portfolio piece to a product. It is updated as the tool changes.
One pass at a time, one direction.
Each pass answered a question the previous one raised. The first version proved the reconciliation math; the last one answered a CFO's objections. Hover a marker for what shipped.
The site that would host it
Three redesign concepts for jaybeatty.com in black, purple and green. Scoreboard won. That palette, type and layout became the calculator's identity, which is why the tool reads as part of the site rather than a widget bolted on.
From rules to a working engine
Version one implemented the published reconciliation order from the CMS PY1 target price workbook and fact sheets. The next day added the levers module, after the question of whether post-discharge care and complications belonged, and the evening added service-line tabs and five case hospitals on real 2024 volumes.
Real data, then hard questions
Thirteen public datasets joined by CCN, so every participant prefills. Then a CFO's objections, sixteen of them, all fixed in priority order, followed by a margin-context line prompted by that month's Kaufman Hall flash report.
Thirteen public files, one hospital record.
Nothing private, nothing licensed. Every file is downloadable from cms.gov, data.cms.gov or medpac.gov, and each line of the calculator's facts panel names the file it came from. The chart shows how current each source is against the window TEAM actually prices.
| Source | Release | Rows read | What the calculator takes from it |
|---|
cms-sources/
About 500 MB of CSV, JSON, XLSX and PDF, kept beside the project with the original file names.
- Care Compare CSVs
- data.cms.gov API pulls
- FY2027 impact file and rule text
- TEAM workbooks and fact sheets
build_metrics.py
Reads every file, keys it on the six-digit CMS certification number, computes percentiles among IPPS hospitals eligible for TEAM, and writes the full record.
- 721 hospitals, 1.3 MB
- national and state comparators
- county context from FIPS codes
derive.py
Keeps only what the page needs and pre-computes the ratios the prefill uses: post-discharge spend versus census division, SNF days versus national, state SNF per diem.
- 521 KB embedded
- cost-report revenue
- division comparators
assemble.py
Inlines the price table, participant list, cases and the compact record into the template with the application script. One 800 KB file, no server, no tracking.
- team-calculator.html
- artifact variant for previews
- copy to the site folder
What the engine does with a hospital.
Two layers. The reconciliation engine applies the published CMS rules to whatever inputs it is given. The prefill layer turns a hospital's public record into those inputs, and labels each one as real, derived or assumed.
Regional target per MS-DRG
Benchmark × prospective trend × (1 − discount), read from the CMS PY1 workbook: 29 MS-DRGs × 9 census divisions. Outpatient joint and fusion rows take the matching MS-DRG price, as the workbook's note directs.
Hospital target
Regional target × the risk multiplier. CMS's hospital-specific factor is not public, so the slider is seeded from bed size, safety-net flag and county dual share, and the results show the ±0.06 range and the break-even point.
Reconciliation per category
(Target − average spend) × episodes, floored at zero for low-volume categories (30 or fewer episodes across the three baseline years).
Aggregate and quality-adjust
Track 1 zeroes a negative total. Positive amounts lose 10% × (1 − CQS/100); negative amounts gain 15% × CQS/100 relief in Track 2, 10% in Track 3. These formulas reproduce the CMS worked examples on the page's Checks section.
Stop-gain, stop-loss, sequestration
Caps at 10% (Track 1, upside only), 5% or 20% of the aggregated target. Then 2% sequestration on a positive payment. The final-price band reruns the result with the target 3% either way.
Levers and net to hospital
Savings per episode from SNF, IRF, readmission, infection and VTE changes, times a realization share, with home health and outpatient allowances charged back. Net to the hospital subtracts program cost and lost margin.
Volumes · real
2024 traditional-Medicare inpatient discharges by MS-DRG, plus outpatient joint services as a labeled upper bound. Cells under 11 are suppressed by CMS and can be typed in.
Spend versus target · derived
Each category's national post-acute share × (the hospital's price-standardized 30-day post-discharge spend ÷ its census division's), then a category adjustment where a surgical signal exists: excess hip/knee or CABG readmissions, colon infection ratio. Capped ±20%.
Quality score · proxy
Volume-weighted percentiles, ranked among IPPS hospitals eligible for TEAM: hip/knee and CABG readmission as the stand-in for the hybrid hospital-wide measure (no public scores yet), PSI-90 as itself, and 50 for the patient-reported measure, which is not public.
Levers · real where measured
Hip/knee and CABG readmission rates read straight from Care Compare; SNF share, days and IRF use scaled from the hospital's spending and county use; VTE from PSI-12; bowel infection from the NHSN colon ratio.
Flags and finance · proxy
Safety-net from the Medicare SSI share at the IPPS 75th percentile; rural from the impact file; revenue from the cost report; margin defaulted to the Kaufman Hall 2.5% figure. CMS's notifications govern the flags.
The choices, with what lost.
In the order they were made. Each entry names the alternative considered and why it lost.
Sixteen objections, sixteen fixes, and what they did to the numbers.
On October 19 the tool got the critique a hospital CFO would give, point by point, and every point was fixed in the order a CFO would raise them: net to the hospital first, risk adjustment second, the moving target third. The chart shows the six case hospitals before and after.
| # | The objection | What the page does now |
|---|
Where the engine has been checked.
The page recomputes the CMS worked examples every time it loads and compares its lever arithmetic with the per-episode savings two CMS evaluations measured. This is what is proven, and what is not.
| Check | Published | This tool |
|---|---|---|
| CMS quality weighting example650 / 650 / 400 episodes, scaled 60 / 50 / 40 | 51.4 | 51.5 |
| Positive $10,000 at CQS 0 / 50 / 100 | 9,000 / 9,500 / 10,000 | same |
| Negative −$10,000, Track 2 at CQS 100 | −8,500 | −8,500 |
| Negative −$10,000, Track 3 at CQS 100 / 50 | −9,000 / −9,500 | same |
| CJR evaluation, elective joints5 points IRF to home, 2 points out of SNF | $1,226 / episode | about $1,120 |
| BPCI Advanced, three fewer SNF days | about $500 | $1,878 at $626 a day |
The BPCI figure is the one place the arithmetic runs hot: three fewer days at a full per diem overstates what the evaluation measured, which is why the typical-program preset is capped at $1,200 per episode and scaled by the 60% realization slider.
Against a real reconciliation. No hospital's PY1 reconciliation report exists yet; the first arrives in 2027. Until then the engine is validated against CMS examples, not CMS outcomes.
The prefilled spend. It is derived from all-condition spending patterns. The only test is a hospital comparing it with its own CMS baseline report, which is why the field is labeled and the badge asks for the real number.
The risk-multiplier seed. A labeled proxy. CMS's target price reports will show how far off it is; the break-even and the ±0.06 band exist so the answer survives being wrong.
Automated tests. The checks run in the browser. A test file a reviewer can run from the command line is on the roadmap below.
From a calculator to a product, in order.
A twenty-year healthcare software developer's verdict on the tool was "decent free tool, would never pay for it." That review is kept here because it is the roadmap. The single-file design was the right call for a portfolio piece and the wrong starting point for a product; everything below needs a backend.
Ingest the CMS baseline and claims files
Every participant receives its baseline episode file, target price report and quarterly claims feed. Reading those replaces the derived spend with actual episodes and makes episode construction, exclusions and overlaps real instead of modeled.
Accounts, saved scenarios, Excel export
Scenarios persist, compare across months, carry an audit trail, and export with formulas intact. A board pack a finance team can drop into its own workbook.
Peer benchmarking across 721 hospitals
The dataset to rank any hospital's post-discharge spend, readmissions and quality against every other participant in its division is already in the file. Nobody is showing a CFO that view.
HCC-based risk multiplier from the hospital's own claims
CMS publishes enough of its methodology to replace the seeded proxy with a real estimate once the claims are in.
Roll up a dozen CCNs
Systems run TEAM across many hospitals. Side-by-side cases exist; a roll-up with shared assumptions does not.
Tests, manifest, history
A command-line test file for the engine (done October 22: tests/engine.test.js, 22 checks run with node --test, after the math moved into a pure engine.js with no change in output), a data manifest with pull dates and row counts (the table above is its first draft), and a commit history that shows the iteration rather than a few large commits. The architecture note maps the build and draws version two.
Estimates only. The calculator and this record are independent educational work built from public CMS documents. Not affiliated with or endorsed by CMS. No patient data is involved anywhere in the project.