Get one payer's price distribution for a code
get_code_payer_price_distributionDistribution (min/p10/q1/median/q3/p90/max, std dev, histogram, nearest hospital per percentile) of one payer's rate for a (code_type, code) across hospitals, one figure per hospital; the payer-specific counterpart to get_code_provider_price_distribution. The filter must name every term the group_by grouping keeps, else INVALID_ARGUMENT. Pass plan_slug (from list_payer_plans) to distribute one plan's rates alone; MEDIAN is then only valid with PAYER_GROUP_BY_PER_COMBINATION. 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>",
"payer_slug": "<payer_slug>"
},
"name": "get_code_payer_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. | |
| plan_slug | No | Optional plan_slug from list_payer_plans: distribute that plan's rates alone (hospitals not filing the plan are left out). Empty means the payer as a whole. | |
| statistic | No | Which figure to distribute (default average). | |
| payer_slug | Yes | A payer_slug from list_payers or list_code_payers, e.g. "aetna". | |
| reference_price | No | When positive, the response counts how many are priced strictly below it. |