# Hospital price comparison mart (answered layer)

`vlada_curated.vw_hospital_comparison_mart` · Hospital price transparency · status live

The precomputed answers compare_hospital_rates reads first (p10 / median / p90, n rows, n hospitals, the Medicare multiple and the cheapest window) per code, state, program and methodology family, built from the comparable surface with the tool's own floors and quarantine list. Each row carries build_id and as_of.

**Grain.** One row per (grain_level, code_system, billing_code, hospital_state, line_of_business, billing_class, methodology family, payer parent) statistic, plus the stored cheapest window rows (grain_level = 'cheapest').

| column | type | meaning |
|---|---|---|
| grain_level | varchar(11) |  |
| code_system | string |  |
| billing_code | string |  |
| line_of_business | string |  |
| billing_class | varchar(18) |  |
| methodology_family | varchar(12) |  |
| methodology_norm | varchar(17) |  |
| payer_parent_name | string |  |
| n_rows | bigint |  |
| n_rows_all | bigint |  |
| n_hospitals | bigint |  |
| n_hospitals_all | bigint |  |
| n_payers | bigint |  |
| n_payers_all | bigint |  |
| n_below_floor | bigint |  |
| p10 | double |  |
| median | double |  |
| p90 | double |  |
| min_rate | double |  |
| max_rate | double |  |
| p10_all | double |  |
| median_all | double |  |
| p90_all | double |  |
| min_all | double |  |
| max_all | double |  |
| median_rate_over_gross | double |  |
| ccn_median | double |  |
| ccn_p10 | double |  |
| ccn_p90 | double |  |
| ccn_n_hospitals | bigint |  |
| ccn_n_hospitals_fully_excluded | bigint |  |
| max_parents_sharing_price | bigint |  |
| max_labels_sharing_price | bigint |  |
| floor_value | double |  |
| floor_multiple | double |  |
| medicare_allowed | double |  |
| medicare_source | varchar(19) |  |
| medicare_year | int |  |
| medicare_bases_json | string |  |
| median_x_medicare | double |  |
| quarantine_hash | varchar(16) |  |
| build_id | varchar(17) |  |
| as_of | varchar(17) |  |
| cheapest_rank | int |  |
| cheapest_bucket | string |  |
| cheapest_k | int |  |
| row_hospital_state | string |  |
| hospital_ccn | string |  |
| hospital_name | string |  |
| payer_name | string |  |
| plan_name | string |  |
| payer_entity_class | string |  |
| plan_product_structure | string |  |
| billing_class_norm | string |  |
| facility_type | string |  |
| comparability_reason | string |  |
| rate | double |  |
| gross_charge | double |  |
| cash_price | double |  |
| hospital_state | string |  |

Tools that read it: compare_hospital_rates

Query it: `query_substrate` with `SELECT ... FROM vlada_curated.vw_hospital_comparison_mart WHERE ... LIMIT 100`; read `describe_data_source("vlada_curated.vw_hospital_comparison_mart")` first.
