-
Notifications
You must be signed in to change notification settings - Fork 206
Add reported health coverage rule inputs #7821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Added reported current health coverage inputs and ACA/Medicaid coverage reconciliation helpers. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| - name: Case 1, reported Marketplace plus Medicaid conflict is flagged. | ||
| period: 2025 | ||
| input: | ||
| reported_has_marketplace_health_coverage_at_interview: true | ||
| medicaid_enrolled: true | ||
| output: | ||
| coverage_report_model_conflict: true | ||
|
|
||
| - name: Case 2, Marketplace without conflicting coverage is not flagged. | ||
| period: 2025 | ||
| input: | ||
| age: 40 | ||
| medicaid_enrolled: false | ||
| is_chip_eligible: false | ||
| medicare_enrolled: false | ||
| has_esi: false | ||
| reported_has_marketplace_health_coverage_at_interview: true | ||
| output: | ||
| coverage_report_model_conflict: false | ||
|
|
||
| - name: Case 3, non-Marketplace coverage without reported Marketplace is not flagged. | ||
| period: 2025 | ||
| input: | ||
| reported_has_non_marketplace_direct_purchase_health_coverage_at_interview: true | ||
| output: | ||
| coverage_report_model_conflict: false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| - name: Case 1, Medicaid enrollment counts as qualifying non-Marketplace coverage. | ||
| period: 2025 | ||
| input: | ||
| medicaid_enrolled: true | ||
| output: | ||
| has_qualifying_non_marketplace_health_coverage_at_interview: true | ||
|
|
||
| - name: Case 2, IHS-only coverage does not count as qualifying non-Marketplace coverage. | ||
| period: 2025 | ||
| input: | ||
| age: 40 | ||
| medicaid_enrolled: false | ||
| is_chip_eligible: false | ||
| medicare_enrolled: false | ||
| has_esi: false | ||
| reported_has_indian_health_service_coverage_at_interview: true | ||
| output: | ||
| has_qualifying_non_marketplace_health_coverage_at_interview: false | ||
|
|
||
| - name: Case 3, off-exchange coverage counts as qualifying non-Marketplace coverage. | ||
| period: 2025 | ||
| input: | ||
| reported_has_non_marketplace_direct_purchase_health_coverage_at_interview: true | ||
| output: | ||
| has_qualifying_non_marketplace_health_coverage_at_interview: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| - name: Case 1, reported Medicaid coverage feeds current Medicaid receipt. | ||
| period: 2026 | ||
| input: | ||
| reported_has_medicaid_health_coverage_at_interview: true | ||
| output: | ||
| receives_medicaid: true | ||
|
|
||
| - name: Case 2, Medicaid receipt defaults to false without a reported flag. | ||
| period: 2026 | ||
| input: | ||
| reported_has_medicaid_health_coverage_at_interview: false | ||
| output: | ||
| receives_medicaid: false |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| from policyengine_us.model_api import * | ||
|
|
||
|
|
||
| class coverage_report_model_conflict(Variable): | ||
| value_type = bool | ||
| entity = Person | ||
| label = "Reported Marketplace coverage conflicts with modeled qualifying non-Marketplace coverage" | ||
| definition_period = YEAR | ||
|
|
||
| def formula(person, period, parameters): | ||
| return person( | ||
| "reported_has_marketplace_health_coverage_at_interview", | ||
| period, | ||
| ) & person( | ||
| "has_qualifying_non_marketplace_health_coverage_at_interview", | ||
| period, | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| from policyengine_us.model_api import * | ||
|
|
||
|
|
||
| class has_qualifying_non_marketplace_health_coverage_at_interview(Variable): | ||
| value_type = bool | ||
| entity = Person | ||
| label = "Person has qualifying non-Marketplace health coverage at interview" | ||
| definition_period = YEAR | ||
|
|
||
| def formula(person, period, parameters): | ||
| return ( | ||
| add( | ||
| person, | ||
| period, | ||
| [ | ||
| "has_esi", | ||
| "medicaid_enrolled", | ||
| "is_chip_eligible", | ||
| "medicare_enrolled", | ||
| "reported_has_non_marketplace_direct_purchase_health_coverage_at_interview", | ||
| "reported_has_other_means_tested_health_coverage_at_interview", | ||
| "reported_has_tricare_health_coverage_at_interview", | ||
| "reported_has_champva_health_coverage_at_interview", | ||
| "reported_has_va_health_coverage_at_interview", | ||
| ], | ||
| ) | ||
| > 0 | ||
| ) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. one variable per file |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,124 @@ | ||
| from policyengine_us.model_api import * | ||
|
|
||
|
|
||
| class ReportedHealthCoverageAtInterview: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. frame around reality not surveys. what insurance do they have at the moment? |
||
| value_type = bool | ||
| entity = Person | ||
| definition_period = YEAR | ||
| default_value = False | ||
|
|
||
|
|
||
| class reported_has_direct_purchase_health_coverage_at_interview( | ||
| ReportedHealthCoverageAtInterview, Variable | ||
| ): | ||
| label = "Reported direct-purchase health coverage at interview" | ||
|
|
||
|
|
||
| class reported_has_marketplace_health_coverage_at_interview( | ||
| ReportedHealthCoverageAtInterview, Variable | ||
| ): | ||
| label = "Reported Marketplace health coverage at interview" | ||
|
|
||
|
|
||
| class reported_has_subsidized_marketplace_health_coverage_at_interview( | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. isnt this a formula? marketplace + aca_ptc>0? but we should just remove it |
||
| ReportedHealthCoverageAtInterview, Variable | ||
| ): | ||
| label = "Reported subsidized Marketplace health coverage at interview" | ||
|
|
||
|
|
||
| class reported_has_unsubsidized_marketplace_health_coverage_at_interview( | ||
| ReportedHealthCoverageAtInterview, Variable | ||
| ): | ||
| label = "Reported unsubsidized Marketplace health coverage at interview" | ||
|
|
||
|
|
||
| class reported_has_non_marketplace_direct_purchase_health_coverage_at_interview( | ||
| ReportedHealthCoverageAtInterview, Variable | ||
| ): | ||
| label = "Reported non-Marketplace direct-purchase health coverage at interview" | ||
|
|
||
|
|
||
| class reported_has_employer_sponsored_health_coverage_at_interview( | ||
| ReportedHealthCoverageAtInterview, Variable | ||
| ): | ||
| label = "Reported employer-sponsored health coverage at interview" | ||
|
|
||
|
|
||
| class reported_has_medicare_health_coverage_at_interview( | ||
| ReportedHealthCoverageAtInterview, Variable | ||
| ): | ||
| label = "Reported Medicare health coverage at interview" | ||
|
|
||
|
|
||
| class reported_has_medicaid_health_coverage_at_interview( | ||
| ReportedHealthCoverageAtInterview, Variable | ||
| ): | ||
| label = "Reported Medicaid health coverage at interview" | ||
|
|
||
|
|
||
| class reported_has_means_tested_health_coverage_at_interview( | ||
| ReportedHealthCoverageAtInterview, Variable | ||
| ): | ||
| label = "Reported means-tested health coverage at interview" | ||
|
|
||
|
|
||
| class reported_has_chip_health_coverage_at_interview( | ||
| ReportedHealthCoverageAtInterview, Variable | ||
| ): | ||
| label = "Reported CHIP health coverage at interview" | ||
|
|
||
|
|
||
| class reported_has_other_means_tested_health_coverage_at_interview( | ||
| ReportedHealthCoverageAtInterview, Variable | ||
| ): | ||
| label = "Reported other means-tested health coverage at interview" | ||
|
|
||
|
|
||
| class reported_has_tricare_health_coverage_at_interview( | ||
| ReportedHealthCoverageAtInterview, Variable | ||
| ): | ||
| label = "Reported TRICARE health coverage at interview" | ||
|
|
||
|
|
||
| class reported_has_champva_health_coverage_at_interview( | ||
| ReportedHealthCoverageAtInterview, Variable | ||
| ): | ||
| label = "Reported CHAMPVA health coverage at interview" | ||
|
|
||
|
|
||
| class reported_has_va_health_coverage_at_interview( | ||
| ReportedHealthCoverageAtInterview, Variable | ||
| ): | ||
| label = "Reported VA health coverage at interview" | ||
|
|
||
|
|
||
| class reported_has_indian_health_service_coverage_at_interview( | ||
| ReportedHealthCoverageAtInterview, Variable | ||
| ): | ||
| label = "Reported Indian Health Service coverage at interview" | ||
|
|
||
|
|
||
| class reported_has_private_health_coverage_at_interview( | ||
| ReportedHealthCoverageAtInterview, Variable | ||
| ): | ||
| label = "Reported private health coverage at interview" | ||
|
|
||
|
|
||
| class reported_has_public_health_coverage_at_interview( | ||
| ReportedHealthCoverageAtInterview, Variable | ||
| ): | ||
| label = "Reported public health coverage at interview" | ||
|
|
||
|
|
||
| class reported_is_insured_at_interview(ReportedHealthCoverageAtInterview, Variable): | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this would be a formula right |
||
| label = "Reported insured at interview" | ||
|
|
||
|
|
||
| class reported_is_uninsured_at_interview(ReportedHealthCoverageAtInterview, Variable): | ||
| label = "Reported uninsured at interview" | ||
|
|
||
|
|
||
| class reported_has_multiple_health_coverage_at_interview( | ||
| ReportedHealthCoverageAtInterview, Variable | ||
| ): | ||
| label = "Reported multiple health coverage types at interview" | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use adds