Get Star Benchmark
get_star_benchmarkHow a Medicare Advantage contract performs on the Star measures against the market, its peers, its competitors and CMS's cut points, over time. Two views in one answer. FAMILIES: for each measure family (all measures, HEDIS, HOS, CAHPS, pharmacy, complaints and leaving, appeals, call center, plan reporting) and each rating year, the contract's actual performance % (CMS-weighted mean of its measure scores; lower-is-better rates counted as their complement, so 10% readmitted = 90%; complaints per 1,000 and improvement scores are counted, not averaged), the 4-star line over exactly the measures it was scored on, and its weighted star; beside the market (member-weighted and one contract one vote), a cohort (default: its dominant product in its dominant state, e.g. D-SNPs in NY), its peer class (national carrier, Blue Cross Blue Shield plan, Kaiser, provider-sponsored, regional plan, MA-focused entrant) and the average of its five nearest competitors. MEASURES: for the latest rating year, every measure's score, star, CMS message where there is no score, the 2-5 star cut points, the market mean (members and contracts), median and middle half, the cohort mean, the gap to the market (positive = better, direction-aware), the percentile among MA contracts, and each competitor's score.
ARGUMENTS: contract_id (required, H or R contract, e.g. H5549), rating_year (default the newest held), years (1-13, default 5), cohort (one of product_state, product, peer_class, parent, peer_class_product, cai_group, size_band, star_band, state, org_type; default product_state), family (optional: restrict the measures view to one family, e.g. hedis), limit (measure rows, default 60).
RETURNS value.summary (contract, rating year, parent, peer class, product, state, members, the cohort used, the five competitors with their parents and shared-county members), value.families (one row per family per year) and value.measures (one row per measure, latest year).
RULES THE TOOL ENFORCES: every number is read from the stored benchmark tables, never averaged at call time; a score belongs to the whole contract, so a contract sits in the one product and state holding most of its members; text cells (plan too small, not enough data) are counted and never imputed; CAHPS cut points are approximate because CMS also tests significance; stand-alone drug plans are a separate market and are not included.
SOURCE: CMS Part C and D Star Ratings data tables and CMS monthly enrollment, through Vlada's measure benchmark engine (stars_measure_benchmark@1.0.0).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| years | No | ||
| cohort | No | ||
| family | No | ||
| contract_id | Yes | ||
| rating_year | 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 |