Skip to content

Conversation

@daphnehanse11
Copy link
Collaborator

Fixes #6366

@codecov
Copy link

codecov bot commented Dec 16, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (9739e2f) to head (c8ca502).
⚠️ Report is 17 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##             main     #6995       +/-   ##
============================================
+ Coverage   76.92%   100.00%   +23.07%     
============================================
  Files           1         7        +6     
  Lines          39       118       +79     
  Branches        4         0        -4     
============================================
+ Hits           30       118       +88     
+ Misses          8         0        -8     
+ Partials        1         0        -1     
Flag Coverage Δ
unittests 100.00% <100.00%> (+23.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@daphnehanse11
Copy link
Collaborator Author

PR Review: Oregon Healthier Oregon Program

🔴 Critical (Must Fix)

  1. Reference doesn't corroborate value

    • File: child_income_limit.yaml
    • Issue: Neither reference (OHA page, OPB article) mentions the 305% FPL threshold
    • Fix: Add KFF or healthinsurance.org reference that explicitly states 305% FPL
  2. Hard-coded age thresholds in cost calculation

    • File: or_healthier_oregon_cost.py:46-47
    • Current: is_child = age < 19 and age >= 65
    • Fix: Use child_max_age parameter instead of hard-coded 19; create parameter for 65

🟡 Should Address

  1. Reference improvements needed

    • adult_income_limit.yaml: OHA page doesn't explicitly state 138% FPL (OPB does)
    • child_max_age.yaml: Reference page doesn't state age 18 threshold
    • in_effect.yaml: HB 3352 PDF link returns binary data
  2. Missing boundary tests

    • Adult at 139% FPL (just above limit)
    • Child at exactly 305% FPL
    • Age 18→19 transition with income between 138-305% FPL (cliff effect)
  3. Missing immigration status tests

    • DACA_TPS (combined status)
    • ASYLEE, DEPORTATION_WITHHELD (should be ineligible)
  4. Missing benefit calculation tests

    • Child cost rate
    • Aged/disabled cost rate (age 65+)
    • SSI recipient cost rate

🟢 Suggestions

  1. Add or_healthier_oregon_income_eligible.yaml unit test file
  2. Consider using period.this_year explicitly for age access

Validation Summary

Check Result
Regulatory Accuracy ✅ All values verified correct
Reference Quality 2 issues (child_income_limit critical)
Code Patterns 2 hard-coded values
Test Coverage 4 gaps identified
CI Status ✅ All passing

Verified Correct

  • ✅ Program effective date: July 1, 2023
  • ✅ Adult income limit: 138% FPL
  • ✅ Child income limit: 305% FPL
  • ✅ Child max age: 18
  • ✅ Immigration statuses covered
  • ✅ Vectorized operations
  • ✅ Variable naming conventions
  • ✅ StateCode.OR usage

Suggested Reference Updates

child_income_limit.yaml:

reference:
  - title: KFF - Oregon CHIP Income Eligibility at 305% FPL
    href: https://www.kff.org/medicaid/state-indicator/medicaid-and-chip-income-eligibility-limits-for-children-as-a-percent-of-the-federal-poverty-level/

child_max_age.yaml:

reference:
  - title: Oregon Health Authority - OHP Application (children ages 0-18)
    href: https://www.oregon.gov/oha/hsd/ohp/pages/apply.aspx

Next Steps

To auto-fix issues: /fix-pr 6995

Or address manually:

  1. Update references to corroborate values
  2. Replace hard-coded 19/65 with parameters
  3. Add boundary tests for income and age transitions

🤖 Generated with Claude Code

- Update child_income_limit.yaml with KFF and healthinsurance.org refs
  that explicitly corroborate 305% FPL value
- Update child_max_age.yaml with OHP Apply page ref (states ages 0-18)
- Add healthinsurance.org ref to adult_income_limit.yaml
- Replace hard-coded age < 19 with child_max_age parameter in cost file
- Add comment explaining federal age 65 threshold
- Add income boundary tests (139%, 305%, 306% FPL)
- Add age cliff effect tests (18→19 transition)
- Add DACA_TPS and ASYLEE immigration status tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@daphnehanse11
Copy link
Collaborator Author

Fixes Applied

🔴 Critical Issues Fixed

  • child_income_limit.yaml: Added KFF and healthinsurance.org references that explicitly state 305% FPL
  • or_healthier_oregon_cost.py: Replaced hard-coded age < 19 with age <= p.child_max_age parameter

🟡 Should-Address Issues Fixed

  • child_max_age.yaml: Updated reference to OHP Apply page (explicitly states ages 0-18)
  • adult_income_limit.yaml: Added healthinsurance.org reference (explicitly states 138% FPL)
  • ✅ Added 8 boundary tests for income limits (139%, 305%, 306% FPL)
  • ✅ Added 4 age cliff effect tests (18→19 transition with income between limits)
  • ✅ Added DACA_TPS and ASYLEE immigration status tests

Verification

  • ✅ All 28 tests pass
  • ✅ Code formatted with black
  • ✅ References now corroborate all parameter values

Ready for re-review.


🤖 Generated with Claude Code

@daphnehanse11 daphnehanse11 marked this pull request as ready for review December 22, 2025 21:15
daphnehanse11 and others added 2 commits December 22, 2025 16:18
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Separate into one file per variable

- Split or_healthier_oregon_cost.py into separate files (one per variable)
- Create or_healthier_oregon_group variable for clarity in cost calculation
- Convert immigration status eligibility to use list parameter with np.isin()
- Simplify is_child assignment (remove intermediate variable)
- Update parameter descriptions to use active voice

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@daphnehanse11
Copy link
Collaborator Author

Fixes Applied

Review Comments Addressed

  1. ✅ Separated cost file into one variable per file

    • or_healthier_oregon_cost.py - Contains only the cost wrapper variable
    • or_healthier_oregon_cost_if_enrolled.py - Contains the cost calculation
  2. ✅ Broke out cost formula into multiple variables

    • Created or_healthier_oregon_group.py - New variable that determines MedicaidGroup based on demographics (child, aged/disabled, expansion adult, etc.)
    • Simplified or_healthier_oregon_cost_if_enrolled to use this new group variable
  3. ✅ Made immigration status a list parameter

    • Created qualified_immigration_statuses.yaml parameter with list: UNDOCUMENTED, DACA, TPS, DACA_TPS
    • Refactored or_healthier_oregon_immigration_status_eligible.py to use np.isin() pattern
  4. ✅ Simplified is_child assignment

    • Changed from child_max_age = p.child_max_age; is_child = age <= child_max_age
    • To: is_child = age <= p.child_max_age
  5. ✅ Updated parameter descriptions to use active voice

    • adult_income_limit: "Oregon Healthier Oregon sets this income limit for adults as a percentage of FPL"
    • child_income_limit: "Oregon Healthier Oregon sets this income limit for children as a percentage of FPL"
    • child_max_age: "Oregon Healthier Oregon considers children up to this age eligible for the higher income limit"

Verification

  • ✅ All 28 tests pass
  • ✅ Code formatted with black

🤖 Generated with Claude Code

daphnehanse11 and others added 2 commits December 23, 2025 10:37
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
metadata:
unit: /1
period: year
label: OR Healthier Oregon adult income limit (% FPL)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
label: OR Healthier Oregon adult income limit (% FPL)
label: Oregon Healthier Oregon adult income limit (% FPL)

And other label in parameter.

@@ -0,0 +1,15 @@
description: Oregon Healthier Oregon sets this income limit for adults as a percentage of FPL
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
description: Oregon Healthier Oregon sets this income limit for adults as a percentage of FPL
description: Oregon limits gross income to this share of the federal poverty level for adults under the Healthier Oregon program.

And other description in parameter.
Bring complete: country-models: parameter-architect agent to fix it.


- name: Undocumented adult gets healthcare benefit value
period: 2024
absolute_error_margin: 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
absolute_error_margin: 1
absolute_error_margin: 0.1

The test should still pass

from policyengine_us.model_api import *


class or_healthier_oregon_cost_if_enrolled(Variable):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Same comment as DC's. Definitely worth it to break out the spending logic in medicaid_cost_if_enrolled to avoid duplicates.

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.

Add Oregon Medicaid for immigrants as separate program

3 participants