Skip to main content

Clear Rates

Dialysis Centers in Clear Rates

Source: PR #5128

Steps in provider.sql:

  • Array associated NPIs from the two spines tables to the provider_id level.
dialysis_center_array_npi as (
SELECT
provider_id,
ARRAY_SORT(ARRAY_AGG(DISTINCT cast(npi as varchar))) as npi
FROM (
SELECT provider_id, npi
FROM {{ cld_params.Tables.SPINES_PROVIDER_DIALYSIS_CENTER.value }}
UNION
SELECT provider_id, npi
FROM {{ cld_params.Tables.SPINES_PROVIDER_DIALYSIS_CENTER_ADDITIONAL_NPIS.value }}
)
WHERE npi IS NOT NULL
GROUP BY provider_id
),
  • The dialysis_centers CTE reads directly from the spines table and joins arrayed NPIs, geo lookups (state, CBSA), and NUCC taxonomy. Unlike Labs, there is no Komodo encounter filtering — all spines providers are included.
dialysis_centers AS (
SELECT
p.provider_id,
CASE
WHEN npis.npi[1] IS NULL THEN NULL
ELSE npis.npi
END as npi,
p.provider_name as provider_name,
p.provider_city AS city,
p.provider_state AS state,
p.provider_cbsa_code AS cbsa,
p.provider_parent_system as health_system_name,
p.provider_type as provider_type,
p.taxonomy_code,
p.national_payer_coverage
-- ...
FROM {{ cld_params.Tables.SPINES_PROVIDER_DIALYSIS_CENTER.value }} p
LEFT JOIN dialysis_center_array_npi as npis
ON p.provider_id = npis.provider_id
LEFT JOIN nucc ON p.taxonomy_code = nucc.taxonomy_code
LEFT JOIN geo_state ON p.provider_state = geo_state.state_abbreviation
LEFT JOIN geo_cbsa ON p.provider_cbsa_code = geo_cbsa.cbsa_id
),
  • The result is unioned into the final df CTE alongside hospitals, ASCs, labs, PGs, infusion centers, etc.
  • In lookback runs, Dialysis Centers are excluded from the state filter (same as ASCs and PGs).

Codeset (Rate Object Space)

  • A dedicated dialysis_center_codeset table defines which billing codes are plausible for Dialysis Centers. Codes include:

    • Hemodialysis procedures: 90935, 90936, 90937
    • ESRD monthly management: 9096090966
    • EPO / Erythropoiesis-stimulating agents: J0882, J0885
    • Iron preparations: J1756, J1439, J1437, J1443
    • Vitamin D analogs: J0636, J1270, J2501
  • In the rate object space, Dialysis Center codes are filtered to bill_type = 'Professional' and matched against the codeset:

SELECT DISTINCT
cs.bill_type,
cs.billing_code_type,
cs.billing_code,
cs.facility,
'Dialysis Center' as provider_type,
NULL as provider_subtype,
NULL as provider_id,
'' as billing_code_modifier
FROM {{ schema_name }}.tmp_ref_code_spine_{{ sub_version }} cs
WHERE cs.bill_type = 'Professional'
AND cs.billing_code IN (
SELECT billing_code
FROM {{ cld_params.Tables.DIALYSIS_CENTER_CODESET.value }}
)

Accuracy Scoring

  • Dialysis Centers use the standard medical accuracy scoring method.
  • QA thresholds: minimum 3.0% of providers must have rates (same as Imaging Centers).