Skip to content

Correct Rhode Island pregnancy Medicaid routing and postpartum coverage - #10391

Open
hua7450 wants to merge 23 commits into
mainfrom
fix-ri-pregnancy-medicaid-pathways
Open

hua7450 wants to merge 23 commits into
mainfrom
fix-ri-pregnancy-medicaid-pathways

Conversation

@hua7450

@hua7450 hua7450 commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Fixes #10390. Stacked on #10365 and targeting fix-chip-pregnant-income-limit-dates.

Correct Rhode Island's pregnancy Medicaid/CHIP insurance split and preserve postpartum coverage based on qualifying eligibility during the completed pregnancy. Continuation survives income changes and another pregnancy, and lasts through the last day of the month in which the 12-month postpartum period (beginning on the last day of pregnancy) ends, including across leap years.

During pregnancy, an otherwise eligible citizen at 230% FPL qualifies for Medicaid with third-party insurance and standard pregnancy CHIP when uninsured. During postpartum continuation, the original standard CHIP pathway stays CHIP; the model prevents simultaneous CHIP and Medicaid enrollment and respects take-up choices.

Authority and behavior

  • 210-RICR-30-00-1 §1.6(A)(2)(a)-(b), (B) supplies the ordinary 190% Medicaid standard, the insured 253% standard, and the uninsured CHIP pathway. Stored limits include the five percentage point disregard (195% and 258%). Existing employer, individual-market, Medicare, TRICARE and CHAMPVA inputs represent third-party coverage without a dependency on Medicaid enrollment; the list is the parameter gov.states.ri.eohhs.medicaid.third_party_coverage (§ 1.9(B)(1) defines third-party liability). The insured route appears in the rule only from its August 17, 2025 version; earlier years rest on the section 1115 demonstration's Budget Population 6b (pages 3 and 15) and are unverified estimates.
  • R.I. Gen. Laws §42-12.3-3(g) bases full postpartum benefits on qualifying pregnancy-time eligibility, including retroactive eligibility, and continues them through the last day of the month in which the twelve-month postpartum period ends. Current income and a subsequent pregnancy do not terminate that entitlement. The statute does not say when the period begins; the code follows 42 U.S.C. 1396a(e)(16), which covers state plans and waivers, and RI-22-0024 (page 7), which start it on the last day of pregnancy. Only the 1115 approval's wording for Budget Populations 6a and 6b ("end of the 12th month following the end of the pregnancy") gives one more month when a pregnancy ends on the 1st; the state plan groups, CHIP (RI-22-0025 CS27), RIte Start and FCEP have no conflicting text. source_conflicts/candidates.yaml records this as the unreviewed candidate us-ri:medicaid-postpartum-end-month.
  • RI-22-0024: the approval letter (page 2) confirms October 1, 2022 for Medicaid's extension, and section B (page 7) starts the 12-month period on the last day of pregnancy. A monthly RI parameter retains that exact effective date.
  • RI-22-0025, CS27 preserves separate CHIP through the postpartum period despite changed circumstances, including becoming eligible for Medicaid. An independent CHIP continuation flag preserves CHIP enrollment and prevents duplicate Medicaid enrollment. Medicaid remains available when eligible applicants take it up and decline CHIP.
  • RI-22-0026, approval letter provides FCEP postpartum benefits through a Title XXI health services initiative (HSI). The fiscal correction gives Rhode Island's postpartum continuation no Title XIX match unless the pregnancy was covered by Medicaid and the enrollee meets Medicaid immigration requirements. RIte Start serves any person "who lacks health insurance coverage for maternity care and who is not eligible for medical assistance under Title XIX ... and Title XXI ... of the Social Security Act" (§ 42-12.3-3(b)), and CHIP and FCEP pregnancies are Title XXI coverage. It does not calculate HSI funding or assert that all federal participation is zero. Limitation: the zero match overrides any federally matched group the person also meets, such as a new pregnancy at or below 195% FPL, SSI or the adult expansion.

Required history and calendar inputs

Two new annual person inputs record facts the old day-count flags cannot establish:

  • ri_pregnancy_coverage: qualifying pregnancy history (MEDICAID, CHIP, RITE_START, FCEP, or NONE). Eligibility may be established retroactively. The default NONE does not infer prior eligibility from current income or current take-up.
  • ri_medicaid_pregnancy_end_date: the last completed pregnancy's end date. A newborn is not required; miscarriage and termination use the same calendar rule.

