Calculating Notional Funding from Activity Data
This content is for 2026. Switch to the latest version for up-to-date documentation.
This tutorial walks through the calculation of notional equivalent funding (NEP) from admitted patient activity data using the nwau_py package. The result represents what a jurisdiction would have been paid under a given pricing year’s national efficient price (NEP).
Prerequisites
Section titled “Prerequisites”- Python 3.10+
nwau_py >= 0.6.0installed- Basic familiarity with activity-based funding (ABF) concepts
1. Load packages and prepare data
Section titled “1. Load packages and prepare data”import pandas as pdimport numpy as npfrom nwau_py.calculators import calculate_acute, AcuteParamsfrom nwau_py.pricing_constants import get_nep
np.random.seed(42)n = 20activity = pd.DataFrame({ "DRG": np.random.choice(["E62A", "E62B", "F62A", "F62B", "G02A"], size=n), "LOS": np.random.randint(1, 15, size=n), "ICU_HOURS": np.random.choice([0, 0, 0, 0, 2, 4, 8], size=n), "ICU_OTHER": 0, "PAT_SAMEDAY_FLAG": np.random.choice([0, 1], size=n, p=[0.8, 0.2]), "PAT_PRIVATE_FLAG": np.random.choice([0, 1], size=n, p=[0.85, 0.15]),})The synthetic DataFrame contains episode-level DRG codes, length of stay, ICU hours, and patient demographic flags — the columns the acute calculator expects.
2. Calculate NWAU and notional funding
Section titled “2. Calculate NWAU and notional funding”result = calculate_acute(activity, AcuteParams())nep = get_nep("2025")
result["NotionalFunding"] = (result["NWAU25"] * nep).round(2)result[["DRG", "LOS", "NWAU25", "NotionalFunding"]].head()The calculate_acute function assigns an NWAU value per episode based on DRG and length of stay. Multiplying each episode’s NWAU by the national efficient price gives the notional equivalent funding.
3. Aggregate to stream summary
Section titled “3. Aggregate to stream summary”notional_funding = pd.DataFrame({ "Episodes": len(result), "Total NWAU": result["NWAU25"].sum().round(4), "Mean NWAU": result["NWAU25"].mean().round(4), "Total Notional Funding": result["NotionalFunding"].sum().round(2), "Mean Notional Funding": result["NotionalFunding"].mean().round(2),}, index=["Acute"])
notional_fundingThis shows the aggregate NWAU and notional funding for the synthetic acute cohort.
4. Export for downstream use
Section titled “4. Export for downstream use”notional_funding.to_csv("notional_funding_summary.csv")What to try next
Section titled “What to try next”- Comparing Observed Costs to Efficient Prices – bring in actual cost data alongside these NEP estimates.
- Stream-Level Cost Benchmarking – break the comparison down by care stream and benchmark against NHCDC.