Skip to content

Commit eb57587

Browse files
Swagger Updates for new fields on latest supp claims form (#20723)
* Swagger Updates * Allow no treatment end date with unit tests.
1 parent 2087bff commit eb57587

File tree

15 files changed

+695
-182
lines changed

15 files changed

+695
-182
lines changed

modules/appeals_api/app/models/appeals_api/supplemental_claim.rb

+4
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,10 @@ def benefit_type
174174
data_attributes['benefitType']&.strip
175175
end
176176

177+
def mst_disclosure
178+
data_attributes['mstUpcomingEventDisclosure']&.strip
179+
end
180+
177181
def claimant_type
178182
data_attributes['claimantType']&.strip
179183
end

modules/appeals_api/app/models/concerns/appeals_api/model_validations.rb

+4
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,10 @@ def validate_retrieve_from_date_range
102102
start_date_str = evidence_date['startDate']
103103
end_date_str = evidence_date['endDate']
104104

105+
# End date is no longer required on what we are calling the v4 version(Expiration Date: 05/31/2027)
106+
# of the Supp claim form, so if it's not provided, don't validate the range
107+
next if end_date_str.nil?
108+
105109
start_date = Date.parse(start_date_str)
106110
end_date = Date.parse(end_date_str)
107111

modules/appeals_api/app/services/appeals_api/pdf_construction/supplemental_claim/v4/form_data.rb

+11-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ module SupplementalClaim
88
module V4
99
class FormData
1010
BENEFIT_TYPE_CODES = {
11-
1211
'education' => 1,
1312
'veteranReadinessAndEmployment' => 2,
1413
'pensionSurvivorsBenefits' => 3,
@@ -47,6 +46,13 @@ class FormData
4746
'OTHER'
4847
].freeze
4948

49+
MST_EVENT_DISCLOSURE = {
50+
'I CONSENT' => 4,
51+
'I DO NOT CONSENT' => 1,
52+
'I REVOKE PRIOR CONSENT' => 3,
53+
'NOT APPLICABLE AND/OR NOT ENROLLED IN VHA HEALTHCARE' => 2
54+
}.freeze
55+
5056
LONG_SIGNATURE_THRESHOLD = 70
5157
LONG_EMAIL_THRESHOLD = 120
5258
MAX_SIGNATURE_LENGTH = 180
@@ -76,6 +82,10 @@ def benefit_type_code
7682
BENEFIT_TYPE_CODES[supplemental_claim.benefit_type]
7783
end
7884

85+
def mst_disclosure_code
86+
MST_EVENT_DISCLOSURE[supplemental_claim.mst_disclosure]
87+
end
88+
7989
def claimant_type_code
8090
CLAIMANT_TYPE_CODES[supplemental_claim.claimant_type]
8191
end

modules/appeals_api/app/services/appeals_api/pdf_construction/supplemental_claim/v4/form_fields.rb

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ class FormFields
4343
treatment_location_other: 'form1[0].#subform[5].Other_Specify[0]',
4444
treatment_location_other_details: 'form1[0].#subform[5].OTHER_Specify[2]',
4545

46+
mst_disclosure_code: 'form1[0].#subform[5].RadioButtonList[3]',
47+
4648
evidence_submission_1_no_treatment_date: 'form1[0].#subform[5].Check_Box_Do_Not_Have_Date_s[0]',
4749
evidence_submission_2_no_treatment_date: 'form1[0].#subform[5].Check_Box_Do_Not_Have_Date_s[1]',
4850
evidence_submission_3_no_treatment_date: 'form1[0].#subform[5].Check_Box_Do_Not_Have_Date_s[2]',

modules/appeals_api/app/swagger/decision_reviews/v2/swagger.json

+204-86
Large diffs are not rendered by default.

modules/appeals_api/app/swagger/decision_reviews/v2/swagger_dev.json

+204-86
Large diffs are not rendered by default.

modules/appeals_api/config/schemas/decision_reviews/v2/200995.json

+31-6
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,12 @@
7676
"nationalCemeteryAdministration"
7777
]
7878
},
79-
"homeless": { "type": "boolean" },
79+
"homeless": {
80+
"type": "boolean",
81+
"description": "Indicates if the claimant is currently homeless or at risk of becoming homeless."
82+
},
8083
"homelessLivingSituation": {
84+
"description": "Claimant's current living situation; provide all that apply. For Other: 'A living situation not described by the previous options.'",
8185
"type": "array",
8286
"items": {
8387
"type": "string",
@@ -92,14 +96,33 @@
9296
]
9397
}
9498
},
95-
"homelessLivingSituationOther": {"type": "string", "maxLength": 100 },
96-
"homelessPointOfContact": {"type": "string", "maxLength": 150 },
99+
"homelessLivingSituationOther": {
100+
"description": "Details for homeless living situation other",
101+
"type": "string",
102+
"maxLength": 100
103+
},
104+
"homelessPointOfContact": {
105+
"description": "The name of a contact that can be used by VA in order to get in touch with a homeless claimant.",
106+
"type": "string",
107+
"maxLength": 150
108+
},
97109
"homelessPointOfContactPhone": {
110+
"description": "Phone number for the Claimant's point of contact in order to get in touch with a homeless claimant.",
98111
"allOf": [
99112
{ "$ref": "#/definitions/phone" },
100113
{ "$comment": "the phone fields must not exceed 20 chars, when concatenated" }
101114
]
102115
},
116+
"mstUpcomingEventDisclosure": {
117+
"description": "Allows the Claimant to indicate their consent for VBA to communicate with VHA regarding upcoming events related to the appeals process.",
118+
"type": "string",
119+
"enum": [
120+
"I CONSENT",
121+
"I DO NOT CONSENT",
122+
"I REVOKE PRIOR CONSENT",
123+
"NOT APPLICABLE AND/OR NOT ENROLLED IN VHA HEALTHCARE"
124+
]
125+
},
103126
"claimantType": {"type": "string", "enum": [ "veteran", "spouse_of_veteran", "child_of_veteran", "parent_of_veteran", "other"] },
104127
"claimantTypeOtherValue": { "type": "string", "minLength": 1, "maxLength": 25 },
105128
"veteran": {
@@ -150,7 +173,7 @@
150173
"properties": {
151174
"treatmentLocations":{
152175
"type": "array",
153-
"description": "Identify where you have received treatment",
176+
"description": "Claimant’s treatment locations; provide all that apply. For Other: 'A treatment location not described by the previous options.'",
154177
"items": {
155178
"type": "string",
156179
"enum": [
@@ -162,7 +185,10 @@
162185
"OTHER"
163186
]
164187
},
165-
"treatment_location_other": {"type": "string", "maxLength": 115 }
188+
"treatmentLocationOther": {
189+
"description": "Details for treatment location other",
190+
"type": "string",
191+
"maxLength": 115 }
166192
},
167193
"evidenceType":{
168194
"type": "array",
@@ -200,7 +226,6 @@
200226
"type": "boolean",
201227
"description": "Don't have treatment date"
202228
}
203-
204229
},
205230
"required": [ "locationAndName" ]
206231
}