The shared monthly continuation calculation requires established history, a completed pregnancy and current RI residence. Its exclusive endpoint is the month after the month of (end date minus one day) plus 12 months; for example, a pregnancy ending January 1, 2023 is covered through December 2023, and one ending January 2, 2024 through January 2025. Missing history/date does not activate the continuation, but the existing day-count route (count_days_postpartum below the state's postpartum_coverage) still applies in every state, Rhode Island included. Without a pregnancy-history input (microdata has none), Rhode Island falls back to that day count, as other states do; #10241 sets it to 365 days from October 1, 2022. When history is NONE the model cannot tell "no qualifying coverage" from "unknown", so the day-count proxy can over-cover. This PR does not impute history in microdata.

The generic count_days_postpartum input and formula are unchanged. The mother/newborn fixture still derives the newborn's infinity default and verifies distinct enrollment.

Related work and remaining scope

The duplicate change to the federal postpartum day-count parameter has been removed. #10241 can continue dating that parameter for all states independently; RI's new calendar calculation does not use its 365-day proxy, while the day-count route does. General standard-CHIP postpartum work remains in #10363.

Merge order: #10241 (merged), then #10365, then this PR. #10363 also appends cases to is_chip_eligible_standard_pregnant_person.yaml, so whichever merges second renumbers.

After #10365 merges:

The new monthly flags are evaluated at each month's start. Existing annual national eligibility variables read January's flag; this PR does not convert all Medicaid/CHIP outputs to monthly periods. Tests exercise the actual September/October 2022 boundary directly through the monthly calculation. Full Title XIX/Title XXI/HSI funding allocation after a later immigration-status change remains outside this eligibility correction.

Validation

Law-derived YAML cases cover income increases and decreases, false/missing history, all prior-program choices, another pregnancy, citizens and undocumented residents, month-end expiry, leap years, October 2022, state controls, CHIP retention, enrollment separation, take-up choices, and the identified Medicaid matching exclusion. Existing pregnancy, CHIP/FCEP, immigration, enrollment and FMAP cases are checked as well.

The initial legal counterexamples failed on the previous draft. The new tests were written independently from the legal sources before implementing the continuation calculation.

At f0f8add67d, before the review fixes, 142 policy YAML cases and 4 input-definition checks passed locally across the focused pregnancy, Medicaid, CHIP/FCEP, immigration, enrollment and federal-share suites.

A local review on 2026-10-26 found two critical issues (coverage one month too long for pregnancies ending on the 1st; Rhode Island dropping the day-count postpartum route), two should-address items and three suggestions. Commit adcd687fdc fixes all of them, changes the expectations of four existing cases and adds one federal-share case; those cases were checked by hand and not run locally, and CI validates them. 5ed53099cc merges #10365's updated branch, which includes main. 4cab49cd24 keeps is_medicaid_eligible.yaml Case 17 stable under either day count (person 3 is now 400 days postpartum), gives CHIP-history and Medicaid-history-without-status continuations no Title XIX match with one new federal-share case, and narrows the source-conflict candidate; these were checked by hand and not run locally. 1c78751418 merges #10365's head ae4dc7a828, which includes main with #10241, and renumbers this PR's is_pregnant_for_medicaid.yaml cases from 17-23 to 34-40. No Rhode Island expectation changes: the day count is 60 days until October 1, 2022 and 365 days after, which the cases already assumed; this was checked by hand and not run locally. 799601471e merges #10365's head 2bdcd57d5c, which records the Kentucky source-conflict ruling and the latest main; it changes no Medicaid, CHIP or Rhode Island files. ruff format and check pass. No partner contract test files are edited.

axiom: TheAxiomFoundation/rulespec-us#1935 queued

hua7450 and others added 4 commits October 21, 2026 17:10
…n amendments

Kentucky's CHIP pregnancy group starts July 1, 2022 at 218% FPL (KY-21-0001,
907 KAR 4:030). West Virginia's CHIP group and 185% Medicaid standard start
July 1, 2019 (WV-19-0006, WV-19-0004). Colorado, New Jersey and Rhode Island
store the disregard-inclusive CHIP limits from 2018, Colorado's FCEP option
starts January 1, 2025, and Rhode Island's Medicaid pregnancy limit stays at
195% FPL.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hua7450 and others added 5 commits October 22, 2026 17:04
…ources

- Add boundary cases that pin the corrected WV CHIP, WV Medicaid, NJ, RI,
  KY and Colorado FCEP limits on both sides, plus KY 2021 and CO 2019.
- Replace the dead New Jersey notice link with the medicaid.gov 1115
  amendment request and add the current Rhode Island rule version.
- State the five percentage point disregard (42 CFR 435.603(d)(4)) in the
  descriptions, cite the older Colorado rule text and CO-26-0047, and
  explain the January 1 read and the Colorado FCEP end date.
- Assert the Colorado FCEP downstream CHIP result, rename three cases, and
  give each person in Cases 9-11 and 13 their own units.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ription verb, 907 KAR pages

Add the West Virginia Medicaid-to-CHIP hand-off pair with computed income
(Cases 21-22), give the Medicaid pregnancy limit description a verb, and add
file page 3 (the version date) to the 907 KAR 4:030 page list.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ys branch

Keep PR 10365's test cases in place and renumber this branch's appended
Rhode Island cases after them: Cases 23-24 in
is_chip_eligible_standard_pregnant_person.yaml and Cases 17-23 in
is_pregnant_for_medicaid.yaml.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hua7450 and others added 3 commits October 26, 2026 16:57
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t federal share

- End Rhode Island's postpartum continuation in the month in which the
  12-month period beginning on the last day of pregnancy ends (42 U.S.C.
  1396a(e)(16), SPA RI-22-0024), and record the 1115 wording as an
  unreviewed source-conflict candidate.
