From 02b2e5a22857005bb0fbcf7011f78795e98adb3d Mon Sep 17 00:00:00 2001 From: kert Date: Tue, 17 Nov 2026 17:23:28 -0500 Subject: [PATCH] feat(pay): transcribe the stated anesthesia CFs and Q3014 fees The fence now records the anesthesia conversion factor for the years whose Federal Register figure pairs with the conversion factor already stored, and the Q3014 originating-site fee for 2014 through 2024. CY2020 anesthesia stays blank because the rule prints two figures. The later statutory anesthesia rates are not invented. --- src/pay/bounds.json | 180 +++++++++++++++++++------------------- src/pfs/rules/__init__.py | 101 +++++++++++++++++++-- tests/pfs/test_rules.py | 46 ++++++++++ 3 files changed, 232 insertions(+), 95 deletions(-) diff --git a/src/pay/bounds.json b/src/pay/bounds.json index 295ca14..0324a85 100644 --- a/src/pay/bounds.json +++ b/src/pay/bounds.json @@ -15614,82 +15614,82 @@ "value": null }, { - "high": null, + "high": "22.6765", "integer": false, "item": "pfs.rules.RuleYear", - "kind": "unstated", - "low": null, + "kind": "published", + "low": "22.6765", "name": "anesthesia_cf", - "note": "No separate anesthesia conversion factor transcribed for this year.", + "note": "", "period": "2014", "role": "payment", "rows": null, - "value": null + "value": "22.6765" }, { - "high": null, + "high": "22.6093", "integer": false, "item": "pfs.rules.RuleYear", - "kind": "unstated", - "low": null, + "kind": "published", + "low": "22.6093", "name": "anesthesia_cf", - "note": "No separate anesthesia conversion factor transcribed for this year.", + "note": "", "period": "2015", "role": "payment", "rows": null, - "value": null + "value": "22.6093" }, { - "high": null, + "high": "21.9935", "integer": false, "item": "pfs.rules.RuleYear", - "kind": "unstated", - "low": null, + "kind": "published", + "low": "21.9935", "name": "anesthesia_cf", - "note": "No separate anesthesia conversion factor transcribed for this year.", + "note": "", "period": "2016", "role": "payment", "rows": null, - "value": null + "value": "21.9935" }, { - "high": null, + "high": "22.0454", "integer": false, "item": "pfs.rules.RuleYear", - "kind": "unstated", - "low": null, + "kind": "published", + "low": "22.0454", "name": "anesthesia_cf", - "note": "No separate anesthesia conversion factor transcribed for this year.", + "note": "", "period": "2017", "role": "payment", "rows": null, - "value": null + "value": "22.0454" }, { - "high": null, + "high": "22.1887", "integer": false, "item": "pfs.rules.RuleYear", - "kind": "unstated", - "low": null, + "kind": "published", + "low": "22.1887", "name": "anesthesia_cf", - "note": "No separate anesthesia conversion factor transcribed for this year.", + "note": "", "period": "2018", "role": "payment", "rows": null, - "value": null + "value": "22.1887" }, { - "high": null, + "high": "22.273", "integer": false, "item": "pfs.rules.RuleYear", - "kind": "unstated", - "low": null, + "kind": "published", + "low": "22.273", "name": "anesthesia_cf", - "note": "No separate anesthesia conversion factor transcribed for this year.", + "note": "", "period": "2019", "role": "payment", "rows": null, - "value": null + "value": "22.273" }, { "high": null, @@ -15757,17 +15757,17 @@ "value": null }, { - "high": null, + "high": "20.3178", "integer": false, "item": "pfs.rules.RuleYear", - "kind": "unstated", - "low": null, + "kind": "published", + "low": "20.3178", "name": "anesthesia_cf", - "note": "No separate anesthesia conversion factor transcribed for this year.", + "note": "", "period": "2025", "role": "payment", "rows": null, - "value": null + "value": "20.3178" }, { "high": "20.4976", @@ -17772,147 +17772,147 @@ "value": false }, { - "high": null, + "high": "24.63", "integer": false, "item": "pfs.rules.RuleYear", - "kind": "unstated", - "low": null, + "kind": "published", + "low": "24.63", "name": "telehealth_originating_site_fee", - "note": "Not transcribed for this year.", + "note": "", "period": "2014", "role": "payment", "rows": null, - "value": null + "value": "24.63" }, { - "high": null, + "high": "24.83", "integer": false, "item": "pfs.rules.RuleYear", - "kind": "unstated", - "low": null, + "kind": "published", + "low": "24.83", "name": "telehealth_originating_site_fee", - "note": "Not transcribed for this year.", + "note": "", "period": "2015", "role": "payment", "rows": null, - "value": null + "value": "24.83" }, { - "high": null, + "high": "25.1", "integer": false, "item": "pfs.rules.RuleYear", - "kind": "unstated", - "low": null, + "kind": "published", + "low": "25.1", "name": "telehealth_originating_site_fee", - "note": "Not transcribed for this year.", + "note": "", "period": "2016", "role": "payment", "rows": null, - "value": null + "value": "25.1" }, { - "high": null, + "high": "25.4", "integer": false, "item": "pfs.rules.RuleYear", - "kind": "unstated", - "low": null, + "kind": "published", + "low": "25.4", "name": "telehealth_originating_site_fee", - "note": "Not transcribed for this year.", + "note": "", "period": "2017", "role": "payment", "rows": null, - "value": null + "value": "25.4" }, { - "high": null, + "high": "25.76", "integer": false, "item": "pfs.rules.RuleYear", - "kind": "unstated", - "low": null, + "kind": "published", + "low": "25.76", "name": "telehealth_originating_site_fee", - "note": "Not transcribed for this year.", + "note": "", "period": "2018", "role": "payment", "rows": null, - "value": null + "value": "25.76" }, { - "high": null, + "high": "26.15", "integer": false, "item": "pfs.rules.RuleYear", - "kind": "unstated", - "low": null, + "kind": "published", + "low": "26.15", "name": "telehealth_originating_site_fee", - "note": "Not transcribed for this year.", + "note": "", "period": "2019", "role": "payment", "rows": null, - "value": null + "value": "26.15" }, { - "high": null, + "high": "26.65", "integer": false, "item": "pfs.rules.RuleYear", - "kind": "unstated", - "low": null, + "kind": "published", + "low": "26.65", "name": "telehealth_originating_site_fee", - "note": "Not transcribed for this year.", + "note": "", "period": "2020", "role": "payment", "rows": null, - "value": null + "value": "26.65" }, { - "high": null, + "high": "27.02", "integer": false, "item": "pfs.rules.RuleYear", - "kind": "unstated", - "low": null, + "kind": "published", + "low": "27.02", "name": "telehealth_originating_site_fee", - "note": "Not transcribed for this year.", + "note": "", "period": "2021", "role": "payment", "rows": null, - "value": null + "value": "27.02" }, { - "high": null, + "high": "27.59", "integer": false, "item": "pfs.rules.RuleYear", - "kind": "unstated", - "low": null, + "kind": "published", + "low": "27.59", "name": "telehealth_originating_site_fee", - "note": "Not transcribed for this year.", + "note": "", "period": "2022", "role": "payment", "rows": null, - "value": null + "value": "27.59" }, { - "high": null, + "high": "28.64", "integer": false, "item": "pfs.rules.RuleYear", - "kind": "unstated", - "low": null, + "kind": "published", + "low": "28.64", "name": "telehealth_originating_site_fee", - "note": "Not transcribed for this year.", + "note": "", "period": "2023", "role": "payment", "rows": null, - "value": null + "value": "28.64" }, { - "high": null, + "high": "29.96", "integer": false, "item": "pfs.rules.RuleYear", - "kind": "unstated", - "low": null, + "kind": "published", + "low": "29.96", "name": "telehealth_originating_site_fee", - "note": "Not transcribed for this year.", + "note": "", "period": "2024", "role": "payment", "rows": null, - "value": null + "value": "29.96" }, { "high": "31.01", diff --git a/src/pfs/rules/__init__.py b/src/pfs/rules/__init__.py index aa557f9..1057a6b 100644 --- a/src/pfs/rules/__init__.py +++ b/src/pfs/rules/__init__.py @@ -308,6 +308,18 @@ RULES: dict[int, RuleYear] = { year=2014, conversion_factor=35.8228, cf_segments=_full_year(2014, 35.8228), + # In effect after the statutory patch, matching conversion_factor + # above (not the current-law $17.2283). The CY2015 final rule + # states it: "The anesthesia CF in effect in CY 2014 is $22.6765" + # (79 FR 67743, data/fr_downloads/2014-26183.txt). The CY2015 + # correction reprints $22.6765 as the national average and + # $17.2283 as the figure with statutory increases not applied + # (80 FR 14862, data/fr_downloads/2015-06427.txt). + anesthesia_cf=22.6765, + # HCPCS Q3014. 78 FR 74405 (data/fr_downloads/2013-28696.txt): + # 80 percent of the lesser of the actual charge or $24.63, and + # the history table lists the facility fee as $24.63. + telehealth_originating_site_fee=24.63, federal_register_citation="78 FR 74230", ), 2015: RuleYear( @@ -329,42 +341,99 @@ RULES: dict[int, RuleYear] = { note="MACRA 2015 ยง101 โ€” SGR replacement, effective 7/1/2015", ), ], + # National average CMS carried into CY2016, beside "Conversion + # Factor in effect in CY 2015" $35.9335. The CY2016 correction + # reprints it unchanged (81 FR 12028, + # data/fr_downloads/2016-05054.txt). The pre-MACRA split in the + # CY2015 correction ($22.4968 through March 31, $17.7454 + # thereafter, 80 FR 14861) is the SGR current-law pair, not + # this figure. + anesthesia_cf=22.6093, + # HCPCS Q3014. 79 FR 67602 (data/fr_downloads/2014-26183.txt): + # 80 percent of the lesser of the actual charge or $24.83. + telehealth_originating_site_fee=24.83, federal_register_citation="79 FR 67548", ), 2016: RuleYear( year=2016, conversion_factor=35.8043, cf_segments=_full_year(2016, 35.8043), + # Corrected from the final rule's $22.3309. The correction also + # sets the PFS CF at $35.8043, the conversion_factor above + # (81 FR 12028, data/fr_downloads/2016-05054.txt). The CY2017 + # final rule's anesthesia table starts from this same 21.9935. + anesthesia_cf=21.9935, + # HCPCS Q3014. 80 FR 71065 (data/fr_downloads/2015-28005.txt): + # 80 percent of the lesser of the actual charge or $25.10. The + # CY2017 final rule restates the CY2016 fee as $25.10. + telehealth_originating_site_fee=25.10, federal_register_citation="80 FR 70886", ), 2017: RuleYear( year=2017, conversion_factor=35.8887, cf_segments=_full_year(2017, 35.8887), + # 81 FR 80543 (data/fr_downloads/2016-26668.txt). The prose and + # Table 51 both give 22.0454, beside PFS CF 35.8887. + anesthesia_cf=22.0454, + # HCPCS Q3014. 81 FR 80201: 80 percent of the lesser of the + # actual charge or $25.40. The CY2018 final rule restates the + # CY2017 fee as $25.40. + telehealth_originating_site_fee=25.40, federal_register_citation="81 FR 80170", ), 2018: RuleYear( year=2018, conversion_factor=35.9996, cf_segments=_full_year(2018, 35.9996), + # 82 FR 53344 (data/fr_downloads/2017-23953.txt): "the CY 2018 + # anesthesia conversion factor to be 22.1887", beside PFS CF + # 35.9996. The CY2019 table starts from this same 22.1887. + anesthesia_cf=22.1887, + # HCPCS Q3014. 82 FR 53014: 80 percent of the lesser of the + # actual charge or $25.76. The CY2019 final rule restates the + # CY2018 fee as $25.76. + telehealth_originating_site_fee=25.76, federal_register_citation="82 FR 53976", ), 2019: RuleYear( year=2019, conversion_factor=36.0391, cf_segments=_full_year(2019, 36.0391), + # 83 FR 60027 (data/fr_downloads/2018-24170.txt). The prose and + # Table 93 both give 22.2730, beside PFS CF 36.0391. + anesthesia_cf=22.2730, + # HCPCS Q3014. 83 FR 59498: 80 percent of the lesser of the + # actual charge or $26.15. The CY2020 final rule restates the + # CY2019 fee as $26.15. + telehealth_originating_site_fee=26.15, federal_register_citation="83 FR 59452", ), 2020: RuleYear( year=2020, conversion_factor=36.0896, cf_segments=_full_year(2020, 36.0896), + # HCPCS Q3014. 84 FR 62629 (FR Doc 2019-24086): 80 percent of + # the lesser of the actual charge or $26.65. + telehealth_originating_site_fee=26.65, + # anesthesia_cf stays unset. At 84 FR 63152 the prose says + # 22.2774 and Table 118's result line says 22.2016. The + # January 2020 correction (FR Doc 2019-28005) does not + # resolve the two figures. federal_register_citation="84 FR 62568", ), 2021: RuleYear( year=2021, conversion_factor=34.8931, cf_segments=_full_year(2021, 34.8931, "CAA 2021 3.75% add-on"), + # HCPCS Q3014. The CY2021 final rule text does not restate the + # dollar. The CY2022 NPRM states the assigned rate: "HCPCS code + # Q3014 ... is assigned a rate of $27.02 for CY 2021" + # (86 FR 39236, data/fr_downloads/2021-14973.txt). + telehealth_originating_site_fee=27.02, + # anesthesia_cf stays unset. The CY2021 final rule's 20.0547 + # (85 FR 85000, FR Doc 2020-26815) pairs with PFS CF 32.4085, + # before the CAA 2021 add-on already in conversion_factor. federal_register_citation="85 FR 84472", ), 2022: RuleYear( @@ -372,6 +441,12 @@ RULES: dict[int, RuleYear] = { conversion_factor=34.6062, cf_segments=_full_year(2022, 34.6062), clinical_labor_rate_update=True, + # HCPCS Q3014. 86 FR 65064 (data/fr_downloads/2021-23972.txt): + # the payment amount is $27.59. + telehealth_originating_site_fee=27.59, + # anesthesia_cf stays unset. That rule's 20.9343 pairs with + # PFS CF 33.5983, before the 3 percent increase already in + # conversion_factor (34.6062). federal_register_citation="86 FR 65388", ), 2023: RuleYear( @@ -387,6 +462,12 @@ RULES: dict[int, RuleYear] = { ), clinical_labor_rate_update=True, supply_equipment_price_update=True, + # HCPCS Q3014. 87 FR 69468 (data/fr_downloads/2022-23873.txt): + # the final payment amount is $28.64 (MEI 3.8 percent). + telehealth_originating_site_fee=28.64, + # anesthesia_cf stays unset. That rule's 20.6097 pairs with + # the final-rule PFS CF $33.0607, before the CAA 2023 2.5 + # percent increase already in conversion_factor (33.8872). federal_register_citation="87 FR 69404", ), 2024: RuleYear( @@ -411,6 +492,12 @@ RULES: dict[int, RuleYear] = { ), ], clinical_labor_rate_update=True, + # HCPCS Q3014. 88 FR 78884 (data/fr_downloads/2023-24184.txt): + # the final payment amount is $29.96 (MEI 4.6 percent). + telehealth_originating_site_fee=29.96, + # anesthesia_cf stays unset. That rule's 20.4349 pairs with + # the Jan 1 final-rule CF 32.7442, not the dominant post-CAA + # conversion_factor 33.2875. federal_register_citation="88 FR 78818", ), 2025: RuleYear( @@ -422,9 +509,12 @@ RULES: dict[int, RuleYear] = { 2025, 32.3465, "expiration of CY2024 temporary 2.93% update" ), clinical_labor_rate_update=True, - # Was 29.96 โ€” that is CY2024's fee. CMS's Q3014 history, - # Table A-C1 of the CY2027 final rule (91 FR 71027), gives - # CY2025 = $31.01 (MEI 3.5%). + # 89 FR 98500 (FR Doc 2024-25382): "the CY 2025 anesthesia CF + # to be 20.3178", in the same paragraph as PFS CF 32.3465. + anesthesia_cf=20.3178, + # Was 29.96 โ€” that is CY2024's fee. The CY2025 final rule + # states $31.01 (FR Doc 2024-25382, MEI 3.5%), and Table A-C1 + # of the CY2027 final rule (91 FR 71027) gives the same figure. telehealth_originating_site_fee=31.01, federal_register_citation="89 FR 98452", ), @@ -434,8 +524,9 @@ RULES: dict[int, RuleYear] = { # Anesthesia APM $20.5998, Anesthesia non-APM $20.4976. # `conversion_factor` holds the non-APM standard value # (the default used by most claims); `cf_qp` holds the - # APM standard value. Anesthesia CFs are year-specific - # and not modelled here yet. + # APM standard value. `anesthesia_cf` holds the non-APM + # anesthesia CF. The APM anesthesia CF ($20.5998) has no + # field on RuleYear. year=2026, conversion_factor=33.4009, # non-APM standard cf_qp=33.5675, # APM standard diff --git a/tests/pfs/test_rules.py b/tests/pfs/test_rules.py index 0698023..0aad815 100644 --- a/tests/pfs/test_rules.py +++ b/tests/pfs/test_rules.py @@ -178,6 +178,52 @@ class TestSpecificValues: def test_cy2024_federal_register(self): assert cy2024.federal_register_citation == "88 FR 78818" + @pytest.mark.parametrize( + ("year", "anesthesia_cf"), + [ + (2014, 22.6765), + (2015, 22.6093), + (2016, 21.9935), + (2017, 22.0454), + (2018, 22.1887), + (2019, 22.2730), + (2025, 20.3178), + ], + ) + def test_anesthesia_cf_matches_the_stated_final_rule_figure( + self, year, anesthesia_cf + ): + # The figure that sits next to this registry's conversion factor. + # 2020 is unset: the prose says 22.2774 and Table 118 says 22.2016. + # 2021-2024 are unset: the final-rule anesthesia CF pairs with a + # PFS CF this registry replaced with a later statutory rate. + assert RULES[year].anesthesia_cf == anesthesia_cf + + @pytest.mark.parametrize("year", [2020, 2021, 2022, 2023, 2024]) + def test_anesthesia_cf_stays_unset_when_the_text_does_not_give_the_paid_rate( + self, year + ): + assert RULES[year].anesthesia_cf is None + + @pytest.mark.parametrize( + ("year", "fee"), + [ + (2014, 24.63), + (2015, 24.83), + (2016, 25.10), + (2017, 25.40), + (2018, 25.76), + (2019, 26.15), + (2020, 26.65), + (2021, 27.02), + (2022, 27.59), + (2023, 28.64), + (2024, 29.96), + ], + ) + def test_q3014_fee_is_the_stated_facility_fee(self, year, fee): + assert RULES[year].telehealth_originating_site_fee == fee + def test_2022_clinical_labor_rate_update(self): assert RULES[2022].clinical_labor_rate_update is True