modules/appeals_api/lib/appeals_api/sc_evidence.rb

+6-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,12 @@ def dates_month_format
2626
return [''] if evidence_dates.blank?
2727

2828
evidence_dates.map do |hash|
29-
"#{Date.parse(hash['startDate']).strftime('%m-%Y')} to #{Date.parse(hash['endDate']).strftime('%m-%Y')}"
29+
# end date is not required for the month format
30+
if hash['endDate'].nil?
31+
Date.parse(hash['startDate']).strftime('%m-%Y')
32+
else
33+
"#{Date.parse(hash['startDate']).strftime('%m-%Y')} to #{Date.parse(hash['endDate']).strftime('%m-%Y')}"
34+
end
3035
end
3136
end
3237

modules/appeals_api/spec/factories/supplemental_claims.rb

+11
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,17 @@
3535
form_data { FixtureHelpers.fixture_as_json 'decision_reviews/v2/valid_200995_extra.json' }
3636
end
3737

38+
factory :no_treatment_end_dates_supplemental_claim, class: 'AppealsApi::SupplementalClaim' do
39+
id { SecureRandom.uuid }
40+
api_version { 'V2' }
41+
evidence_submission_indicated { true }
42+
auth_headers do
43+
FixtureHelpers.fixture_as_json('decision_reviews/v2/valid_200995_headers_extra.json')
44+
.transform_values(&:strip)
45+
end
46+
form_data { FixtureHelpers.fixture_as_json 'decision_reviews/v2/valid_200995_no_treatment_end_date.json' }
47+
end
48+
3849
factory :minimal_supplemental_claim, class: 'AppealsApi::SupplementalClaim' do
3950
id { SecureRandom.uuid }
4051
api_version { 'V2' }