- Keep the day-count postpartum route in every state and add the Rhode
  Island continuation on top of it.
- Give RIte Start continuations no Title XIX match.
- Move the third-party coverage list to a parameter, cast the months
  parameter, cite the 1115 Budget Population 6b approval, and fix the
  affected tests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sland pathways branch

Keep both sides of source_conflicts/candidates.yaml: main's updated entries and
this branch's us-ri:medicaid-postpartum-end-month candidate.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hua7450 and others added 2 commits October 26, 2026 20:25
…al match, narrow the end-month candidate

- Case 17 person 3 is 400 days postpartum (pregnancy ended 2022-11-27), so the
  case holds whether Rhode Island's postpartum_coverage is 60 or 365 days.
- The continuation's day-count comment no longer assumes 60 days.
- Rhode Island postpartum continuations get no Title XIX match unless the
  pregnancy was covered by Medicaid and the enrollee meets Medicaid
  immigration requirements; add a CHIP-history and an undocumented
  Medicaid-history case.
- Limit the us-ri:medicaid-postpartum-end-month candidate to 1115 Budget
  Populations 6a and 6b.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
907 KAR 4:030 Section 2(1)(b) limits KCHIP Phase III to lawfully present
immigrants, while the KY-21-0001 state plan covers targeted low-income
pregnant individuals at 195-213% FPL. The code follows the state plan;
the candidate awaits a project sign-off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@hua7450
hua7450 marked this pull request as ready for review October 27, 2026 00:44
hua7450 and others added 3 commits October 26, 2026 21:35
Resolve is_pregnant_for_medicaid.yaml by keeping main's postpartum cases
from #10241 and appending this branch's West Virginia cases.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-dates' into fix-ri-pregnancy-medicaid-pathways

Brings in #10365's head ae4dc7a, which includes main with #10241.
is_pregnant_for_medicaid.yaml keeps main's #10241 cases and #10365's West
Virginia cases, followed by this branch's Rhode Island block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Main's #10241 cases now precede the block, so Cases 17-23 become 34-40.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hua7450 and others added 3 commits October 27, 2026 14:55
…ncome-limit-dates

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The candidate is now ruled under agency-breaks-ties and follows gap-fill:
KRS 205.6485 is silent on immigration status, the children's rule has the
same form, and the 2022 impact analysis describes the group by income and
implements the state plan amendment. The example moves to 210% FPL, above
Kentucky's pregnancy Medicaid limit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-dates' into fix-ri-pregnancy-medicaid-pathways

