@pipeworx/hcup-inpatient-stats
Connect: https://pipeworx.io/mcp — every tool in the catalog, including @pipeworx/hcup-inpatient-stats’s. Install: one-click buttons
Connect to just the @pipeworx/hcup-inpatient-stats pack
https://gateway.pipeworx.io/hcup-inpatient-stats/mcp — only @pipeworx/hcup-inpatient-stats’s own tools, nothing else in the catalog.
No MCP client? Skip the connection: POST https://gateway.pipeworx.io/v1/tools/search_packs {"query":"..."} to find a tool below, GET /v1/tools/<name> for its schema, POST the same URL with arguments for the data — see For AI agents.
Tools: 2
National U.S. hospital inpatient discharges, aggregate costs, and sepsis outcomes by principal diagnosis and year, from the Agency for Healthcare Research and Quality’s Healthcare Cost and Utilization Project (HCUP).
This answers questions like “how many heart failure hospitalizations were there nationally, and what did they cost” — the kind of number epidemiology and market-sizing claims lean on, cited the way HFSA/AHA cite it: AHRQ HCUP for hospitalization and cost figures.
Tools
condition_hospital_costs(year?, payer?, condition?)— the top-20 most expensive principal-diagnosis conditions nationally for a year (2022 or 2017), with discharge counts, aggregate cost, and mean cost per stay. Optionally filtered to one condition (“heart failure”, “sepsis”, a CCSR code) or one expected payer (2022 only: Medicare, Medicaid, private insurance, self-pay).sepsis_hospital_outcomes(period?, population?)— national sepsis (principal diagnosis) average length of stay and mean cost per stay by year, 2016–2021, with/without a co-occurring COVID-19 diagnosis, broken out by patient population (adult 65+, adult 18–64, maternal, pediatric, neonatal). Also reports any-listed-diagnosis sepsis stay counts for the years AHRQ printed a number (2016, 2019, 2021) — a broader population than principal diagnosis, clearly labeled and never mixed with it.
Auth
Keyless.
Data sources
- Agency for Healthcare Research and Quality (AHRQ), Healthcare Cost and Utilization Project (HCUP) — the “Most Expensive Conditions by Payer” Statistical Brief series (2022 and 2017 editions) and the sepsis-outcomes Statistical Brief (2016–2021). These are AHRQ’s own aggregate reports computed from the National Inpatient Sample and published freely, with no account or data use agreement.
What this pack deliberately does NOT use: HCUP’s National Inpatient Sample (NIS) and Nationwide Readmissions Database (NRD) microdata files are purchased and governed by a clicked-through Data Use Agreement. This pack never touches those files or anything requiring that agreement — every number here comes from AHRQ’s own public reports, which state the same underlying statistics without the DUA.
Why these numbers and not a live query: AHRQ’s interactive query tools (publicly branded “HCUPnet” and “HCUP Fast Stats”) were migrated to a Tableau Server deployment. It answers ordinary browser traffic with no login or account — this is not a DUA or credential wall — but a CloudFront-level WAF in front of it returns a 403 to plain HTTP clients regardless of User-Agent or header set, the same class of block a Cloudflare Worker’s data-center egress IP would hit. That makes it unreliable to query live from here. AHRQ’s static Statistical Brief reports (served from hcup-us.ahrq.gov, no such block) carry substantially the same aggregate numbers directly from the publisher, so this pack is built from those instead.
Refresh path: AHRQ posts new Statistical Briefs on an irregular schedule
(no fixed annual cadence — as of 2026-10-21, the “Most Expensive Conditions”
series has editions for 2004, 2006, 2008, 2011, 2013, 2017 and 2022, with no
2021 edition). Periodically check AHRQ’s public statistical-briefs index
(no account needed) for a newer cross-condition brief or sepsis-outcomes
brief, re-transcribe its Table 1 (and any per-payer tables) into
src/data.ts, and bump the *_DATA_AS_OF constants there. There is no API
to poll — this is a manual, low-frequency transcription task, same as any
other government report-based pack in this catalog.
Heart failure prevalence — not publicly tabulated
The acceptance criteria for this pack asked for heart failure prevalence from a public NCHS/CDC table. None was found. Checked:
- data.cdc.gov (Socrata) — no dataset title or description matching
“heart failure prevalence” or “heart failure” in the catalog search API.
chronicdata.cdc.gov(PLACES / BRFSS) publishes self-reported “coronary heart disease or angina” prevalence by county/tract/place — a related but different measure (CHD/angina, not heart failure), and this pack does not substitute one for the other. - CDC NHIS (National Health Interview Survey) publishes a data query
tool, but it is a client-side application with no discoverable public JSON
endpoint found during this build, and
cdc.gov/nchs/nhis/health-conditions.htmitself 403s to a plain client. - A national heart-failure prevalence figure (e.g. the commonly cited ~6.7 million US adults) traces back to published literature (AHA’s “Heart Disease and Stroke Statistics” update) that derives it from NHANES exam and questionnaire microdata via survey-weighted analysis — NHANES publishes the raw microdata (including the congestive-heart-failure question) publicly, but NCHS does not publish a ready-made HF-prevalence table from it; that analysis step is not something this pack reproduces.
If a public NCHS/CDC prevalence table surfaces later, add it as a third tool rather than reopening this one.
Notes
- “Discharges” / “hospital stays” are the unit of analysis throughout — a hospital stay, not a unique patient. A patient admitted multiple times in a year is counted once per stay.
- Costs are the hospital’s cost to produce the care (HCUP Cost-to-Charge Ratios applied to billed charges), not amounts paid by payers, and exclude separately billed physician fees.
- Condition names and CCSR codes come from AHRQ’s Clinical Classifications
Software Refined (CCSR) for ICD-10-CM — the same system
mepsuses for its condition lookups (mcps/meps/src/conditions.ts), though this pack ships its own small synonym map scoped to the ~20-40 conditions that actually appear in these tables rather than the full CCSR taxonomy.
Tools
- condition_hospital_costs — National U.S. inpatient hospital discharges and aggregate costs by principal diagnosis (CCSR category) and year, from AHRQ HCUP’s published “Most Expensive Conditions by Payer” Statistical Brief serie
- sepsis_hospital_outcomes — National U.S. inpatient hospital length of stay and mean cost per stay for sepsis (principal diagnosis), by patient population and year, 2016-2021, from AHRQ HCUP Statistical Brief #306. This is the o
Tools
condition_hospital_costs— National U.S. inpatient hospital discharges and aggregate costs by principal diagnosis (CCSR category) and year, from AHRQ HCUP's published Most Expensive Conditions by Payer Statistical Brief seriessepsis_hospital_outcomes— National U.S. inpatient hospital length of stay and mean cost per stay for sepsis (principal diagnosis), by patient population and year, 2016-2021, from AHRQ HCUP Statistical Brief #306. This is the o