modules/appeals_api/spec/fixtures/decision_reviews/v2/valid_200995_extra.json

+4-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
"OTHER"
1717
],
1818
"homelessLivingSituationOther": "random words for other living situation ",
19-
"homelessPointOfContact": "Jim Jones Vet Care Network",
19+
"homelessPointOfContact": "Shawn Hobkens Veteran Care Network",
20+
21+
"mstUpcomingEventDisclosure": "NOT APPLICABLE AND/OR NOT ENROLLED IN VHA HEALTHCARE",
2022

21-
"homelessPointOfContactPhone": {"areaCode": "777", "phoneNumber": "9957023"},
23+
"homelessPointOfContactPhone": {"areaCode": "777", "phoneNumber": "9957023"},
2224
"veteran": {
2325
"address": {
2426
"addressLine1": "123 Main St",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,202 @@
1+
{
2+
"data": {
3+
"type": "supplementalClaim",
4+
"attributes": {
5+
"benefitType": "compensation",
6+
"claimantType": "other",
7+
"claimantTypeOtherValue": "Veteran Attorney",
8+
"homeless": true,
9+
"homelessLivingSituation": [
10+
"I LIVE OR SLEEP IN A PLACE THAT IS NOT MEANT FOR REGULAR SLEEPING",
11+
"I LIVE IN A SHELTER",
12+
"I AM STAYING WITH A FRIEND OR FAMILY MEMBER, BECAUSE I AM UNABLE TO OWN A HOME RIGHT NOW",
13+
"IN THE NEXT 30 DAYS, I WILL HAVE TO LEAVE A FACILITY, LIKE A HOMELESS SHELTER",
14+
"IN THE NEXT 30 DAYS, I WILL LOSE MY HOME",
15+
"NONE OF THESE SITUATIONS APPLY TO ME",
16+
"OTHER"
17+
],
18+
"homelessLivingSituationOther": "random words for other living situation ",
19+
"homelessPointOfContact": "Shawn Hobkens Veteran Care Network",
20+
21+
"mstUpcomingEventDisclosure": "NOT APPLICABLE AND/OR NOT ENROLLED IN VHA HEALTHCARE",
22+
23+
"homelessPointOfContactPhone": {"areaCode": "777", "phoneNumber": "9957023"},
24+
"veteran": {
25+
"address": {
26+
"addressLine1": "123 Main St",
27+
"addressLine2": "Suite #1200",
28+
"addressLine3": "Box 4",
29+
"city": "New York",
30+
"countryCodeISO2": "US",
31+
"stateCode": "NY",
32+
"zipCode5": "30012"
33+
},
34+
"phone": {
35+
"countryCode": "03",
36+
"areaCode": "555",
37+
"phoneNumber": "8001111"
38+
},
39+
"email": "[email protected]",
40+
"timezone": "America/Chicago"
41+
},
42+
"claimant": {
43+
"address": {
44+
"addressLine1": "456 First St",
45+
"addressLine2": "Apt 5",
46+
"addressLine3": "Box 1",
47+
"city": "Montreal",
48+
"countryCodeISO2": "CA",
49+
"zipCode5": "00000",
50+
"internationalPostalCode": "A9999AAA"
51+
},
52+
"phone": {
53+
"countryCode": "1",
54+
"areaCode": "555",
55+
"phoneNumber": "8111100",
56+
"phoneNumberExt": "4"
57+
},
58+
"email": "[email protected]",
59+
"timezone": "America/Detroit"
60+
},
61+
"socOptIn": true,
62+
"form5103Acknowledged": true,
63+
"evidenceSubmission": {
64+
"treatmentLocations": ["PRIVATE HEALTH CARE PROVIDER", "VA VET CENTER", "COMMUNITY CARE", "VA MEDICAL CENTERS (VAMC) AND COMMUNITY-BASED OUTPATIENT CLINICS (CBOC)", "DEPARTMENT OF DEFENSE (DOD) MILITARY TREATMENT FACILITY(IES) (MTF)"],
65+
"treatmentLocationOther": "hospital that is not standard other more words more words hospital that is not standard other more words more words",
66+
"evidenceType": ["upload", "retrieval"],
67+
"retrieveFrom": [
68+
{
69+
"type": "retrievalEvidence",
70+
"attributes": {
71+
"locationAndName": "X-Ray VAMC",
72+
"evidenceDates": [
73+
{ "startDate": "2020-04-10"},
74+
{ "startDate": "2020-01-02", "endDate": "2020-02-01" },
75+
{ "startDate": "2020-02-20", "endDate": "2020-02-22" },
76+
{ "startDate": "2019-02-02", "endDate": "2020-02-03" }
77+
],
78+
"noTreatmentDates": true
79+
}
80+
},
81+
{
82+
"type": "retrievalEvidence",
83+
"attributes": {
84+
"locationAndName": "Blood Lab VA Facility",
85+
"evidenceDates": [
86+
{ "startDate": "2020-02-20", "endDate": "2020-02-22" },
87+
{ "startDate": "2020-02-02", "endDate": "2020-02-07" }
88+
],
89+
"noTreatmentDates": true
90+
}
91+
},
92+
{
93+
"type": "retrievalEvidence",
94+
"attributes": {
95+
"locationAndName": "Doctor's Notes VAMC",
96+
"evidenceDates": [
97+
{ "startDate": "2020-04-10", "endDate": "2020-04-10" }
98+
],
99+
"noTreatmentDates": true
100+
}
101+
},
102+
{
103+
"type": "retrievalEvidence",
104+
"attributes": {
105+
"locationAndName": "CT scan VA Medical Facility",
106+
"evidenceDates": [
107+
{ "startDate": "2020-07-19", "endDate": "2020-07-19" },
108+
{ "startDate": "2018-03-06", "endDate": "2019-02-12" }
109+
],
110+
"noTreatmentDates": true
111+
}
112+
},
113+
{
114+
"type": "retrievalEvidence",
115+
"attributes": {
116+
"locationAndName": "Lab work VAMC",
117+
"evidenceDates": [
118+
{ "startDate": "2018-03-06", "endDate": "2018-03-06" },
119+
{ "startDate": "2018-01-15" }
120+
],
121+
"noTreatmentDates": false
122+
}
123+
}
124+
]
125+
}
126+
}
127+
},
128+
"included": [
129+
{
130+
"type": "contestableIssue",
131+
"attributes": {
132+
"issue": "right shoulder",
133+
"decisionDate": "2000-01-08",
134+
"socDate": "2020-04-30"
135+
}
136+
},
137+
{
138+
"type": "contestableIssue",
139+
"attributes": {
140+
"issue": "lower back",
141+
"decisionDate": "1900-01-06",
142+
"socDate": "2021-02-24"
143+
}
144+
},
145+
{
146+
"type": "contestableIssue",
147+
"attributes": {
148+
"issue": "torn rotator cuff",
149+
"decisionDate": "1989-03-07",
150+
"socDate": "2020-04-30"
151+
}
152+
},
153+
{
154+
"type": "contestableIssue",
155+
"attributes": {
156+
"issue": "hearing loss",
157+
"decisionDate": "1930-10-20",
158+
"socDate": "2016-05-30"
159+
}
160+
},
161+
{
162+
"type": "contestableIssue",
163+
"attributes": {
164+
"issue": "sciatica",
165+
"decisionDate": "2007-01-19",
166+
"socDate": "2012-01-02"
167+
}
168+
},
169+
{
170+
"type": "contestableIssue",
171+
"attributes": {
172+
"issue": "bowel obstruction",
173+
"decisionDate": "1999-12-29",
174+
"socDate": "2019-08-13"
175+
}
176+
},
177+
{
178+
"type": "contestableIssue",
179+
"attributes": {
180+
"issue": "right eye",
181+
"decisionDate": "1920-04-02",
182+
"socDate": "2019-11-19"
183+
}
184+
},
185+
{
186+
"type": "contestableIssue",
187+
"attributes": {
188+
"issue": "left index finger",
189+
"decisionDate": "2018-08-17",
190+
"socDate": "2021-03-20"
191+
}
192+
},
193+
{
194+
"type": "contestableIssue",
195+
"attributes": {
196+
"issue": "spinal compression",
197+
"decisionDate": "2013-09-11",
198+
"socDate": "2020-08-24"
199+
}
200+
}
201+
]
202+
}

0 commit comments

Comments
 (0)