Skip to main content

Methodology


Step 0 -- SSP Groupings with Tier Multipliers

The raw crosswalk (ssp_initial_pilot_codes_and_xwalk) is enriched with RII-based tier multipliers. For inpatient SSPs that have sub-categories coded as - (indicating tier-based splitting), each tier's average intensity score is pulled from rii_code_tiers and converted into a multiplier.

Multipliers center around 1.0. The spread of multipliers across tiers is calibrated using the DRG canonical-rate spread for that SSP -- wider DRG spread produces a wider multiplier range.

A multiplier of 1.0 means the tier is priced at the base weighted average; values greater than 1 scale up, values less than 1 scale down. Sub-categories that already have explicit codes (non--) receive no multiplier.

The result is stored in ssp_groupings.


Step 0b -- Line Code Discovery

Three tables consolidate line codes used by the pricing pipeline.

manual_institutional_line_codes

Claims-derived facility fee codes not in sub_package_contents. For each anchor code, the script finds other procedure codes co-occurring on the same institutional encounters:

  • Outpatient (bill type 131): matches via procedure_code
  • Inpatient (bill type 111): matches via DRG from ipps_grouper_drgs

Codes appearing on more than 30% of encounters for that anchor are kept (encounter_proportion greater than 30%). Each base code is also included as its own line code. Combo SSP-specific line codes are hardcoded.

manual_professional_line_codes

Claims-derived professional codes. For each anchor code, finds institutional visits, then discovers professional claims on the same visit. Codes appearing on more than 30% of encounters (relative to the most common code) are kept. Ancillary codes (anesthesia, radiology, lab/path) from the institutional line codes are mirrored to the professional side to ensure parity. Combo SSP-specific line codes are also hardcoded.

supplemented_sub_package_contents

Consolidates sub_package_contents (from tq_production.standard_service_packages) with both manual line-code tables into a single unified source of line codes.

Shared exclusions across all three tables:

  • Codes with Medicare rate less than $10
  • Pairs already in sub_package_contents
  • Globally excluded line codes (venipuncture codes)

Step 1 -- Revenue Code Family Proportions

Association rates are computed per (ssp_grouper, revenue_code_family) from claims data. Each SSP's anchor code defines a reference revenue code (RC) family; proportions are normalized so the anchor code's RC family equals 1.0.

These proportions are used later in Step 5 (Charge Allocation) to split the institutional price across RC families.


Step 2 -- Line Code Tables

institutional_line_codes

One row per (ssp_grouper, sub_category, pos, base_code, line_code, provider_id). Combines sub_package_contents (Facility Fee), manual_institutional_line_codes, and DRG anchor codes. Includes metadata such as:

  • Revenue code family allocation (from Step 1)
  • Carve-out identification (implants, high-cost drugs)

professional_line_codes

One row per (ssp_grouper, sub_category, pos, base_code, line_code, fee_type, provider_id). Contains benchmark (commercial) rates, Medicare rates, service type classification, and NCCI group assignment for each line code.

Line codes are filtered to those where association_rate IS NULL OR association_rate > ENCOUNTER_THRESHOLD (threshold = 0.3). This removes codes that appear on fewer than 30% of encounters relative to the most common code, retaining only codes that are commonly co-billed with the anchor. Codes with no association rate (e.g., codes originating from sub_package_contents rather than claims discovery) are always kept.

ancillary_provider_types

Classifies professional line codes into service types:

Service typeExamples
AnesthesiaAnesthesia time/base codes
Lab/PathPathology, clinical lab
RadiologyDiagnostic imaging, radiation therapy
Professional FeeSurgeon / physician (default)

Classification uses a priority waterfall applied to each line code:

  1. Anesthesia reference pricing match — code is in anesthesia_reference_pricing
  2. CLFS match — code is in clinical_laboratory_reference_pricing → Lab/Path
  3. Hardcoded Lab/Path radiology codes — a curated list in LABPATH_RADIOLOGY_CODES (version.py) → Lab/Path
  4. CCS category — Anesthesiaservices_spines_cleaned.ccs_category = 'Anesthesia' → Anesthesia
  5. CCS category — Lab/Pathccs_category IN one of: Laboratory - Chemistry and Hematology, Pathology, Microscopic examination (bacterial smear, culture, toxicology), Other Laboratory → Lab/Path
  6. CCS category — Radiology (explicit list)ccs_category IN one of: Other diagnostic radiology and related techniques, Magnetic resonance imaging, Other diagnostic ultrasound, Therapeutic radiology, Diagnostic ultrasound of heart (echocardiogram), Other CT scan, Radioisotope scan and function studies → Radiology
  7. CCS category — CT scan wildcardccs_category LIKE '%CT scan%' → Radiology
  8. Default — uses the category field from spines_services_clinical_categories (typically Professional Fee)

