Skip to content

Commit e600e8d

Browse files
authored
Burials | Move hash keys into appropriate section files (#24847)
* Moved hash keys into appropriate section files
1 parent 8fa380b commit e600e8d

7 files changed

Lines changed: 509 additions & 8 deletions

File tree

modules/burials/lib/burials/pdf_fill/sections/section_01.rb

Lines changed: 125 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,131 @@ module PdfFill
77
# Section I: Veteran Information
88
class Section1 < Section
99
# Section configuration hash
10-
KEY = {}.freeze
10+
KEY = {
11+
'veteranFullName' => { # start veteran information
12+
'first' => {
13+
key: 'form1[0].#subform[82].VeteransFirstName[0]',
14+
limit: 12,
15+
question_num: 1,
16+
question_label: "Deceased Veteran's First Name",
17+
question_text: "DECEASED VETERAN'S FIRST NAME"
18+
},
19+
'middleInitial' => {
20+
key: 'form1[0].#subform[82].VeteransMiddleInitial1[0]',
21+
question_num: 1,
22+
limit: 1,
23+
question_label: "Deceased Veteran's Middle Initial",
24+
question_text: "DECEASED VETERAN'S MIDDLE INITIAL"
25+
},
26+
'last' => {
27+
key: 'form1[0].#subform[82].VeteransLastName[0]',
28+
limit: 18,
29+
question_num: 1,
30+
question_label: "Deceased Veteran's Last Name",
31+
question_text: "DECEASED VETERAN'S LAST NAME"
32+
},
33+
'suffix' => {
34+
key: 'form1[0].#subform[82].Suffix[0]',
35+
question_num: 1,
36+
limit: 0,
37+
question_label: "Deceased Veteran's Suffix",
38+
question_text: "DECEASED VETERAN'S SUFFIX"
39+
}
40+
},
41+
'veteranSocialSecurityNumber' => {
42+
'first' => {
43+
key: 'form1[0].#subform[82].VeteransSocialSecurityNumber_FirstThreeNumbers[0]'
44+
},
45+
'second' => {
46+
key: 'form1[0].#subform[82].VeteransSocialSecurityNumber_SecondTwoNumbers[0]'
47+
},
48+
'third' => {
49+
key: 'form1[0].#subform[82].VeteransSocialSecurityNumber_LastFourNumbers[0]'
50+
}
51+
},
52+
'vaFileNumber' => {
53+
key: 'form1[0].#subform[82].VAFileNumber[0]',
54+
question_num: 3
55+
},
56+
'veteranDateOfBirth' => {
57+
'month' => {
58+
key: 'form1[0].#subform[82].Veterans_DOBmonth[0]',
59+
limit: 2,
60+
question_num: 4,
61+
question_suffix: 'A',
62+
question_label: "Veteran/Claimant's Identification Information > Veteran's Date Of Birth (Mm-Dd-Yyyy)",
63+
question_text: 'VETERAN/CLAIMANT\'S IDENTIFICATION INFORMATION > VETERAN\'S DATE OF BIRTH (MM-DD-YYYY)'
64+
},
65+
'day' => {
66+
key: 'form1[0].#subform[82].Veterans_DOBday[0]',
67+
limit: 2,
68+
question_num: 4,
69+
question_suffix: 'B',
70+
question_label: "Veteran/Claimant's Identification Information > Veteran's Date Of Birth (Mm-Dd-Yyyy)",
71+
question_text: 'VETERAN/CLAIMANT\'S IDENTIFICATION INFORMATION > VETERAN\'S DATE OF BIRTH (MM-DD-YYYY)'
72+
},
73+
'year' => {
74+
key: 'form1[0].#subform[82].Veterans_DOByear[0]',
75+
limit: 4,
76+
question_num: 4,
77+
question_suffix: 'C',
78+
question_label: "Veteran/Claimant's Identification Information > Veteran's Date Of Birth (Mm-Dd-Yyyy)",
79+
question_text: 'VETERAN/CLAIMANT\'S IDENTIFICATION INFORMATION > VETERAN\'S DATE OF BIRTH (MM-DD-YYYY)'
80+
}
81+
},
82+
'deathDate' => {
83+
'month' => {
84+
key: 'form1[0].#subform[82].Veterans_DateOfDeathmonth[0]',
85+
limit: 2,
86+
question_num: 5,
87+
question_suffix: 'A',
88+
question_label: "Veteran/Claimant's Identification Information > Veteran's Date Of Death (Mm-Dd-Yyyy)",
89+
question_text: 'VETERAN/CLAIMANT\'S IDENTIFICATION INFORMATION > VETERAN\'S DATE OF DEATH (MM-DD-YYYY)'
90+
},
91+
'day' => {
92+
key: 'form1[0].#subform[82].Veterans_DateofDeathday[0]',
93+
limit: 2,
94+
question_num: 5,
95+
question_suffix: 'B',
96+
question_label: "Veteran/Claimant's Identification Information > Veteran's Date Of Death (Mm-Dd-Yyyy)",
97+
question_text: 'VETERAN/CLAIMANT\'S IDENTIFICATION INFORMATION > VETERAN\'S DATE OF DEATH (MM-DD-YYYY)'
98+
},
99+
'year' => {
100+
key: 'form1[0].#subform[82].Veterans_DateofDeathyear[0]',
101+
limit: 4,
102+
question_num: 5,
103+
question_suffix: 'C',
104+
question_label: "Veteran/Claimant's Identification Information > Veteran's Date Of Death (Mm-Dd-Yyyy)",
105+
question_text: 'VETERAN/CLAIMANT\'S IDENTIFICATION INFORMATION > VETERAN\'S DATE OF DEATH (MM-DD-YYYY)'
106+
}
107+
},
108+
'burialDate' => {
109+
'month' => {
110+
key: 'form1[0].#subform[82].Veterans_Date_of_Burial_Month[0]',
111+
limit: 2,
112+
question_num: 6,
113+
question_suffix: 'A',
114+
question_label: "Veteran/Claimant's Identification Information > Veteran's Date Of Burial (Mm-Dd-Yyyy)",
115+
question_text: 'VETERAN/CLAIMANT\'S IDENTIFICATION INFORMATION > VETERAN\'S DATE OF BURIAL (MM-DD-YYYY)'
116+
},
117+
'day' => {
118+
key: 'form1[0].#subform[82].Veterans_Date_of_Burial_Day[0]',
119+
limit: 2,
120+
question_num: 6,
121+
question_suffix: 'B',
122+
question_label: "Veteran/Claimant's Identification Information > Veteran's Date Of Burial (Mm-Dd-Yyyy)",
123+
question_text: 'VETERAN/CLAIMANT\'S IDENTIFICATION INFORMATION > VETERAN\'S DATE OF BURIAL (MM-DD-YYYY)'
124+
},
125+
'year' => {
126+
key: 'form1[0].#subform[82].Veterans_Date_of_Burial_Year[0]',
127+
limit: 4,
128+
question_num: 6,
129+
question_suffix: 'C',
130+
question_label: "Veteran/Claimant's Identification Information > Veteran's Date Of Burial (Mm-Dd-Yyyy)",
131+
question_text: 'VETERAN/CLAIMANT\'S IDENTIFICATION INFORMATION > VETERAN\'S DATE OF BURIAL (MM-DD-YYYY)'
132+
}
133+
}
134+
}.freeze
11135

12136
##
13137
# Expands the form data for Section 1.

modules/burials/lib/burials/pdf_fill/sections/section_02.rb

Lines changed: 151 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,157 @@ module PdfFill
77
# Section II: Claimant Information
88
class Section2 < Section
99
# Section configuration hash
10-
KEY = {}.freeze
10+
KEY = {
11+
'claimantFullName' => { # start claimant information
12+
'first' => {
13+
key: 'form1[0].#subform[82].ClaimantsFirstName[0]',
14+
limit: 12,
15+
question_num: 7,
16+
question_label: "Claimant's First Name",
17+
question_text: "CLAIMANT'S FIRST NAME"
18+
},
19+
'middleInitial' => {
20+
key: 'form1[0].#subform[82].ClaimantsMiddleInitial1[0]'
21+
},
22+
'last' => {
23+
key: 'form1[0].#subform[82].ClaimantsLastName[0]',
24+
limit: 18,
25+
question_num: 7,
26+
question_label: "Claimant's Last Name",
27+
question_text: "CLAIMANT'S LAST NAME"
28+
},
29+
'suffix' => {
30+
key: 'form1[0].#subform[82].ClaimantSuffix[0]',
31+
question_num: 7,
32+
limit: 0,
33+
question_label: "Claimant's Suffix",
34+
question_text: "CLAIMANT'S SUFFIX"
35+
}
36+
},
37+
'claimantSocialSecurityNumber' => {
38+
'first' => {
39+
key: 'form1[0].#subform[82].Claimants_SocialSecurityNumber_FirstThreeNumbers[0]'
40+
},
41+
'second' => {
42+
key: 'form1[0].#subform[82].Claimants_SocialSecurityNumber_SecondTwoNumbers[0]'
43+
},
44+
'third' => {
45+
key: 'form1[0].#subform[82].Claimants_SocialSecurityNumber_LastFourNumbers[0]'
46+
}
47+
},
48+
'claimantDateOfBirth' => {
49+
'month' => {
50+
key: 'form1[0].#subform[82].Claimants_DOBmonth[0]',
51+
limit: 2,
52+
question_num: 9,
53+
question_suffix: 'A',
54+
question_label: "Veteran/Claimant's Identification Information > Claimant's Date Of Birth (Mm-Dd-Yyyy)",
55+
question_text: 'VETERAN/CLAIMANT\'S IDENTIFICATION INFORMATION > CLAIMANT\'S DATE OF BIRTH (MM-DD-YYYY)'
56+
},
57+
'day' => {
58+
key: 'form1[0].#subform[82].Claimants_DOBday[0]',
59+
limit: 2,
60+
question_num: 9,
61+
question_suffix: 'B',
62+
question_label: "Veteran/Claimant's Identification Information > Claimant's Date Of Birth (Mm-Dd-Yyyy)",
63+
question_text: 'VETERAN/CLAIMANT\'S IDENTIFICATION INFORMATION > CLAIMANT\'S DATE OF BIRTH (MM-DD-YYYY)'
64+
},
65+
'year' => {
66+
key: 'form1[0].#subform[82].Claimants_DOByear[0]',
67+
limit: 4,
68+
question_num: 9,
69+
question_suffix: 'C',
70+
question_label: "Veteran/Claimant's Identification Information > Claimant's Date Of Birth (Mm-Dd-Yyyy)",
71+
question_text: 'VETERAN/CLAIMANT\'S IDENTIFICATION INFORMATION > CLAIMANT\'S DATE OF BIRTH (MM-DD-YYYY)'
72+
}
73+
},
74+
'claimantAddress' => {
75+
'street' => {
76+
key: 'form1[0].#subform[82].CurrentMailingAddress_NumberAndStreet[0]',
77+
limit: 30,
78+
question_num: 10,
79+
question_label: "Claimant's Address - Street",
80+
question_text: "CLAIMANT'S ADDRESS - STREET"
81+
},
82+
'street2' => {
83+
key: 'form1[0].#subform[82].CurrentMailingAddress_ApartmentOrUnitNumber[0]',
84+
limit: 5,
85+
question_num: 10,
86+
question_label: "Claimant's Address - Apt/Unit No.",
87+
question_text: "CLAIMANT'S ADDRESS - APT/UNIT NO."
88+
},
89+
'city' => {
90+
key: 'form1[0].#subform[82].CurrentMailingAddress_City[0]',
91+
limit: 18,
92+
question_num: 10,
93+
question_label: "Claimant's Address - City",
94+
question_text: "CLAIMANT'S ADDRESS - CITY"
95+
},
96+
'state' => {
97+
key: 'form1[0].#subform[82].CurrentMailingAddress_StateOrProvince[0]'
98+
},
99+
'country' => {
100+
key: 'form1[0].#subform[82].CurrentMailingAddress_Country[0]'
101+
},
102+
'postalCode' => {
103+
'firstFive' => {
104+
key: 'form1[0].#subform[82].CurrentMailingAddress_ZIPOrPostalCode_FirstFiveNumbers[0]'
105+
},
106+
'lastFour' => {
107+
key: 'form1[0].#subform[82].CurrentMailingAddress_ZIPOrPostalCode_LastFourNumbers[0]',
108+
limit: 4,
109+
question: 10,
110+
question_label: "Claimant's Address - Postal Code - Last Four",
111+
question_text: "CLAIMANT's ADDRESS - POSTAL CODE - LAST FOUR"
112+
}
113+
}
114+
},
115+
'claimantPhone' => {
116+
'first' => {
117+
key: 'form1[0].#subform[82].TelephoneNumber_AreaCode[0]'
118+
},
119+
'second' => {
120+
key: 'form1[0].#subform[82].TelephoneNumber_FirstThreeNumbers[0]'
121+
},
122+
'third' => {
123+
key: 'form1[0].#subform[82].TelephoneNumber_LastFourNumbers[0]'
124+
}
125+
},
126+
'claimantIntPhone' => {
127+
key: 'form1[0].#subform[82].IntTelephoneNumber[0]',
128+
question_num: 11,
129+
question_label: "Claimant's International Phone Number",
130+
question_text: "CLAIMANT'S INTERNATIONAL PHONE NUMBER",
131+
limit: 0 # this will force this value that is not on the pdf to appear in the overflow
132+
},
133+
'claimantEmail' => {
134+
key: 'form1[0].#subform[82].E-Mail_Address[0]',
135+
limit: 31,
136+
question_num: 12,
137+
question_label: 'E-Mail Address',
138+
question_text: 'E-MAIL ADDRESS'
139+
},
140+
'relationshipToVeteran' => {
141+
'spouse' => {
142+
key: 'form1[0].#subform[82].CheckboxSpouse[0]'
143+
},
144+
'child' => {
145+
key: 'form1[0].#subform[82].CheckboxChild[0]'
146+
},
147+
'parent' => {
148+
key: 'form1[0].#subform[82].CheckboxParent[0]'
149+
},
150+
'executor' => {
151+
key: 'form1[0].#subform[82].CheckboxExecutor[0]'
152+
},
153+
'funeralDirector' => {
154+
key: 'form1[0].#subform[82].CheckboxFuneralHome[0]'
155+
},
156+
'otherFamily' => {
157+
key: 'form1[0].#subform[82].CheckboxOther[0]'
158+
}
159+
}
160+
}.freeze
11161

12162
##
13163
# Expands the form data for Section 2.

modules/burials/lib/burials/pdf_fill/sections/section_03.rb

Lines changed: 64 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,71 @@ module Burials
66
module PdfFill
77
# Section III: Veteran Service Information
88
class Section3 < Section
9+
# rubocop:disable Layout/LineLength
910
# Section configuration hash
10-
KEY = {}.freeze
11+
KEY = {
12+
'toursOfDuty' => {
13+
limit: 3,
14+
first_key: 'rank',
15+
item_label: 'Service period',
16+
'dateRangeStart' => {
17+
key: "form1[0].#subform[82].DATE_ENTERED_SERVICE[#{ITERATOR}]",
18+
question_num: 14,
19+
question_suffix: 'A(1)',
20+
question_label: 'Entered Service (Date)',
21+
question_text: 'ENTERED SERVICE (date)',
22+
format: 'date'
23+
},
24+
'placeOfEntry' => {
25+
key: "form1[0].#subform[82].PLACE[#{ITERATOR}]",
26+
limit: 25,
27+
question_num: 14,
28+
question_suffix: 'A(2)',
29+
question_label: 'Entered Service (Place)',
30+
question_text: 'ENTERED SERVICE (place)'
31+
},
32+
'militaryServiceNumber' => {
33+
key: "form1[0].#subform[82].SERVICE_NUMBER[#{ITERATOR}]",
34+
limit: 12,
35+
question_num: 14,
36+
question_suffix: 'B',
37+
question_label: 'Service Number',
38+
question_text: 'SERVICE NUMBER'
39+
},
40+
'dateRangeEnd' => {
41+
key: "form1[0].#subform[82].DATE_SEPARATED_SERVICE[#{ITERATOR}]",
42+
question_num: 14,
43+
question_suffix: 'C(1)',
44+
question_label: 'Separated From Service (Date)',
45+
question_text: 'SEPARATED FROM SERVICE (date)',
46+
format: 'date'
47+
},
48+
'placeOfSeparation' => {
49+
key: "form1[0].#subform[82].PLACE_SEPARATED[#{ITERATOR}]",
50+
question_num: 14,
51+
question_suffix: 'C(2)',
52+
question_label: 'Separated From Service (Place)',
53+
question_text: 'SEPARATED FROM SERVICE (place)',
54+
limit: 25
55+
},
56+
'rank' => {
57+
key: "form1[0].#subform[82].GRADE_RANK_OR_RATING[#{ITERATOR}]",
58+
question_num: 14,
59+
question_suffix: 'D(1)',
60+
question_label: 'Grade, Rank Or Rating, Organization And Branch Of Service',
61+
question_text: 'GRADE, RANK OR RATING, ORGANIZATION AND BRANCH OF SERVICE',
62+
limit: 31
63+
}
64+
},
65+
'previousNames' => {
66+
key: 'form1[0].#subform[82].OTHER_NAME_VETERAN_SERVED_UNDER[0]',
67+
question_num: 15,
68+
question_label: 'If Veteran Served Under Name Other Than That Shown In Item 1, Give Full Name And Service Rendered Under That Name',
69+
question_text: 'IF VETERAN SERVED UNDER NAME OTHER THAN THAT SHOWN IN ITEM 1, GIVE FULL NAME AND SERVICE RENDERED UNDER THAT NAME',
70+
limit: 180
71+
}
72+
}.freeze
73+
# rubocop:enable Layout/LineLength
1174

1275
##
1376
# Expands the form data for Section 3.

0 commit comments

Comments
 (0)