Stream-Level Cost Benchmarking
This tutorial builds on the cost-vs-price analysis by breaking results down by care stream (acute admitted, ED, mental health, subacute, outpatient) and comparing each stream against NHCDC national reference costs. This mirrors the methodology used in the Australian Hospital Patient Costing System (AHPCS) standards.
Multi-stream analysis workflow
Section titled “Multi-stream analysis workflow”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, AcuteParams, calculate_ed, EDParams, calculate_mh, MHParams, calculate_subacute, SubacuteParams, calculate_outpatients, OutpatientParams,)from nwau_py.pricing_constants import get_nep
np.random.seed(2025)
# Acuteacute_df = pd.DataFrame({ "DRG": np.random.choice(["E62A", "E62B", "F62A", "F62B", "G02A"], size=50), "LOS": np.random.randint(1, 10, size=50), "ICU_HOURS": 0, "ICU_OTHER": 0, "PAT_SAMEDAY_FLAG": 0, "PAT_PRIVATE_FLAG": 0,})
# EDed_df = pd.DataFrame({ "AECC": np.random.choice(["AECC01", "AECC02", "AECC03", "AECC04"], size=80), "COMPENSABLE_STATUS": 2, "DVA_STATUS": 2,})
# Mental healthmh_df = pd.DataFrame({ "AMHCC": np.random.choice(["1A01", "1A02", "1B01", "2A01"], size=30), "LOS": np.random.randint(1, 20, size=30), "STATE": 1, "PAT_PRIVATE_FLAG": 0, "PAT_SAMEDAY_FLAG": 0, "PAT_PUBLIC_FLAG": 1, "priceCat": 1,})
# Subacutesa_df = pd.DataFrame({ "ANSNAP": np.random.choice(["4A01", "4A02", "4B01", "4B02"], size=25), "ADM_DATE": pd.Timestamp("2025-03-01"), "SEP_DATE": pd.Timestamp("2025-03-10"), "LEAVE_DAYS": 0, "BIRTH_DATE": pd.Timestamp("1970-06-15"), "STATE": 1, "PAT_PRIVATE_FLAG": 0, "PAT_PUBLIC_FLAG": 1, "CARE_TYPE": 1,})
# Outpatientsop_df = pd.DataFrame({ "TIER2_CLINIC": np.random.choice([20.01, 20.02, 30.01, 40.01], size=60), "SERVICE_DATE": pd.Timestamp("2025-06-01"), "BIRTH_DATE": pd.Timestamp("1980-01-01"),})2. Calculate NWAU per stream
Section titled “2. Calculate NWAU per stream”result_acute = calculate_acute(acute_df, AcuteParams())result_ed = calculate_ed(ed_df, EDParams())result_mh = calculate_mh(mh_df, MHParams())result_sa = calculate_subacute(sa_df, SubacuteParams())result_op = calculate_outpatients(op_df, OutpatientParams())
nwau_col = "NWAU25"streams = { "Acute": result_acute, "ED": result_ed, "MentalHealth": result_mh, "Subacute": result_sa, "Outpatient": result_op,}3. Calculate notional funding and build comparison table
Section titled “3. Calculate notional funding and build comparison table”nep = get_nep("2025")
cost_benchmarks = { "Acute": 5_800, "ED": 620, "MentalHealth": 9_200, "Subacute": 7_400, "Outpatient": 520,}
rows = []for stream_name, df_result in streams.items(): total_nwau = df_result[nwau_col].sum() notional_funding = total_nwau * nep n_episodes = len(df_result) synthetic_obs_cost = n_episodes * cost_benchmarks[stream_name] cost_ratio = (synthetic_obs_cost / notional_funding) if notional_funding > 0 else float("inf") rows.append({ "Stream": stream_name, "Episodes": n_episodes, "Total NWAU": round(total_nwau, 4), "Notional Funding": round(notional_funding, 2), "Observed Cost": round(synthetic_obs_cost, 2), "Cost Ratio": round(cost_ratio, 4), })
benchmark_table = pd.DataFrame(rows)benchmark_tableThe table shows each stream’s aggregate NWAU, notional funding, synthetic observed cost, and cost ratio. Some streams may show NWAU25 = 0 if the synthetic classification codes do not match the published price-weight tables — this realistically reflects what happens with incomplete reference data.
4. Export the comparison
Section titled “4. Export the comparison”benchmark_table.to_csv("stream_benchmarking_summary.csv")NHCDC and AHPCS context
Section titled “NHCDC and AHPCS context”- NHCDC provides the national cost benchmarks that inform NWAU price weights and the NEP.
- AHPCS ensures methodological consistency in cost allocation across hospitals and jurisdictions.
- Without AHPCS compliance, inter-hospital cost comparisons may be misleading.
- In practice, non-admitted and subacute streams use NEC (not NEP) pricing, which has a fixed-plus-variable cost structure.
AHPCS methodology notes
Section titled “AHPCS methodology notes”- Scope alignment: Only include episodes that fall within the NHCDC scope. Exclude non-admitted ED, S100 pharmaceuticals, and other out-of-scope activity.
- Cost allocation: Use the AHPCS standard cost buckets (direct, indirect, on-costs) and apply the same overhead allocation ratios used in the NHCDC.
- Grouper version: Ensure the DRG grouper version used for pricing matches the version used by NHCDC for the same reference year. For AR-DRG, that means the same ICD-10-AM, ACHI, and ACS versions plus the same licensed grouping tables or software release.
- Outlier policy: Apply the NHCDC trim-point / outlier policy before computing per-episode averages. Unadjusted means are not comparable.
Caveats for real-world use
Section titled “Caveats for real-world use”- Not all streams use NEP — subacute and non-admitted activity are more commonly priced via NEC (National Efficient Cost), which has a fixed-plus-variable cost structure.
- NHCDC cost data is lagged — NHCDC data typically reflects costs from 1–2 years prior.
- Risk adjustment — real benchmarking should adjust for case mix, remoteness, and indigenous status.
- Jurisdiction variation — states and territories may apply different price multipliers, loadings, and activity funding policies.
- Synthetic data only — all values shown are illustrative and do not reflect real hospital performance.
What to try next
Section titled “What to try next”Return to Calculating Notional Funding from Activity Data to review the pricing step, or Comparing Observed Costs to Efficient Prices for the baseline cost-vs-price analysis.