Plan: CMS-416 EPSDT Pipeline (Issue #380)
Status: Blocked (MMIS clinical/claims utilization data, #380)
Issue: #380 — the externally-blocked (T4) register in Roadmap › Open Work
For a future implementer: this page names the pipeline seam that already ships and what the partner feed must supply. It is not a build order; it is re-planned when #380 unblocks.
Context
The synchronous CMS-416 extract this plan once targeted (extract_cms416 in services/canopy-reporting/src/reporting/medicaid.rs) was deleted in the #1202/#1203 report-run work; only the shared age math survives there — cms416_reference_date (September 30 of the reported federal fiscal year, #1155, from rulesets/federal/cms-416-2026.json) and calendar_age_years. CMS-416 now runs in services/canopy-reporting/src/worker/medicaid.rs on the durable run substrate of generation-published report runs.
POST /v1/reporting/medicaid/cms-416 (generate_medicaid_cms416 in services/canopy-reporting/src/api/mod.rs) refuses with a 422 naming the missing months unless all twelve months of the report year have a PUBLISHED T-MSIS generation, then enqueues a run (202, ReportRunAccepted; poll GET /v1/reporting/runs/{id}) with those generations recorded as input pins. The worker walks the distinct non-CHIP persons of the pinned generations, folds each into the configured age bands (0-1 through 19-20), and writes the medicaid_cms416_reports band rows inside the promotion transaction: total_enrolled_children, total_member_months (#1585; NULL when honestly unavailable) and eligible_for_screening, which equals the banded enrollee count because banded enrollees hold the 42 CFR 441.56 EPSDT entitlement. GET /v1/reporting/medicaid/cms-416 (list_medicaid_cms416) returns one keyset page of the published generation’s rows with provenance. Pages: canopy-reporting API and canopy-reporting data model; the plan that built the first version is Medicaid/CHIP Federal Reporting.
What is missing is the participation side — how many banded children received a screen, and the referrals. That is MMIS clinical/claims utilization data no feed delivers to Canopy; no screening data exists in any Canopy database.
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).
-
Add the screening numerators as a leg of the existing
cms_416run: counted per configured band with the same reference-date math, carried in the durableKindAggregates::Cms416map (services/canopy-reporting/src/store/runs.rs) so a resumed run never ships a partial sum, and written in the same promotion transaction. -
Tests: band edges at the September 30 reference date; a year with no screenings; a checkpoint from before the feed decoding to NULL numerators. Flip the disposition on the API page; CHANGELOG entry.
Out of scope:
-
The MMIS / HEDIS bridge itself (partner-owned).
-
Periodicity-schedule encoding (which child should have been screened when); EPSDT overdue notices; the CMS-416 amendment workflow.
Design
Not designed: the feed’s shape is unknown. What is fixed is the seam the re-plan extends rather than duplicates — the cms_416 run kind in services/canopy-reporting/src/worker/medicaid.rs, the medicaid_cms416_reports table (created in services/canopy-reporting/migrations/20260409000000_tanf_medicaid_reporting_tables.sql, dispositions in 20261205000000_honest_federal_field_dispositions.sql) and the two routes. Ruled out: a synchronous extract, and any read of screening data at report time that is not pinned to the run — whatever table the feed lands in, the report reads it through a run leg that records its inputs.