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

API-40281-sp-issues-pact-previous-rated-disability #18556

Merged
merged 5 commits into from
Sep 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ def transform_disability_values!(disability)
secondary.except(:exposureOrEventOrInjury, :approximateDate)
end
end
check_for_pact_special_issue(disability)
check_for_pact_special_issue(disability) if disability[:disabilityActionType] != 'INCREASE'

disability.except(:approximateDate, :isRelatedToToxicExposure)
end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,36 @@
end
end

context 'When there are special issues, a PACT disability and INCREASE action type' do
let(:disability) do
{
disabilityActionType: 'INCREASE',
name: 'hypertension',
approximateDate: nil,
classificationCode: '',
serviceRelevance: '',
isRelatedToToxicExposure: true,
exposureOrEventOrInjury: '',
ratedDisabilityId: '',
diagnosticCode: 0,
secondaryDisabilities: nil,
specialIssues: %w[POW EMP]
}
end

it 'maps the special issues attributes correctly and does NOT append PACT' do
form_data['data']['attributes']['disabilities'][0] = disability
auto_claim = create(:auto_established_claim, form_data: form_data['data']['attributes'])
evss_data = ClaimsApi::V2::DisabilityCompensationEvssMapper.new(auto_claim).map_claim[:form526]
includes_pow = evss_data[:disabilities][0][:specialIssues].include? 'POW'
includes_emp = evss_data[:disabilities][0][:specialIssues].include? 'EMP'
includes_pact = evss_data[:disabilities][0][:specialIssues].include? 'PACT'
expect(includes_pow).to eq(true)
expect(includes_emp).to eq(true)
expect(includes_pact).to eq(false)
end
end

context 'When serviceRelevance is blank' do
let(:disability) do
{
Expand Down
Loading