Medicare Allowed
medicare_allowedReturns the Medicare allowed amount for ONE billing code (CPT/HCPCS, or an MS-DRG for inpatient) from every Medicare fee schedule that prices it: PFS (professional, national non-facility), OPPS Addendum B (hospital outpatient APC), ASC, CLFS (lab), and IPPS (national DRG amount). Inputs: billing_code (required); optional care_class to pick the setting that fits a site (02_asc, 03_outpatient, 04_urgent_care, 05_imaging, 06_lab, 07_dialysis — the same preference table the care-site price bridge uses for its Medicare floor); optional setting to return one schedule only (PFS_non_facility | OPPS_APC | ASC | CLFS | IPPS_MSDRG_national); optional medicare_year to PIN a schedule vintage (4-digit year; omit it and the LATEST edition held for the chosen schedule is served — an older vintage is never returned unless you pin it); optional limit.
RETURNS a detail payload: value.medicare_year and value.setting state the vintage and schedule actually served; value.summary carries the PREFERRED row for the requested care_class (medicare_allowed, medicare_source, medicare_year, billing_class), the latest year held per schedule (latest_year_by_schedule) and whether the year was pinned or resolved (medicare_year_selection), plus the count of schedules that price the code; value.settings lists EVERY schedule row for the code with what it is (fee_schedule, professional vs facility component, site, national basis, locality_adjusted=false, source_table, medicare_year vintage). Every number is NATIONAL — no GPCI / wage-index localisation is applied, and PFS is the NON-FACILITY (office) professional rate. A code priced on no schedule returns found=false ('not priced on these Medicare schedules', never $0). Reads the latest available edition per schedule (vlada_curated.vw_medicare_benchmark_effective per schedule, so an ASC rate is listed beside the OPPS rate for the same code; the underlying M-2 fact tables are read WHERE is_current).
SOURCE: CMS PFS RVU + conversion factor, OPPS Addendum B, ASC addendum, CLFS, IPPS Table 5 + base rates.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| setting | No | ||
| care_class | No | ||
| billing_code | Yes | ||
| medicare_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 |