Plan: CMS-64 Expenditure Aggregation (Issue #379)

Status: Blocked (MMIS claim-processing dollars are not Canopy data and no feed exists, #379)
Issue: #379 — the externally-blocked (T4) register in Roadmap › Open Work

For a future implementer: this page names the seam that already ships and what the partner feed must supply. It is not a build order; it is re-planned when #379 unblocks.

Context

The CMS-64 path no longer labels enrollment as expenditure. aggregate_cms64(db, fiscal_year, fiscal_quarter, pins) in services/canopy-reporting/src/reporting/medicaid.rs reads medicaid_tmsis_eligibility_extracts for exactly the quarter’s three PUBLISHED T-MSIS generations (the pins; a month without one is the handler’s 422) and inserts one medicaid_cms64_reports row per coverage group with enrolled_count (raw extract rows) and member_months (distinct (person_id, report_month) pairs, #1585 — the two can diverge, and a test pins that). The expenditure columns are NULL on purpose — the plan-D8 field disposition #1333 resolved, under which a NULL is never a fabricated figure — because the paid amounts live in MMIS.

The route is /v1/reporting/medicaid/cms-64 (CMS_64 in crates/canopy-contracts-reporting/src/paths.rs): POST aggregates the quarter (201, Cms64Generated; coverage_groups is rows_affected()-honest) and GET lists the stored quarters. Both handlers (generate_medicaid_cms64, list_medicaid_cms64 in services/canopy-reporting/src/api/mod.rs) require a supervisor-or-above user token. Pages: canopy-reporting API and canopy-reporting data model; the plan that built this is Medicaid/CHIP Federal Reporting.

What is missing is the money. The CMS-64 is the quarterly statement of Medicaid expenditures that draws down federal financial participation (42 CFR Part 430), and those dollars are MMIS claim-processing data that no feed delivers to Canopy.

Scope

In scope (once the feed exists):

  • Decide the entry point first: ADR-045 makes canopy-exchange the single partner-integration service, and the Gateway catalog already lists GAMMIS / MMIS as a partner family (Gateway partner interfaces).

  • Populate the expenditure columns of medicaid_cms64_reports from the feed, grouped as the CMS-64 form requires, without touching enrolled_count or member_months — production behaviour pinned by cms64_counts_pinned_generations_and_reports_honest_rows.

  • Keep the published-input pinning and the rows_affected()-honest response. Flip the NULL disposition on the API page; CHANGELOG entry.

Out of scope:

  • The MMIS claims bridge itself (partner-owned).

  • CMS-37 (a separate report, separate plan); the quarterly amendment / correction workflow.

  • TANF expenditures — ACF-196 (#378) has the same shape of blocker on the state-accounting side.

Design

Not designed: the feed’s shape is unknown. What is fixed is the seam the re-plan extends rather than duplicates — the medicaid_cms64_reports table (services/canopy-reporting/migrations/20260409000000_tanf_medicaid_reporting_tables.sql), the aggregate_cms64 aggregator, the /v1/reporting/medicaid/cms-64 route, and the conventions of generation-published report runs. Ruled out: a live HTTP aggregation call into canopy-medicaid at generation time (it would break the generation pinning that makes a quarter reproducible) and any new table or route beside the existing ones.

Review log

None — the plan re-enters round 1 when it is re-planned after #379 unblocks.

Edit this page · default