Skip to content
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

adding determination reasons in cv3 payload #4093

Merged
merged 11 commits into from
Aug 13, 2024
4 changes: 2 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ GIT

GIT
remote: https://github.com/ideacrew/aca_entities.git
revision: d277781215e68c15d34d03a71b780c2167ceec35
revision: 47e3f4c2aae75ae713444e71cc5299f67bb6cb33
branch: trunk
specs:
aca_entities (0.10.0)
Expand Down Expand Up @@ -2141,7 +2141,7 @@ GEM
jquery-ui-rails (7.0.0)
railties (>= 3.2.16)
json (2.5.1)
json-schema (4.1.1)
json-schema (4.3.1)
addressable (>= 2.8)
jsonapi-renderer (0.2.2)
jwt (2.2.3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def update_applicants(elig_d, thh_entity)
csr_percent_as_integer: get_csr_value(ped_entity),
is_ia_eligible: ped_entity.is_ia_eligible || false,
is_medicaid_chip_eligible: ped_entity.is_medicaid_chip_eligible || ped_entity.is_magi_medicaid,
is_gap_filling: ped_entity.is_gap_filling,
is_totally_ineligible: ped_entity.is_totally_ineligible,
is_eligible_for_non_magi_reasons: ped_entity.is_eligible_for_non_magi_reasons,
is_non_magi_medicaid_eligible: ped_entity.is_non_magi_medicaid_eligible,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ def update_applicants(elig_d, thh_entity)
csr_percent_as_integer: get_csr_value(ped_entity),
is_ia_eligible: ped_entity.is_ia_eligible,
is_medicaid_chip_eligible: ped_entity.is_medicaid_chip_eligible || ped_entity.is_magi_medicaid,
is_gap_filling: ped_entity.is_gap_filling,
is_totally_ineligible: ped_entity.is_totally_ineligible,
is_eligible_for_non_magi_reasons: ped_entity.is_eligible_for_non_magi_reasons,
is_non_magi_medicaid_eligible: ped_entity.is_non_magi_medicaid_eligible})
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ class Applicant # rubocop:disable Metrics/ClassLength TODO: Remove this
field :is_physically_disabled, type: Boolean
field :is_medicaid_chip_eligible, type: Boolean, default: false
field :is_non_magi_medicaid_eligible, type: Boolean, default: false
field :is_gap_filling, type: Boolean
field :is_totally_ineligible, type: Boolean, default: false
field :is_without_assistance, type: Boolean, default: false
field :has_income_verification_response, type: Boolean, default: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,10 @@
expect(@applicant.csr_eligibility_kind).to eq("csr_limited")
end

it 'should update is_gap_filling' do
expect(@applicant.is_gap_filling).to eq(true)
end

context 'member_determinations' do
before do
ped = response_payload[:tax_households].first[:tax_household_members].first[:product_eligibility_determination]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,10 @@
expect(@applicant.csr_eligibility_kind).to eq("csr_limited")
end

it 'should update is_gap_filling' do
expect(@applicant.is_gap_filling).to eq(true)
end

context 'member_determinations' do
before do
ped = response_payload[:tax_households].first[:tax_household_members].first[:product_eligibility_determination]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
is_incarcerated: false,
net_annual_income: 10_078.90,
is_post_partum_period: false,
is_gap_filling: true,
is_veteran_or_active_military: true)
applicant
end
Expand Down Expand Up @@ -96,6 +97,8 @@
let(:benefit_coverage_period) { hbx_profile.benefit_sponsorship.benefit_coverage_periods.first }

before do
allow(EnrollRegistry).to receive(:feature_enabled?).with(:multiple_determination_submission_reasons).and_return(false)
allow(EnrollRegistry).to receive(:feature_enabled?).and_call_original
allow(HbxProfile).to receive(:current_hbx).and_return hbx_profile
allow(hbx_profile).to receive(:benefit_sponsorship).and_return benefit_sponsorship
allow(benefit_sponsorship).to receive(:current_benefit_period).and_return(benefit_coverage_period)
Expand Down Expand Up @@ -152,6 +155,16 @@
expect(result.value![:applicants].first[:person_hbx_id]).to eq person.hbx_id
end

context "when multiple determination reasons is enabled" do
before :each do
allow(EnrollRegistry).to receive(:feature_enabled?).with(:multiple_determination_submission_reasons).and_return(true)
end

it 'should add additional_reason_codes' do
expect(result.value!.dig(:applicants, 0, :additional_reason_codes)).to eq ["Full Determination", "Gap Filling"]
end
end

context 'application' do
before do
@application = result.success
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
:is_uqhp_eligible => nil,
:is_csr_eligible => true,
is_eligible_for_non_magi_reasons: true,
:is_gap_filling => true,
:csr => "limited",
:is_non_magi_medicaid_eligible => false,
:is_without_assistance => false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ registry:
is_enabled: <%= ENV['AUTOMATIC_SUBMISSION_IS_ENABLED'] || false %>
- key: :optimistic_upstream_coverage_attestation
is_enabled: <%= ENV['OPTIMISTIC_UPSTREAM_COVERAGE_ATTESTATION_IS_ENABLED'] || false %>
- key: :multiple_determination_submission_reasons
is_enabled: <%= ENV['MULTIPLE_DETERMINATION_SUBMISSION_REASONS_IS_ENABLED'] || false %>
- namespace:
- :documents
features:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ registry:
is_enabled: <%= ENV['AUTOMATIC_SUBMISSION_IS_ENABLED'] || false %>
- key: :optimistic_upstream_coverage_attestation
is_enabled: <%= ENV['OPTIMISTIC_UPSTREAM_COVERAGE_ATTESTATION_IS_ENABLED'] || false %>
- key: :multiple_determination_submission_reasons
is_enabled: <%= ENV['MULTIPLE_DETERMINATION_SUBMISSION_REASONS_IS_ENABLED'] || false %>
- namespace:
- :documents
features:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ registry:
is_enabled: <%= ENV['AUTOMATIC_SUBMISSION_IS_ENABLED'] || false %>
- key: :optimistic_upstream_coverage_attestation
is_enabled: <%= ENV['OPTIMISTIC_UPSTREAM_COVERAGE_ATTESTATION_IS_ENABLED'] || false %>
- key: :multiple_determination_submission_reasons
is_enabled: <%= ENV['MULTIPLE_DETERMINATION_SUBMISSION_REASONS_IS_ENABLED'] || false %>
- namespace:
- :documents
features:
Expand Down
Loading