Get Enrollment
get_enrollmentReturns CMS monthly enrollment for a Medicare Advantage plan or contract: the member count, the trend over time, and, at contract level, the MA-only vs Part-D split, plus org/parent and plan type. Filter by contract_id (required) + optional plan_id (plan grain vs contract total), and optional year ('2024') or month ('2024-03'); with neither, returns the latest month plus a trailing 13-month trend. Monthly coverage back to 2006. Every row carries the year-over-year change (yoy_change / yoy_pct) vs the same month one year earlier; plan rows carry the plan's SNP class (snp_type) when applicable.
RETURNS a detail payload, not a bare count: value.summary (latest_month, latest_enrollment, yoy_change / yoy_pct, ma_only_count / part_d_count, trend min/max and change over the window), value.months (the per-month trend rows), value.row_counts (matched / returned / truncated / limit) and value.query (the filters actually applied). limit bounds the trend rows returned (default 13 months, max 2000); a truncated list always carries a caveat.
Enrollment is the SPINE every other MA metric joins to (per-member, share-weighted). SUPPRESSION is honest: CMS redacts cells under 11 enrollees, which come back as count=null with a [lower, upper] bound and suppression_reason='redacted_small_cell', never a zero, and the suppression caveat fires only when a returned month is actually redacted. A contract id that does not exist returns found=false with a not_found_reason, never a suppression story.
Pair with get_pbp_benefit or get_stars to weight or normalize by members. SOURCE: CMS Monthly Enrollment by Plan / by Contract.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | No | ||
| limit | No | ||
| month | No | ||
| plan_id | No | ||
| contract_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | ||
| as_of | No | ||
| value | Yes | ||
| source | Yes | ||
| status | No | complete | |
| caveats | No | ||
| failure | No | ||
| quality | No | ||
| refusal | No | ||
| vintage | No | as_restated | |
| audit_id | Yes | UUID; ties to medicare_silver.audit_log row. | |
| signature | No | ||
| tenant_id | No | Calling tenant slug, resolved by the binding and stamped via the per-call tenant context. Defaults to the bootstrap 'internal' tenant for local/in-process callers. | |
| timestamp | Yes | ||
| confidence | No | ||
| data_as_of | No | ||
| request_id | Yes | ||
| methodology | No | ||
| snapshot_set | Yes | {table_fqn → iceberg_snapshot_id (int64)}. Per M-2 §2.2. | |
| tool_version | Yes | ||
| response_hash | Yes | SHA-256 of canonicalized form per M-2 §2.4. | |
| result_status | Yes | ||
| vintage_basis | No | default_unmeasured | |
| as_of_asserted | No | ||
| as_of_observed | No | ||
| parse_revision | No | ||
| as_of_effective | No | ||
| freshness_state | No | unknown | |
| methodology_era | No | ||
| confidence_basis | No | ||
| semantic_version | Yes | ||
| invariants_applied | No | ||
| finality_confidence | No | ||
| cms_vintage_sequence | Yes | ||
| parser_artifact_hash | Yes | ||
| methodology_blend_factors | No | ||
| parser_artifact_hash_basis | No | not_evaluated |