Skip to main content

Overview

These examples demonstrate common analytical patterns using the February 2026 hospital release. All queries use the providers, rates, and V_PROVIDER_RATES view.

Setup

USE DATABASE PRICEMEDIC_CORE_HOSPITAL_HS;
USE SCHEMA SNAPSHOT_FEB_2026;

Example Queries

1. Hospital System Footprint Analysis

Identify the largest hospital systems by provider count and payer coverage.
SELECT
  imputed_ein_name,
  COUNT(DISTINCT npi_number)   AS hospitals,
  COUNT(DISTINCT payer_slug)   AS payers,
  COUNT(DISTINCT network_slug) AS networks,
  COUNT(DISTINCT schedule_id)  AS schedules
FROM providers
GROUP BY imputed_ein_name
ORDER BY hospitals DESC;
Sample Output:
IMPUTED_EIN_NAMEHOSPITALSPAYERSNETWORKSSCHEDULES
PRISMA HEALTH-UPSTATE744438
NEW YORK CITY HEALTH AND HOSPITALS CORPORATION694482
UNIVERSITY OF CALIFORNIA SAN FRANCISCO MEDICAL CENTER685531
CATHOLIC HEALTH INITIATIVES COLORADO425539
Use Case: Market intelligence on which health systems have the widest footprint and payer relationships.

2. Payer Coverage Analysis

Analyze provider footprint by payer to understand market coverage.
SELECT
  payer_slug,
  COUNT(DISTINCT npi_number)  AS npis,
  COUNT(DISTINCT imputed_ein) AS hospital_systems,
  COUNT(DISTINCT schedule_id) AS schedules
FROM providers
GROUP BY payer_slug
ORDER BY npis DESC;
Sample Output:
PAYER_SLUGNPISHOSPITAL_SYSTEMSSCHEDULES
uhc10,0334,9026,956
aetna8,1425,3009,070
cigna6,2634,2663,610
anthem_bcbs_in993657994
bcbs_tx684482517
Use Case: Identify which payers have the broadest provider networks and most comprehensive transparency data.

3. Procedure Rate Benchmarking

Compare institutional rates for knee replacement (CPT 27447) across states.
SELECT
  npi_state,
  COUNT(DISTINCT imputed_ein) as n_eins,
  COUNT(*) AS n_observations,
  ROUND(APPROX_PERCENTILE(negotiated_rate, 0.25), 0) AS p25_rate,
  ROUND(APPROX_PERCENTILE(negotiated_rate, 0.50), 0) AS median_rate,
  ROUND(APPROX_PERCENTILE(negotiated_rate, 0.75), 0) AS p75_rate
FROM V_PROVIDER_RATES
WHERE billing_code      = '27447'
  AND billing_class     = 'institutional'
  AND negotiated_rate   > 100
  AND negotiated_type  != 'percentage'
  AND npi_taxonomy_code LIKE '282N%'  -- General Acute Care Hospitals
GROUP BY npi_state
HAVING COUNT(*) >= 5
ORDER BY npi_state DESC;
Sample Output:
NPI_STATEN_EINSN_OBSERVATIONSP25_RATEMEDIAN_RATEP75_RATE
WY162249,10411,18728,493
WV411,72410,00520,32627,729
WI832,64813,20017,23922,764
WA551,8188,61821,95952,252
VT51014,22816,64017,148
VA623,2308,42017,00926,911
UT231,2166,79523,99832,594
TX33111,6244,4808,67414,522
TN872,7764,7397,66012,857
SD2067610,02013,19418,147
SC418,6029,58418,42929,224
RI101864,5056,76815,150
Use Case: Rate benchmarking - understand regional pricing variations and market positioning.

4. Fee Schedule Extraction

Extract complete fee schedules for a specific provider-payer combination.
SELECT DISTINCT
  payer_slug,
  network_slug,
  billing_code,
  billing_code_modifier,
  negotiated_rate,
  negotiated_type
FROM V_PROVIDER_RATES
WHERE imputed_ein = '390813418'   -- Mayo Clinic Arizona EIN
  AND payer_slug = 'uhc'
ORDER BY billing_code
Sample Output:
PAYER_SLUGNETWORK_SLUGNEGOTIATED_RATENEGOTIATED_TYPEBILLING_CODEBILLING_CODE_MODIFIER
aetnaaetna_exchange_aetna_ppo0fee schedule99202[“55”]
aetnaaetna_exchange_aetna_ppo56fee schedule99202null
aetnaaetna_exchange_aetna_ppo0fee schedule99202[“52”]
aetnaaetna_exchange_aetna_ppo0fee schedule99202[“56”]
aetnaaetna_exchange_aetna_ppo43fee schedule99202null
aetnaaetna_exchange_aetna_ppo32fee schedule99202null
aetnaaetna_exchange_aetna_ppo37fee schedule99202null
aetnaaetna_exchange_aetna_ppo66fee schedule99202null
aetnaaetna_exchange_aetna_ppo50fee schedule99202null
aetnaaetna_exchange_aetna_ppo88fee schedule99203null
Use Case: Quickly pull complete fee schedules to verify negotiated rates.

Tips for Working with PriceMedic Core

  • Filter by negotiated_type: Exclude 'percentage' rates when calculating dollar amount statistics
  • Use taxonomy codes: Filter to specific facility types using npi_taxonomy_code (e.g., 282N% for hospitals)
  • Leverage the view: Use V_PROVIDER_RATES to avoid manual joins between providers and rates
  • Watch for outliers: Apply reasonable min/max filters on negotiated_rate to exclude data errors