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 viaprocedure_code - Inpatient (bill type
111): matches via DRG fromipps_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 type | Examples |
|---|---|
| Anesthesia | Anesthesia time/base codes |
| Lab/Path | Pathology, clinical lab |
| Radiology | Diagnostic imaging, radiation therapy |
| Professional Fee | Surgeon / physician (default) |
Classification uses a priority waterfall applied to each line code:
- Anesthesia reference pricing match — code is in
anesthesia_reference_pricing - CLFS match — code is in
clinical_laboratory_reference_pricing→ Lab/Path - Hardcoded Lab/Path radiology codes — a curated list in
LABPATH_RADIOLOGY_CODES(version.py) → Lab/Path - CCS category — Anesthesia —
services_spines_cleaned.ccs_category = 'Anesthesia'→ Anesthesia - CCS category — Lab/Path —
ccs_categoryIN one of:Laboratory - Chemistry and Hematology,Pathology,Microscopic examination (bacterial smear, culture, toxicology),Other Laboratory→ Lab/Path - CCS category — Radiology (explicit list) —
ccs_categoryIN 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 - CCS category — CT scan wildcard —
ccs_category LIKE '%CT scan%'→ Radiology - Default — uses the
categoryfield fromspines_services_clinical_categories(typicallyProfessional 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:
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:
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:
- Within each NCCI group (mutually exclusive codes): volume-weighted average of commercial rates
- 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
Carve-out add-ons (implants, high-cost drugs) are summed from the
institutional_rc_family_allocation table where is_carveout = TRUE.
Professional Components
| Column | Formula |
|---|---|
primary_price | Primary surgeon / physician fee (from professional fee schedule) |
anes_price | (anesthesiologist share) |
crna_price | (CRNA share) |
assistant_surgeon_price | |
assistant_nonsurgeon_price | |
labpath_price | Lab / pathology fee (direct from professional fee schedule) |
radiology_price | Radiology 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:
New ID Columns
The combined tables also join the new ID crosswalk to attach:
ssp_grouper_id,sub_category_iddisease_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:
Two gating rules control which RC families are carved out:
- Pharmacy: only carved out if
avg_chargeis 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:
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 SSP | Source A | Source B | POS |
|---|---|---|---|
GA.2.colonoscopy_and_egd | GA.0.colonoscopy | GA.0.egd | OP |
Produced by combo_ssps.py. Runs after prices.py.