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

Lines changed: 4 additions & 0 deletions
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

Lines changed: 4 additions & 0 deletions
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

Lines changed: 11 additions & 1 deletion
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

Lines changed: 2 additions & 0 deletions
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

Lines changed: 204 additions & 86 deletions
Large diffs are not rendered by default.

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

Lines changed: 204 additions & 86 deletions
Large diffs are not rendered by default.

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

Lines changed: 31 additions & 6 deletions
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

Lines changed: 6 additions & 1 deletion
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

Lines changed: 11 additions & 0 deletions
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' }

0 commit comments

Comments
 (0)