diff --git a/app/models/form_profile.rb b/app/models/form_profile.rb index bfd47678896..08c88a7bd76 100644 --- a/app/models/form_profile.rb +++ b/app/models/form_profile.rb @@ -101,7 +101,8 @@ class FormProfile vre_readiness: ['28-1900'], coe: ['26-1880'], adapted_housing: ['26-4555'], - intent_to_file: ['21-0966'] + intent_to_file: ['21-0966'], + ivc_champva: ['10-7959F-1'] }.freeze FORM_ID_TO_CLASS = { @@ -138,7 +139,8 @@ class FormProfile '22-1990EZ' => ::FormProfiles::VA1990ez, '26-1880' => ::FormProfiles::VA261880, '26-4555' => ::FormProfiles::VA264555, - '21-0966' => ::FormProfiles::VA210966 + '21-0966' => ::FormProfiles::VA210966, + '10-7959F-1' => ::FormProfiles::VA107959f1 }.freeze APT_REGEX = /\S\s+((apt|apartment|unit|ste|suite).+)/i diff --git a/app/models/form_profiles/va_107959f1.rb b/app/models/form_profiles/va_107959f1.rb new file mode 100644 index 00000000000..407f42714c6 --- /dev/null +++ b/app/models/form_profiles/va_107959f1.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class FormProfiles::VA107959f1 < FormProfile + FORM_ID = '10-7959F-1' + + def metadata + { + version: 0, + prefill: true, + returnUrl: '/review-and-submit' + } + end +end diff --git a/config/form_profile_mappings/10-7959F-1.yml b/config/form_profile_mappings/10-7959F-1.yml new file mode 100644 index 00000000000..f9846dcb65e --- /dev/null +++ b/config/form_profile_mappings/10-7959F-1.yml @@ -0,0 +1,22 @@ + +veteran: + date_of_birth: [identity_information, date_of_birth] + full_name: [identity_information, full_name] + first: [identity_information, first] + middle: [identity_information, middle] + last: [identity_information, last] +physical_address: + country: [contact_information, country] + street: [contact_information, street] + city: [contact_information, city] + state: [contact_information, state] + postal_code: [contact_information, postal_code] +mailing_address: + country: [contact_information, country] + street: [contact_information, street] + city: [contact_information, city] + state: [contact_information, state] + postal_code: [contact_information, postal_code] +ssn: [identity_information, ssn] +phone_number: [contact_information, us_phone] +email_address: [contact_information, email] \ No newline at end of file diff --git a/config/settings.yml b/config/settings.yml index b069fd69ac7..c1cd8bdb74f 100644 --- a/config/settings.yml +++ b/config/settings.yml @@ -404,6 +404,9 @@ adapted_housing: intent_to_file: prefill: true +ivc_champva: + prefill: true + # Settings for Expiry Scanner expiry_scanner: slack: diff --git a/spec/models/form_profile_spec.rb b/spec/models/form_profile_spec.rb index f6c9d2ddac8..551afe4a70e 100644 --- a/spec/models/form_profile_spec.rb +++ b/spec/models/form_profile_spec.rb @@ -893,6 +893,35 @@ } end + let(:v10_7959f_1_expected) do + { + 'veteran' => { + 'date_of_birth' => user.birth_date, + 'full_name' => { + 'first' => user.first_name&.capitalize, + 'middle' => user.middle_name&.capitalize, + 'last' => user.last_name&.capitalize + }, + 'physical_address' => { + 'country' => user.address[:country], + 'street' => user.address[:street], + 'city' => user.address[:city], + 'state' => user.address[:state], + 'postal_code' => user.address[:postal_code] + }, + 'mailing_address' => { + 'country' => user.address[:country], + 'street' => user.address[:street], + 'city' => user.address[:city], + 'state' => user.address[:state], + 'postal_code' => user.address[:postal_code] + }, + 'phone_number' => us_phone, + 'email_address' => user.pciu_email + } + } + end + let(:initialize_va_profile_prefill_military_information_expected) do expected_service_episodes_by_date = [ { @@ -1560,6 +1589,7 @@ def expect_prefilled(form_id) 28-1900 26-1880 26-4555 + 10-7959F-1 ].each do |form_id| it "returns prefilled #{form_id}" do VCR.use_cassette('va_profile/military_personnel/service_history_200_many_episodes',