Compare payers' prices for a code
get_code_payers_price_distributionDistribution of a code's price across payers, one figure per payer (how the payers compare), the third view beside get_code_provider_price_distribution (over hospitals) and get_code_payer_price_distribution (over one payer's hospitals). The filter must name every term the group_by grouping keeps, else INVALID_ARGUMENT. Each payer is reduced to one figure over its hospitals (average weighted by rate lines; MEDIAN is the median of the hospitals' averages; MIN/MAX the lowest/highest hospital row). Backed by the hospital-prices serving snapshot; fails with UNAVAILABLE until the server has opened one.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"code_type": "<code_type>",
"code": "<code>"
},
"name": "get_code_payers_price_distribution"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | ||
| state | No | Optional two-letter USPS state code (e.g. "TX", case-insensitive): only hospitals with a location in that state are counted. A hospital in several states counts in each, so state figures can add up to more than national ones. Empty means every hospital; anything that is not a state code is rejected as INVALID_ARGUMENT. | |
| filter | No | Keeps only some of the grouped rows (see group_by). Each field left out matches any value; set a field (even to its *_UNSPECIFIED value, which means 'not filed') to require it. Billing classes are never blended: a facility fee and a professional fee are separate bills. | |
| group_by | No | How a hospital's rates are grouped (default PAYER_GROUP_BY_PER_COMBINATION: per billing class + methodology + setting). The filter must name every term the grouping keeps (PAYER_GROUP_BY_ALL with no filter, PAYER_GROUP_BY_BILLING_CLASS plus a billing_class, PAYER_GROUP_BY_METHODOLOGY plus a methodology, per-combination all three; PAYER_GROUP_BY_ALL_EXCEPT_PER_DIEM is one figure like ALL but without the per diem rows, so a day rate does not pull a stay's price down), else INVALID_ARGUMENT. | |
| bin_count | No | Histogram bars. Defaults to 16, max 200. | |
| code_type | Yes | Code system the billing code belongs to, e.g. APR-DRG, CDM, CPT, HCPCS, MS-DRG, RC. | |
| statistic | No | Which figure to distribute (default average). | |
| reference_price | No | When positive, the response counts how many are priced strictly below it. | |
| min_hospital_count | No | Leave out payers filed by fewer hospitals than this (0 or 1: none). Negative is rejected. | |
| include_class_breakdown | No | Also return `facility` and `professional` (median price over payers and payer_count for each billing class, always both, for a facility-vs-professional comparison in one call). Only answered for a national request (no state, average statistic, min_hospital_count 0/1, a filter naming no methodology or setting); otherwise they are left unset. |