Get Stars Rollup
get_stars_rollupMA Star Ratings by parent, product type or state, year over year. For a rating year against the year before: members in rated and unrated contracts, the member-weighted Overall star, the share of members (and of contracts) at 4 stars or more, and members by Overall star. Optionally the weighted measure star for a measure group, like for like.
ARGUMENTS: rating_year (default the newest with Overall stars), compare_year (default rating_year minus 1), group_by (national | parent | product_type | parent_by_product | state | state_by_product), parent (filter: part of the parent organization's name, e.g. 'UnitedHealth'), product_type (filter: nonsnp_hmo | nonsnp_ppo | dsnp_hmo | dsnp_ppo | csnp_hmo | csnp_ppo | isnp | other), state (filter: two-letter code), measure_group (optional: all | part_c | part_d | patient_safety | domain:<CMS domain code, e.g. HD3 or DD4> | source:<CMS data source, e.g. HEDIS, CAHPS, HOS, PDE> | measure:<measure identity key, e.g. c:controlling_blood_pressure>), limit (default 50, largest rated members first).
RETURNS value.rows (one per group), each with members_rated, members_unrated, contracts_rated, contracts_unrated, pct_members_4plus, wtd_avg_star, pct_contracts_4plus, members_by_star, prior (the same fields for compare_year) and change; with measure_group, a measure_group block {measures, contracts, wtd_measure_star, wtd_measure_star_prior, change}. value.summary is the national row for the same filters, with each year's weight month.
RULES THE TOOL ENFORCES: rating year Y is weighted by December of the payment year (Y+1), or the latest month when that December is not published, and says which (the certified house convention); the parent is the enrollment file's parent at the weight month; stand-alone drug plans are out; unrated contracts are counted apart, never as zero stars; product types are the fixed buckets (non-SNP, D-SNP, C-SNP by HMO and PPO; I-SNP; other), never pooled; a star belongs to the contract, so a product type or state row weights the contract's star by its members there; a measure group change compares the same contracts, measures, weights (the rating year's) and members, and leaves out new measures, re-specified measures and the improvement measures. Measure stars are CMS's normalization; raw scores are never averaged across measures.
SOURCE: CMS Part C and D Star Ratings Data Tables and CMS monthly enrollment (contract, plan, SNP and county files).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| state | No | ||
| parent | No | ||
| group_by | No | national | |
| rating_year | No | ||
| compare_year | No | ||
| product_type | No | ||
| measure_group | No |
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 |