CMS TEAM Episode Calculator · decision recordHow it was built

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.

The record at a glanceStarted Oct 12, 2026 · still iterating
Build passes
7
each one answered a question
Public datasets joined
13
all CMS or MedPAC
Hospitals prefilled
721
every TEAM participant
Decisions logged
22
16 CFO objections fixed
Timeline

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.

Build timelineMarkers are sessions; the band under them is what the tool could do at that point. Dates are 2026.
OCT 12 TO 13 · GROUNDWORK

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.

OCT 15 TO 16 · THE MODEL

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.

OCT 18 TO 19 · THE DATA AND THE CRITIQUE

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.

Data sourcing

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.

Data vintage against the TEAM windowEach bar is the period a dataset measures. The shaded band is the 2022 to 2024 baseline CMS used for PY1 target prices; the dashed line is PY1 itself, 2026. Hover a bar for the release date.
Volumes, hospital facts and policyQualitySpending and market
Source manifestpulled Oct 15 to 19, 2026
SourceReleaseRows readWhat the calculator takes from it
How the files become one pageThree scripts, run in order, turn the raw downloads into the embedded data the page reads. Raw files stay out of the repository; the scripts re-download them.
1 · raw downloads

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
2 · join by CCN

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
3 · compact and ratio

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
4 · assemble

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
The model

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.

Reconciliation engine, in CMS orderEvery step cites the document it came from on the calculator's Methodology section.
01

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.

02

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.

03

Reconciliation per category

(Target − average spend) × episodes, floored at zero for low-volume categories (30 or fewer episodes across the three baseline years).

04

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.

05

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.

06

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.

Prefill layer, from public record to inputsWhat happens when one of the 721 hospitals is picked. Each output carries a label on the page.
A

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.

B

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%.

C

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.

D

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.

E

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.

Decision log

The choices, with what lost.

In the order they were made. Each entry names the alternative considered and why it lost.

The CFO review

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.

Case results before and after the reviewEstimated PY1 net payment on each case's chosen track, with the typical program off. The after bars include sequestration, the risk-multiplier seed, census-division comparators and the outpatient joint row, which is why the target books grew. Hover for the target book.
Oct 18, before the reviewOct 19, after the fixesBars below the line are repayments.
The sixteen, in the order they were fixedall shipped Oct 19
#The objectionWhat the page does now
Validation

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.

Reproducedon the page, live
CheckPublishedThis tool
CMS quality weighting example650 / 650 / 400 episodes, scaled 60 / 50 / 4051.451.5
Positive $10,000 at CQS 0 / 50 / 1009,000 / 9,500 / 10,000same
Negative −$10,000, Track 2 at CQS 100−8,500−8,500
Negative −$10,000, Track 3 at CQS 100 / 50−9,000 / −9,500same
CJR evaluation, elective joints5 points IRF to home, 2 points out of SNF$1,226 / episodeabout $1,120
BPCI Advanced, three fewer SNF daysabout $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.

Not yet checkedneeds data the tool does not have

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.

What comes next

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.

1 · OWN THE HOSPITAL'S DATA

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.

2 · MAKE IT A RECORD

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.

3 · USE THE ASSET ALREADY LOADED

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.

4 · ESTIMATE RISK PROPERLY

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.

5 · SYSTEM VIEW

Roll up a dozen CCNs

Systems run TEAM across many hospitals. Side-by-side cases exist; a roll-up with shared assumptions does not.

6 · ENGINEERING HYGIENE

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.