Brings in #10365's head 2bdcd57, which records the Kentucky ruling and
includes the latest main.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
hua7450 and others added 3 commits October 27, 2026 15:42
Brings in the Social Security state backend fix for Core 3.33.13 (#10504).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Brings in main's CI fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y-medicaid-pathways

Brings in main's CI fix.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Base automatically changed from fix-chip-pregnant-income-limit-dates to main October 27, 2026 21:44

@PavelMakarchuk PavelMakarchuk left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Program Review

PR #10391, "Correct Rhode Island pregnancy Medicaid routing and postpartum coverage" (hua7450). Round 1, full review.

IDs: C = critical, SA = should address, G = suggestion.

Paths: under policyengine_us/variables/gov/, S = hhs/chip/is_chip_eligible_standard_pregnant_person.py, FS = hhs/medicaid/costs/medicaid_federal_share.py, ME = hhs/medicaid/eligibility/is_medicaid_eligible.py, FC / NFC = hhs/medicaid/eligibility/categories/pregnant/is_pregnant_for_medicaid_fc.py / _nfc.py, RI/ = states/ri/eohhs/medicaid/. RIP/ = policyengine_us/parameters/gov/states/ri/eohhs/medicaid/; IL = policyengine_us/parameters/gov/hhs/medicaid/eligibility/categories/pregnant/income_limit.yaml; SC = source_conflicts/candidates.yaml. Tests under policyengine_us/tests/policy/baseline/gov/: TS = hhs/chip/is_chip_eligible_standard_pregnant_person.yaml, TP = hhs/medicaid/eligibility/categories/is_pregnant_for_medicaid.yaml, TME = hhs/medicaid/eligibility/is_medicaid_eligible.yaml, TFS = hhs/medicaid/costs/medicaid_federal_share.yaml, TRI = states/ri/eohhs/medicaid/ri_medicaid_postpartum_eligible.yaml. Line numbers refer to the reviewed head.

Source Documents

  • Reviewed head SHA: 0cc897f
  • Mode: full
  • Scope: this PR's own changes (22 files, +1052/-11), measured against #10365's final head 501704d5a5. The analysis ran at 1c78751418. The head then moved only by a merge of #10365's final head, which changed one file in scope (SC, #10365's Kentucky entry). The other 21 files are byte-identical; all checks and fixes were re-run at the head.
  • Rhode Island: R.I. Gen. Laws § 42-12.3-3(b), (g); 210-RICR-30-00-1, version effective August 17, 2025 (S3 PDF, pages 5-7 and 19), and its six earlier versions (2018-2024).
  • CMS (as images): 1115 approvals of 2013 (page 2), March 2024 (page 11), December 2024 (page 6), November 2025 (pages 1, 3, 15); RI-22-0024 (pages 2, 7), RI-22-0025 (page 4), RI-22-0026 (page 2).
  • Federal: 42 U.S.C. 1396a(e)(16), 1396d(b) and (y), 1397jj(b)(1)(C); SHO 21-007 Q3, Q6, Q22.

Branch Status

  • Main merge. #10365 merged by squash (069a10f762) on 2026-10-27, and this PR now targets main. The branch conflicts with main (8ea43422e6) in 3 hunks: the RI references in IL, TS lines 659-795 and TP lines 614-885. In each hunk main's side is empty. Merge main (do not rebase) and keep this PR's side; the three files then equal the reviewed head. Confirm the scope: git diff --stat main...HEAD must list only this PR's 22 files (+1052/-11).
  • CI. No checks have run, because the PR targeted #10365's branch. CI must run and pass after the main merge.
  • #10371 (head f4b4586844) conflicts in one hunk, the return block of S: & ri_insurance_eligible ) | person("ri_chip_postpartum_eligible", period.first_month) against & ~has_disqualifying_coverage ). Pavel's #10371 review expects it. Body item (c) plans to keep & ~has_disqualifying_coverage and the CHIP continuation and drop the RI gate. That passes the tests but leaves an RI coverage gap. SA2 corrects it; the #10371 review repeats plan (c) and needs the same correction.
  • #10363 (head 05526a4381) conflicts in the documentation attribute of S and in 6 hunks of TS. The body names only the renumbering (G2).

What the PR gets right

  • The calendar rule is exact: 52,608 end-date x month checks against an independent 1396a(e)(16) implementation gave 0 mismatches, leap days included.
  • The insured/uninsured split is right in every year tested (2018-2026). The insured route first appears in the rule on August 17, 2025, as the body says.
  • Removing RI's 2023-01-01: 2.58 Medicaid entry matches CMS. There is no dual CHIP and Medicaid enrollment or dependency cycle, and take-up is respected.
  • Of 30 code mutants, 26 fail the tests, 3 are equivalent (G6) and 1 survives (SA3).
  • The references corroborate, and the 1115 end-month wording is recorded honestly in SC. No partner test is edited.

Critical (Must Fix)

C1. The state-funded continuation displaces federally matched routes.

  • Where: FS:37-54 (the zero match is the first select branch); ME:23-25,58, FC:40-45, NFC:18-24 (every history enters eligibility and PREGNANT); S:48,60 and is_chip_fcep_eligible_person.py:73,98 (~is_medicaid_eligible).
  • Evidence (RI 2024, end date 2023-03-07, takes up Medicaid; A, B and E decline CHIP):
Person Head History NONE
A RITE_START, FCEP or CHIP, 120% FPL PREGNANT, share 0 ADULT, 0.9
B RITE_START or CHIP, pregnant, 150% PREGNANT, 0 PREGNANT, 0.5501
C RITE_START or FCEP, pregnant, 230%, uninsured Medicaid, 0, no CHIP CHIP
D FCEP or RITE_START, undocumented, pregnant, 200% Medicaid, 0, no CHIP CHIP FCEP
E CHIP history, SSI recipient SSI, 0 SSI, 0.5501
  • Law: § 42-12.3-3(g) uses state-only funds "only if federal financial participation is not available". § 1.6(A)(2)(d)(1) (PDF page 6) limits the extension to people "not eligible for Medicaid under another Medicaid eligibility category". Under § 1.6(A)(2)(b)(1) and (c), a new pregnancy in the CHIP band is CHIP. 42 U.S.C. 1397jj(b)(1)(C) bars CHIP only for Title XIX eligibility, which a state-funded continuation is not. HSI funds "cannot supplant Medicaid" (RI-22-0026 page 2).
  • CHIP and FCEP histories with no other route rightly get 0 and stay in CHIP (CS27); the fix keeps that.
  • Why CRITICAL: a regulatory mismatch with confirmed wrong values. The "Limitation" note does not save a choice that contradicts a clear rule. Microsimulation is unchanged (history defaults to NONE).
  • Fix (ran: changed files plus new cases 129 passed; Medicaid, CHIP, RI and partner healthcare, read-only, 1,489; pytest 248; ruff clean; the new cases fail at the head). New RI/ri_medicaid_state_funded_postpartum_eligible.py:
from policyengine_us.model_api import *
from policyengine_us.variables.gov.hhs.medicaid.income.medicaid_income_level import (
    medicaid_income_eligible,
)


class ri_medicaid_state_funded_postpartum_eligible(Variable):
    value_type = bool
    entity = Person
    label = "Eligible for Rhode Island postpartum Medicaid outside the pregnancy group"
    documentation = (
        "Rhode Island's 12-month postpartum continuation for people whose "
        "pregnancy was not covered by Medicaid, or who lack Medicaid "
        "immigration status. It does not apply while a new pregnancy "
        "qualifies for Title XXI coverage that the person takes up."
    )
    definition_period = YEAR
    defined_for = StateCode.RI
    reference = (
        "https://webserver.rilegislature.gov/Statutes/TITLE42/42-12.3/42-12.3-3.htm",
        "https://risos-apa-production-public.s3.amazonaws.com/EOHHS/REG_13314_20250728104245127.pdf#page=5",
        "https://www.medicaid.gov/CHIP/Downloads/RI-22-0026.pdf#page=2",
    )

    def formula(person, period, parameters):
        continuation = person("ri_medicaid_postpartum_eligible", period.first_month)
        coverage = person("ri_pregnancy_coverage", period)
        pregnancy_group = (coverage == coverage.possible_values.MEDICAID) & person(
            "is_medicaid_immigration_status_eligible", period
        )
        state = person.household("state_code", period)
        chip_limit = parameters(period).gov.hhs.chip.pregnant.income_limit[state]
        title_xxi_pregnancy = (
            person("is_pregnant", period)
            & medicaid_income_eligible(person, period, parameters, chip_limit)
            & person("takes_up_chip_if_eligible", period)
        )
        return continuation & ~pregnancy_group & ~title_xxi_pregnancy

Edits:

# FC:40-42 and NFC:18-20 (only a Medicaid pregnancy keeps the group, SHO 21-007 Q6)
        coverage = person("ri_pregnancy_coverage", period)
        ri_postpartum_eligible = person(
            "ri_medicaid_postpartum_eligible", period.first_month
        ) & (coverage == coverage.possible_values.MEDICAID)

# ME:23-25
        ri_postpartum_eligible = person(
            "ri_medicaid_state_funded_postpartum_eligible", period
        )

# FS:37-46
        federally_matched_route = (category != categories.NONE) & person(
            "is_medicaid_immigration_status_eligible", period
        )
        no_federal_medicaid_match = (
            person("ri_medicaid_state_funded_postpartum_eligible", period)
            & ~federally_matched_route
        )

In FS:17-18, replace "The zero match applies even if the enrollee also meets another federally matched group." with "An enrollee who also meets a federally matched group keeps that group's match." Delete the body's "Limitation:" sentence. Three expectations change: TP Case 34 is_pregnant_for_medicaid: [false, false], medicaid_category: [NONE, INFANT] (rename it: the parent stays in CHIP outside the pregnancy group); TP Case 38 is_pregnant_for_medicaid: [true, false, false, false]; TFS "RIte Start continuation has no Title XIX match for a citizen" medicaid_category: NONE. New cases (flow-style maps; they parse as block style does):

# TFS, append. 210-RICR-30-00-1 § 1.6(A)(2)(d)(1), PDF page 6.
- name: Rhode Island non-Medicaid pregnancy histories keep the match of a federally matched group the person meets.
  period: 2024
  input:
    people:
      person1: {age: 30, immigration_status: CITIZEN, ri_pregnancy_coverage: RITE_START, ri_medicaid_pregnancy_end_date: "2023-03-07", medicaid_household_size: 2, medicaid_income_level: 1.2, takes_up_medicaid_if_eligible: true}
      person2: {age: 30, immigration_status: CITIZEN, ri_pregnancy_coverage: FCEP, ri_medicaid_pregnancy_end_date: "2023-03-07", medicaid_household_size: 2, medicaid_income_level: 1.2, takes_up_medicaid_if_eligible: true}
      person3: {age: 30, immigration_status: CITIZEN, is_pregnant: true, ri_pregnancy_coverage: RITE_START, ri_medicaid_pregnancy_end_date: "2023-03-07", medicaid_household_size: 2, medicaid_income_level: 1.5, takes_up_medicaid_if_eligible: true}
      person4: {age: 30, immigration_status: CITIZEN, ri_pregnancy_coverage: CHIP, ri_medicaid_pregnancy_end_date: "2023-03-07", is_ssi_recipient_for_medicaid: true, medicaid_household_size: 2, medicaid_income_level: 0.5, takes_up_medicaid_if_eligible: true, takes_up_chip_if_eligible: false}
    households:
      household: {members: [person1, person2, person3, person4], state_code: RI}
  output:
    medicaid_category: [ADULT, ADULT, PREGNANT, SSI_RECIPIENT]
    medicaid_enrolled: [true, true, true, true]
    medicaid_federal_share: [0.9, 0.9, 0.5501, 0.5501]

# TS, append. § 1.6(A)(2)(b)(1), (c); 42 U.S.C. 1397jj(b)(1)(C).
- name: Case 25, a new Rhode Island pregnancy in the CHIP band moves a state-funded continuation to CHIP.
  period: 2024
  input:
    people:
      person1: {age: 30, immigration_status: CITIZEN, is_pregnant: true, ri_pregnancy_coverage: RITE_START, ri_medicaid_pregnancy_end_date: "2023-03-07", medicaid_household_size: 2, medicaid_income_level: 2.3, takes_up_chip_if_eligible: true}
      person2: {age: 30, immigration_status: UNDOCUMENTED, is_pregnant: true, ri_pregnancy_coverage: FCEP, ri_medicaid_pregnancy_end_date: "2023-03-07", medicaid_household_size: 2, medicaid_income_level: 2.0, takes_up_chip_if_eligible: true}
      person3: {age: 30, immigration_status: CITIZEN, is_pregnant: true, ri_pregnancy_coverage: RITE_START, ri_medicaid_pregnancy_end_date: "2023-03-07", medicaid_household_size: 2, medicaid_income_level: 2.3, takes_up_chip_if_eligible: false}
      person4: {age: 30, immigration_status: CITIZEN, is_pregnant: true, ri_pregnancy_coverage: MEDICAID, ri_medicaid_pregnancy_end_date: "2023-03-07", medicaid_household_size: 2, medicaid_income_level: 2.3, takes_up_chip_if_eligible: true}
    households:
      household: {members: [person1, person2, person3, person4], state_code: RI}
  output:
    is_medicaid_eligible: [false, false, true, true]
    is_chip_eligible_standard_pregnant_person: [true, false, false, false]
    is_chip_fcep_eligible_person: [true, true, false, false]
    chip_enrolled: [true, true, false, false]

# New file: ri_medicaid_state_funded_postpartum_eligible.yaml, next to TRI
- name: Case 1, the state-funded continuation covers non-Medicaid histories and Medicaid histories without status.
  period: 2024
  input:
    people:
      person1: {immigration_status: CITIZEN, ri_pregnancy_coverage: RITE_START, ri_medicaid_pregnancy_end_date: "2023-03-07"}
      person2: {immigration_status: CITIZEN, ri_pregnancy_coverage: CHIP, ri_medicaid_pregnancy_end_date: "2023-03-07"}
      person3: {immigration_status: UNDOCUMENTED, ri_pregnancy_coverage: FCEP, ri_medicaid_pregnancy_end_date: "2023-03-07"}
      person4: {immigration_status: UNDOCUMENTED, ri_pregnancy_coverage: MEDICAID, ri_medicaid_pregnancy_end_date: "2023-03-07"}
      person5: {immigration_status: CITIZEN, ri_pregnancy_coverage: MEDICAID, ri_medicaid_pregnancy_end_date: "2023-03-07"}
      person6: {immigration_status: CITIZEN, ri_pregnancy_coverage: RITE_START, ri_medicaid_pregnancy_end_date: "2022-11-27"}
    households:
      household: {members: [person1, person2, person3, person4, person5, person6], state_code: RI}
  output:
    ri_medicaid_state_funded_postpartum_eligible: [true, true, true, true, false, false]

- name: Case 2, a new pregnancy in the CHIP band ends the state-funded continuation only when CHIP is taken up.
  period: 2024
  input:
    people:
      person1: {is_pregnant: true, ri_pregnancy_coverage: RITE_START, ri_medicaid_pregnancy_end_date: "2023-03-07", medicaid_household_size: 2, medicaid_income_level: 2.58, takes_up_chip_if_eligible: true}
      person2: {is_pregnant: true, ri_pregnancy_coverage: RITE_START, ri_medicaid_pregnancy_end_date: "2023-03-07", medicaid_household_size: 2, medicaid_income_level: 2.59, takes_up_chip_if_eligible: true}
      person3: {is_pregnant: true, ri_pregnancy_coverage: RITE_START, ri_medicaid_pregnancy_end_date: "2023-03-07", medicaid_household_size: 2, medicaid_income_level: 2.3, takes_up_chip_if_eligible: false}
    households:
      household: {members: [person1, person2, person3], state_code: RI}
  output:
    ri_medicaid_state_funded_postpartum_eligible: [false, true, true]

Should Address

SA1. The insured route before August 17, 2025 cites a 2026-2030 approval and is labelled "unverified estimates".

  • Where: IL:30-33,122; FC:26-28; the body; SC:6289-6292.
  • Evidence: the code applies the insured split from 2018, but the only 1115 reference covers 2026-2030 (pages 1, 15), and the rule has no insured route before August 17, 2025. In-period approvals exist and match the model in every year tested: 2013-2018, 2019-2024 and the extension through June 30, 2025. No source was found for July 1 to August 16, 2025.
  • Why SA, not C: the cited sources corroborate their own periods, in-period sources exist, and the behavior is correct (as rated for the RI rule-version item in #10365).
  • Fix (ran: TP 40 passed; parameter-key and reference-URL tests passed). Replace IL:30-33 with:
    - title: "210-RICR-30-00-1 § 1.6(A)(2)(a) (version effective August 17, 2025) #page 5"
      href: https://risos-apa-production-public.s3.amazonaws.com/EOHHS/REG_13314_20250728104245127.pdf#page=5
    - title: "Rhode Island 1115 expenditure authorities (December 23, 2013 to December 31, 2018), Budget Population 6b #page 2"
      href: https://www.medicaid.gov/Medicaid-CHIP-Program-Information/By-Topics/Waivers/1115/downloads/ri/Comprehensive-Demonstration/ri-global-consumer-choice-compact-expnditure-auth-12232013-12312018.pdf#page=2
    - title: "Rhode Island 1115 amendment approval (March 21, 2024; 2019 to 2024), Budget Population 6b #page 11"
      href: https://www.medicaid.gov/medicaid/section-1115-demonstrations/downloads/ri-comphnsve-dmnstrtn-aprvl.pdf#page=11
    - title: "Rhode Island 1115 temporary extension (December 12, 2024; through June 30, 2025), Budget Population 6b #page 6"
      href: https://www.medicaid.gov/medicaid/section-1115-demonstrations/downloads/ri-comphnsve-dmnstrtn-tmp-extn-amndmnt.pdf#page=6
    - title: "Rhode Island 1115 approval (November 28, 2025; 2026 to 2030), Budget Population 6b #page 3,15"
      href: https://www.medicaid.gov/medicaid/section-1115-demonstrations/downloads/ri-comp-demo-appvl-11282025.pdf#page=3

At IL:122, replace "(unverified estimates)" with the periods: 1115 Budget Population 6b since 2013 (185-250% FPL before MAGI, 190-253% after), and § 1.6(A)(2)(a)(2) from August 17, 2025. In FC:26-28, use the same five URLs, each with a one-line period comment. In the body, replace "and are unverified estimates" with the source periods. In SC, add the 2024 approval (page 11) as a kind: policy source; it has the same "end of the 12th month" wording.

SA2. The planned #10371 resolution (body item (c)) leaves some RI pregnant applicants with no pathway.

  • Where: body item (c); S:54,62; RIP/third_party_coverage.yaml:3-9.
  • Evidence: item (c) says "all six Rhode Island sources are on the CHIP list". True, but the CHIP list also has VA, other means-tested, Medicaid coverage and the partner-provided aggregate has_health_coverage_other_than_chip. On a copy merged with #10371 and plan (c), an RI citizen, pregnant at 230% FPL, whose only coverage is VA, other means-tested or the aggregate flag gets CHIP at the head and neither CHIP nor Medicaid after the merge. § 1.6(A)(2)(a)(2) and (b)(1) pair the routes: Medicaid with third-party insurance, CHIP without it.
  • Why SA: the code at this head is correct. But the body prescribes this resolution, and as written it removes all coverage for three inputs that get CHIP today.
  • Fix (ran on the merged copy: 9 test files, 161 passed; with C1, 1,424 passed). Replace item (c): keep & ~has_disqualifying_coverage and | person("ri_chip_postpartum_eligible", period.first_month), delete ri_insurance_eligible, and add after #10371's has_disqualifying_coverage line:
        # 210-RICR-30-00-1 § 1.6(A)(2)(a)(2), (b): Medicaid and CHIP use the
        # same third-party list in Rhode Island.
        has_disqualifying_coverage = where(
            state_code == StateCode.RI,
            person("ri_medicaid_has_third_party_coverage", period),
            has_disqualifying_coverage,
        )

Add this case to TS now. It passes at the head, fails with plan (c) and passes with the resolution:

# 210-RICR-30-00-1 § 1.6(A)(2)(a)(2), (b)(1), PDF page 5.
- name: Case 26, Rhode Island pregnant applicants whose only coverage is outside the third-party list stay in standard CHIP.
  period: 2024
  input:
    people:
      person1: {age: 30, is_pregnant: true, immigration_status: CITIZEN, medicaid_household_size: 2, medicaid_income_level: 2.3, has_va_health_coverage_at_interview: true}
      person2: {age: 30, is_pregnant: true, immigration_status: CITIZEN, medicaid_household_size: 2, medicaid_income_level: 2.3, has_other_means_tested_health_coverage_at_interview: true}
      person3: {age: 30, is_pregnant: true, immigration_status: CITIZEN, medicaid_household_size: 2, medicaid_income_level: 2.3, has_health_coverage_other_than_chip: true}
    households:
      household: {members: [person1, person2, person3], state_code: RI}
  output:
    is_medicaid_eligible: [false, false, false]
    is_chip_eligible_standard_pregnant_person: [true, true, true]

SA3. A pregnancy that ends on the first day of the evaluated month is not tested.

  • Where: RI/ri_medicaid_postpartum_eligible.py:32 (pregnancy_end <= reference_date).
  • Evidence: with <, all 125 cases in the changed test files still pass. Annual outputs read January 1, so under < a pregnancy that ends on January 1 loses that year's annual Medicaid.
  • Why SA: a missing edge case for an already-tested variable.
  • Fix (ran: both pass at the head and with C1; both fail under <):
# TRI, append
- name: Case 7, a pregnancy ending on the first day of the evaluated month starts the continuation that month.
  period: 2024
  input:
    state_code: RI
    ri_pregnancy_coverage: MEDICAID
    ri_medicaid_pregnancy_end_date: "2024-01-01"
  output:
    ri_medicaid_postpartum_eligible:
      2024-01: true
      2024-12: true

# TME, append
- name: Case 20, a Rhode Island pregnancy that ends on January 1 keeps Medicaid in that year's annual result.
  period: 2024
  input: {state_code: RI, age: 30, immigration_status: CITIZEN, is_pregnant: false, ri_pregnancy_coverage: MEDICAID, ri_medicaid_pregnancy_end_date: "2024-01-01", medicaid_household_size: 2, medicaid_income_level: 4}
  output:
    is_pregnant_for_medicaid: true
    is_medicaid_eligible: true

Suggestions

G1. Fix the TS:734 comment; the CHIP match after a status change is open. § 42-12.3-3(g) says "without regard to the availability of federal financial participation", not "without federal funds". chip_federal_share.py:19-24 gives an undocumented CHIP-history person 0.68507; FS gives a Medicaid-history person without status 0. Why G: a comment fix, and no source settles the Title XXI match (inconclusive). Fix: use the statute's words in the comment.

G2. Add #10363 to "Related work". Name the documentation conflict in S and the coupling: #10363 makes CHIP read is_pregnant_for_medicaid_nfc, which this PR extends. No wrong outcome was found (CHIP still requires ~is_medicaid_eligible). Why G: process.

G3. Reference precision. Why G: the values are already corroborated.

  • (a) Pin the six other rules.sos.ri.gov/regulations/part/210-30-00-1 links (for example S:25, RIP/third_party_coverage.yaml:16) to the S3 PDF: #page=5 for § 1.6(A)(2)(a)-(b), #page=6 for (c)-(d), #page=7 for § 1.6(B), #page=19 for § 1.9(B)(1).
  • (b) RIP/postpartum_coverage_months.yaml:1 says "beginning on the last day of pregnancy", but statute (g) does not say that. Add the RI-22-0024 section B reference (https://www.medicaid.gov/medicaid/spa/downloads/RI-22-0024.pdf#page=7, title ending "#page 7").
  • (c) Copy the EOHHS, TRICARE and CHAMPVA links from RI/ri_medicaid_has_third_party_coverage.py:12-14 to RIP/third_party_coverage.yaml.
  • (d) At SC:6308-6309, replace "no conflicting text" with the CS27 words "ending on the last day of the 12th month consistent with paragraphs (5) and (16) of section 1902(e)".

G4. Document the inputs. ri_medicaid_pregnancy_end_date and count_days_postpartum describe one event and can disagree (the day count wins by OR). Both new inputs are YEAR (RI/ri_pregnancy_coverage.py:20, RI/ri_medicaid_pregnancy_end_date.py:8), so a 2023-only input gives no continuation in 2024. Why G: documentation. Fix: say so in documentation; use one prefix for both names.

G5. The insured Medicaid limit reuses the CHIP parameter (FC:38-39). § 1.6(B) has one pregnancy row, but a CHIP edit would silently move the Medicaid route. Why G: correct today. Fix: a dedicated RI parameter or a NOTE.

G6. Redundant and dead clauses. FC:35 (state == "RI") & and FS:43 repeat defined_for = StateCode.RI (C1 removes the second). (months > 0) at RI/ri_medicaid_postpartum_eligible.py:30 never decides the result. Why G: no effect on results. Fix (ran: all PR tests pass without each): ri_higher_limit = person("ri_medicaid_has_third_party_coverage", period), and delete (months > 0) &.

G7. Test readability. A URL line splits a sentence above TP Cases 34 and 36 (lines 615-618, 670-675). Why G: readability. Fix: move each URL below its sentence.

Investigated and cleared

  • The October 1, 2022 date and coverage for people already postpartum then (TRI Case 4; SHO 21-007 Q3).
  • #10241's 365-day route stays (TME Case 17), and state gating works (TRI Case 5, TME Case 19).
  • ri_medicaid_has_third_party_coverage encodes RI third-party liability (§ 1.9(B)(1)), not 42 CFR 457.310(b)(2).
  • Partner contract tests: none edited; the partner healthcare suite passes at the head and with C1.

Out of scope / follow-up

  • SHO 21-007 Q22 allows the expansion FMAP for a Medicaid-history person in the adult group; C1 keeps the regular FMAP.
  • Microsimulation: the continuation is inert (history NONE). The income split moves insured RI pregnant people at 196-258% FPL to Medicaid in 2018-2022 and uninsured ones to CHIP from 2023 (size not measured).
  • #10475 tracks the VA question from #10371.

Validation Summary

Check Result
CI No checks at 0cc897fae1; must run and pass after the main merge
Local tests Changed files 125/125; Medicaid + CHIP 895; RI 520; partner healthcare 70 (read-only); pytest 235; ruff clean
Fix runs C1 129, 1,489 and 248 passed. SA1 40. SA2 161, 1,424 with C1. SA3 2, both fail under <
Mutation 30 mutants: 26 caught, 3 equivalent, 1 survivor (SA3)
Merge trials main 3 hunks; #10371 1 hunk in S; #10363 S and TS
PR body Edits for C1, SA1, SA2, G2, head SHAs; axiom: line valid (process note)
Other reviews None

Review Severity: REQUEST_CHANGES

One critical item (C1) and three should-address items (SA1-SA3) are open; under Pavel's criteria any open C or SA item requests changes.

Next Steps

To auto-fix issues: run the fix-pr workflow for this PR.

  1. Merge main (do not rebase), keep this PR's side in the 3 hunks, and confirm the 22-file scope.
  2. Apply C1, then SA1, SA2 (Case 26) and SA3 (Cases 7 and 20).
  3. Take the suggestions that you agree with.
  4. Run make format and the changed test files. Push and wait for CI to pass.
  5. Update the body: delete "Limitation:", replace "unverified estimates" and item (c), add #10363, and update the head SHAs.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants