Multiple Anchor Procedures on a Facility Claim
Date: 2026-04-20
Source tables (all in tq_dev.internal_dev_csong_ssp):
medical_headers_bothmedical_service_lines_bothallowed_amounts_bothssp_groupings_v3— anchor codes per SSP
Question
For three sample SSPs — bronchoscopy, colonoscopy, and upper endoscopy (EGD) —
how many facility claims carry more than one anchor-code procedure, and for each such
anchor, is there a matching row in allowed_amounts_both?
Scope & filters
- Facility OP claims only:
medical_headers_both.claim_pos = 'OP'andbill_type_code LIKE '13%'. - Service-line
year >= 2024(consistent with the SSP pricing pipeline). - A "multiple anchor" claim is one
encounter_keywith >=2 distinct anchor CPTs on its service lines (medical_service_lines_both.procedure_code). - Anchor codes come from
ssp_groupings_v3for:PU.0.bronchoscopy— 14 CPTs: 31622, 31623, 31624, 31625, 31628, 31629, 31635, 31640, 31641, 31645, 31646, 31652, 31653, 31660GA.0.colonoscopy— 21 CPTs: 44388–44404, 45378–45392, G0105, G0121GA.0.egd— 24 CPTs: 43235–43270
Allowed-amount join
allowed_amounts_both has no revenue_code column — its procedure_code
can hold either a CPT/HCPCS or a 4-digit revenue code (57.9M of the 4.5B 2024+
rows are 4-digit numeric). So for each (encounter, anchor_code, revenue_code)
service line we join twice via a single OR:
LEFT JOIN allowed_amounts_both aa
ON aa.encounter_key = sl.encounter_key
AND aa.year >= 2024
AND (aa.procedure_code = sl.anchor_code -- CPT match
OR aa.procedure_code = sl.revenue_code) -- rev-code match
Per-line flag:
| Flag | Meaning |
|---|---|
has_allowed_by_cpt | there's an allowed_amounts_both row on that encounter whose procedure_code equals the CPT anchor |
The OR branch on revenue_code is kept in the join for completeness (the SSP
pipeline's semantics allow rev-code-level allowed amounts), but it fires 0×
for our three SSPs — see Key findings — so no per-line
by_rc flag is reported.
Headline numbers (2024+, OP facility claims only)
Multi-anchor encounter counts
| SSP | Total facility encs with ≥1 anchor | Multi-anchor encs (≥2 distinct) | % multi | 3+ anchors |
|---|---|---|---|---|
GA.0.colonoscopy | 3,765,200 | 608,079 | 16.2% | 56,298 |
GA.0.egd | 2,461,986 | 326,973 | 13.3% | 23,437 |
PU.0.bronchoscopy | 228,427 | 126,946 | 55.6% | 73,284 |
Bronchoscopy claims bundle multiple anchors more than half the time. Many bronchoscopy anchor CPTs are "add-on" style (e.g. 31625 biopsy, 31628 transbronchial biopsy, 31645/31646 therapeutic aspiration) billed alongside the diagnostic base (31622/31623/31624).
Allowed-amount coverage across multi-anchor encs
Computed over every (encounter_key, anchor_code) line in multi-anchor encounters.
| SSP | Anchor lines | CPT match | Any match | Encs: all anchors allowed | Encs: none allowed | Encs: partial |
|---|---|---|---|---|---|---|
GA.0.colonoscopy | 1,325,861 | 33.2% | 33.2% | 170,969 (28%) | 376,505 (62%) | 60,605 (10%) |
GA.0.egd | 695,256 | 28.6% | 28.6% | 59,494 (18%) | 196,436 (60%) | 71,043 (22%) |
PU.0.bronchoscopy | 389,860 | 24.2% | 24.2% | 18,507 (15%) | 74,474 (59%) | 33,965 (27%) |
Column definitions
- Anchor lines — count of
(encounter_key, anchor_code)pairs across every multi-anchor encounter for the SSP. An encounter with 3 distinct anchors contributes 3 anchor lines. - CPT match — share of anchor lines where
allowed_amounts_bothhas a row on the same encounter withprocedure_code = anchor_code. - Any match — share of anchor lines matched by the full OR join (CPT or revenue code). Equal to CPT match here because the rev-code branch fires 0× in this slice; kept as a separate column so the metric generalises to other SSPs where rev-code-level allowed amounts do surface.
- Encs: all anchors allowed — encounters where every anchor line has an "Any match" hit. These are cases where the allowed-amount table attributes a payment to each distinct anchor CPT on the claim.
- Encs: none allowed — encounters where no anchor line gets any match. The encounter itself may still have allowed-amount rows (e.g. on non-anchor procedure codes or revenue codes), but none tied to the anchors we're pricing.
- Encs: partial — encounters where some anchors match and others don't — the ambiguous middle where an SSP-level allowed amount can't be cleanly assembled from the per-anchor rows.
Key findings
- Only ~25–33% of anchor-code lines on a multi-anchor encounter have a matching
allowed_amounts_bothrow by CPT. Even when a claim carries multiple anchors, most anchors don't surface an allowed amount. - The revenue-code branch of the union fires 0× in this slice.
allowed_amounts_bothdoes contain 4-digit numeric codes overall (see "Allowed-amount join" above), but for this set of facility claims the(encounter_key, revenue_code)pairs don't match. - Partial coverage is common — 10–27% of multi-anchor encs have an allowed amount for some anchors but not others. That's the population where the joined allowed amount can't be cleanly attributed to the encounter as a whole.
- The majority (59–62%) of multi-anchor encs have no allowed amount on any of the anchor-code lines.
Examples
150 distinct encounters (50 per SSP, 383 rows total) are available as a downloadable TSV:
Columns: ssp_grouper, visit_id, encounter_key, bill_type_code, hco_1_npi,
claim_date, anchor_code, revenue_code, line_charge, units,
has_allowed_by_cpt, allowed_by_cpt.
Colonoscopy — example encounters
| encounter_key (prefix) | claim_date | anchor | rev | line_charge | by_cpt? | allowed_by_cpt |
|---|---|---|---|---|---|---|
00000c5e… | 2024-04-05 | 44389 | 0750 | 4,119.00 | 1 | 676.68 |
00000c5e… | 2024-04-05 | 44394 | 0750 | 3,780.00 | 0 | — |
00002b09… | 2025-03-31 | 45380 | 0750 | — | 0 | — |
00002b09… | 2025-03-31 | 45385 | 0750 | — | 0 | — |
00003f20… | 2024-05-10 | 45380 | 0750 | 2,970.00 | 0 | — |
00003f20… | 2024-05-10 | 45385 | 0750 | 3,780.00 | 0 | — |
00003f20… | 2024-05-10 | 45388 | 0750 | 3,555.00 | 0 | — |
000055e8… | 2024-10-07 | 45380 | 0750 | 1,614.00 | 1 | 1,614.00 |
000055e8… | 2024-10-07 | 45385 | 0750 | 1,614.00 | 1 | 1,614.00 |
0000bb05… | 2024-01-24 | 45380 | 0750 | 2,127.00 | 1 | 2,127.00 |
0000bb05… | 2024-01-24 | 45385 | 0750 | 2,127.00 | 1 | 2,127.00 |
First encounter 00000c5e… is a clean case: 44389 (with biopsy) gets an allowed
amount but the add-on 44394 does not. 000055e8… and 0000bb05… are cases where
every anchor line has its own allowed amount.
EGD — example encounters
| encounter_key (prefix) | claim_date | anchor | rev | line_charge | by_cpt? | allowed_by_cpt |
|---|---|---|---|---|---|---|
000008f8… | 2024-10-07 | 43237 | 0750 | 2,357.68 | 0 | — |
000008f8… | 2024-10-07 | 43239 | 0750 | 2,357.66 | 0 | — |
00008e6a… | 2025-08-11 | 43239 | — | — | 0 | — |
00008e6a… | 2025-08-11 | 43249 | — | — | 0 | — |
00013d9d… | 2025-03-10 | 43239 | 0750 | 9,540.00 | 1 | 43.05 |
00013d9d… | 2025-03-10 | 43244 | 0750 | 12,228.00 | 1 | 43.05 |
Bronchoscopy — example encounters
| encounter_key (prefix) | claim_date | anchor | rev | line_charge | by_cpt? | allowed_by_cpt |
|---|---|---|---|---|---|---|
0000011e… | 2024-03-04 | 31624 | 0750 | 2,973.25 | 1 | 1,486.62 |
0000011e… | 2024-03-04 | 31645 | 0750 | 0.00 | 0 | — |
00001695… | 2024-12-05 | 31624 | — | — | 0 | — |
00001695… | 2024-12-05 | 31628 | — | — | 0 | — |
00001695… | 2024-12-05 | 31629 | — | — | 1 | 6,489.71 |
000056c2… | 2024-12-10 | 31629 | 0361 | 6,285.48 | 1 | 3,771.29 |
000056c2… | 2024-12-10 | 31653 | 0750 | 25,849.68 | 1 | 15,509.81 |
Pattern across all three SSPs: base-diagnostic codes (31622/31623/31624, 43235/43239, 45378/45380) more often surface an allowed amount than therapeutic add-ons (31625/31628/31645, 43247/43255, 44394).
Reproducibility
The query first materialises a helper table of all (encounter, anchor)
line-level rows, then samples 50 multi-anchor encounters per SSP and attaches
allowed-amount flags.
-- Step 1: materialise facility anchor lines
CREATE TABLE tq_dev.internal_dev_csong_ssp.tmp_mp_fal AS
WITH anchors AS (
SELECT DISTINCT ssp_grouper, code AS anchor_code
FROM tq_dev.internal_dev_csong_ssp.ssp_groupings_v3
WHERE ssp_grouper IN ('PU.0.bronchoscopy','GA.0.colonoscopy','GA.0.egd')
AND type = 'CPT'
)
SELECT DISTINCT
a.ssp_grouper,
mh.visit_id,
msl.encounter_key,
mh.bill_type_code,
mh.hco_1_npi,
mh.claim_date,
msl.procedure_code AS anchor_code,
msl.revenue_code,
msl.line_charge,
msl.units
FROM tq_dev.internal_dev_csong_ssp.medical_headers_both mh
JOIN tq_dev.internal_dev_csong_ssp.medical_service_lines_both msl
ON mh.encounter_key = msl.encounter_key
AND msl.year >= 2024
JOIN anchors a ON msl.procedure_code = a.anchor_code
WHERE mh.claim_pos = 'OP'
AND mh.year >= 2024
AND mh.bill_type_code LIKE '13%';
-- Step 2: sample 50 multi-anchor encs per SSP and attach allowed flags
WITH multi_anchor_encs AS (
SELECT ssp_grouper, encounter_key
FROM tq_dev.internal_dev_csong_ssp.tmp_mp_fal
GROUP BY 1, 2
HAVING COUNT(DISTINCT anchor_code) >= 2
),
ranked_encs AS (
SELECT ssp_grouper, encounter_key,
ROW_NUMBER() OVER (PARTITION BY ssp_grouper ORDER BY encounter_key) AS rn
FROM multi_anchor_encs
),
sampled_encs AS (
SELECT ssp_grouper, encounter_key FROM ranked_encs WHERE rn <= 50
),
sampled_lines AS (
SELECT fal.*
FROM tq_dev.internal_dev_csong_ssp.tmp_mp_fal fal
JOIN sampled_encs s
ON fal.ssp_grouper = s.ssp_grouper
AND fal.encounter_key = s.encounter_key
)
SELECT
sl.ssp_grouper, sl.visit_id, sl.encounter_key, sl.bill_type_code,
sl.hco_1_npi, sl.claim_date, sl.anchor_code, sl.revenue_code,
sl.line_charge, sl.units,
MAX(CASE WHEN aa.procedure_code = sl.anchor_code THEN 1 ELSE 0 END) AS has_allowed_by_cpt,
MAX(CASE WHEN aa.procedure_code = sl.anchor_code THEN aa.allowed_amount END) AS allowed_by_cpt
FROM sampled_lines sl
LEFT JOIN tq_dev.internal_dev_csong_ssp.allowed_amounts_both aa
ON sl.encounter_key = aa.encounter_key
AND aa.year >= 2024
AND (aa.procedure_code = sl.anchor_code OR aa.procedure_code = sl.revenue_code)
GROUP BY 1,2,3,4,5,6,7,8,9,10
ORDER BY ssp_grouper, encounter_key, anchor_code;
DROP TABLE tq_dev.internal_dev_csong_ssp.tmp_mp_fal;
Aggregate allowed-amount coverage (the numbers in the second headline table)
WITH multi_anchor_encs AS (
SELECT ssp_grouper, encounter_key
FROM tq_dev.internal_dev_csong_ssp.tmp_mp_fal
GROUP BY 1, 2
HAVING COUNT(DISTINCT anchor_code) >= 2
),
per_anchor AS (
SELECT
fal.ssp_grouper, fal.encounter_key, fal.anchor_code, fal.revenue_code,
MAX(CASE WHEN aa.procedure_code = fal.anchor_code THEN 1 ELSE 0 END) AS has_cpt,
MAX(CASE WHEN aa.procedure_code = fal.revenue_code THEN 1 ELSE 0 END) AS has_rc
FROM tq_dev.internal_dev_csong_ssp.tmp_mp_fal fal
JOIN multi_anchor_encs m
ON fal.ssp_grouper = m.ssp_grouper AND fal.encounter_key = m.encounter_key
LEFT JOIN tq_dev.internal_dev_csong_ssp.allowed_amounts_both aa
ON fal.encounter_key = aa.encounter_key
AND aa.year >= 2024
AND (aa.procedure_code = fal.anchor_code OR aa.procedure_code = fal.revenue_code)
GROUP BY 1, 2, 3, 4
),
per_enc AS (
SELECT
ssp_grouper, encounter_key,
COUNT(*) AS n_anchors,
SUM(has_cpt) AS n_cpt_matched,
SUM(has_rc) AS n_rc_matched,
SUM(CASE WHEN has_cpt = 1 OR has_rc = 1 THEN 1 ELSE 0 END) AS n_any_matched
FROM per_anchor
GROUP BY 1, 2
)
SELECT
ssp_grouper,
COUNT(*) AS n_multi_anchor_encs,
SUM(n_anchors) AS n_anchor_lines,
ROUND(1.0 * SUM(n_cpt_matched) / SUM(n_anchors), 3) AS pct_anchors_with_cpt_match,
ROUND(1.0 * SUM(n_rc_matched) / SUM(n_anchors), 3) AS pct_anchors_with_rc_match,
ROUND(1.0 * SUM(n_any_matched) / SUM(n_anchors), 3) AS pct_anchors_with_any_match,
COUNT_IF(n_any_matched = n_anchors) AS encs_all_anchors_allowed,
COUNT_IF(n_any_matched = 0) AS encs_no_anchors_allowed,
COUNT_IF(n_any_matched > 0 AND n_any_matched < n_anchors) AS encs_partial_anchors_allowed
FROM per_enc
GROUP BY 1
ORDER BY 1;