Step 3 -- Fee Schedules

Institutional Fee Schedule

For each (ssp_grouper, sub_category, pos, provider_id), the institutional price is a volume-weighted average of commercial canonical rates across codes, scaled by the tier multiplier from Step 0:

subcategory_price=multiplier×iratei×volumeiivolumei\text{subcategory\_price} = \text{multiplier} \times \frac{\sum_i \text{rate}_i \times \text{volume}_i}{\sum_i \text{volume}_i}

Sub-category prices are then rolled up to the SSP grouper level using the same volume-weighted average, where each sub-category's weight is its total volume:

ssp_grouper_price=jsubcategory_pricej×volumejjvolumej\text{ssp\_grouper\_price} = \frac{\sum_j \text{subcategory\_price}_j \times \text{volume}_j}{\sum_j \text{volume}_j}

Medicare rates use reference pricing (IPPS for inpatient, OPPS for outpatient) and are selected from the highest-volume code using MAX_BY.

Professional Fee Schedule

Professional fee pricing uses NCCI-aware aggregation:

  1. Within each NCCI group (mutually exclusive codes): volume-weighted average of commercial rates
  2. Across NCCI groups: rates are summed (codes in different groups can be billed together)

This produces separate price columns by service type (Professional Fee, Anesthesia, Lab/Path, Radiology). The same subcategory-to-SSP rollup applies.


Step 4 -- Combined Tables

prices.py joins institutional and professional fee schedules on (ssp_grouper, sub_category, pos, provider_id) and computes the final output columns.

Institutional

inst_price=institutional_base+carveout_addons\text{inst\_price} = \text{institutional\_base} + \text{carveout\_addons}

Carve-out add-ons (implants, high-cost drugs) are summed from the institutional_rc_family_allocation table where is_carveout = TRUE.

Professional Components

ColumnFormula
primary_pricePrimary surgeon / physician fee (from professional fee schedule)
anes_price0.50×full_anesthesia_fee0.50 \times \text{full\_anesthesia\_fee} (anesthesiologist share)
crna_price0.50×full_anesthesia_fee0.50 \times \text{full\_anesthesia\_fee} (CRNA share)
assistant_surgeon_price0.16×primary_price0.16 \times \text{primary\_price}
assistant_nonsurgeon_price0.136×primary_price0.136 \times \text{primary\_price}
labpath_priceLab / pathology fee (direct from professional fee schedule)
radiology_priceRadiology fee (direct from professional fee schedule)

Total Professional

prof_price is the sum of all non-facility components. Because anes_price and crna_price each represent 50% of the full anesthesia fee, the total uses the full (100%) anesthesia fee so the two halves are not double-counted:

prof_price=primary+anesthesia100%+labpath+radiology+asst_surgeon+asst_nonsurgeon\text{prof\_price} = \text{primary} + \text{anesthesia}_{100\%} + \text{labpath} + \text{radiology} + \text{asst\_surgeon} + \text{asst\_nonsurgeon}

New ID Columns

The combined tables also join the new ID crosswalk to attach:

  • ssp_grouper_id, sub_category_id
  • disease_area, parent_description, consumer_description

Step 5 -- Charge Allocation

institutional_rc_family_allocation splits the institutional price across revenue code (RC) families using the proportions from Step 1.

Base RC families (non-carve-out) are normalized so their proportions sum to 1.0. The institutional price is distributed proportionally across these families.

Carve-out RC families are additive on top of the base price:

carveout_amount=avg_line_charge×0.50\text{carveout\_amount} = \text{avg\_line\_charge} \times 0.50

Two gating rules control which RC families are carved out:

  • Pharmacy: only carved out if avg_charge is greater than $2,000
  • Med/Surg Supplies: only carved out if the line code is labeled Carved Out: Implant

Step 6 -- Combo SSPs

Combo SSPs combine two existing SSPs using multiple procedure logic:

combo_price=1.0×primary_price+0.5×secondary_price\text{combo\_price} = 1.0 \times \text{primary\_price} + 0.5 \times \text{secondary\_price}

The primary SSP is the one with the higher inst_price (per provider); the secondary is the lower-priced SSP. This mirrors the multiple procedure payment reduction commonly applied in claims processing.

Combo SSPs are inserted directly into the existing combined output tables (combined_ssp_fee_schedule and combined_subcategory_fee_schedule). The subcategory table receives a single row with sub_category = '0' (no sub-category breakdown).

The combo naming convention uses segment 2 (e.g., GA.2.colonoscopy_and_egd) to distinguish combo SSPs from standard SSPs (segment 0).

Combo SSPSource ASource BPOS
GA.2.colonoscopy_and_egdGA.0.colonoscopyGA.0.egdOP

Produced by combo_ssps.py. Runs after prices.py.