From ae4f586b4ed6eea181c1990053e11e5dad967f08 Mon Sep 17 00:00:00 2001 From: Rockwell Windsor Rice <129893414+rockwellwindsor-va@users.noreply.github.com> Date: Wed, 7 Jun 2023 14:10:28 -0500 Subject: [PATCH] API-27078-526-v2-allow-yyyy-mm-date-format-2 (#12927) * Updates 526.json and related json fles to be inline with new date formats * Updates valdations file to handle new date formats * Updates validation specs t handle tests with new date formats * Also adds some new tests for handling new scenarios * Updates swagger docs Changes to be committed: modified: modules/claims_api/app/controllers/concerns/claims_api/v2/disability_compensation_validation.rb modified: modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json modified: modules/claims_api/config/schemas/v2/526.json modified: modules/claims_api/config/schemas/v2/request_bodies/disability_compensation/example.json modified: modules/claims_api/config/schemas/v2/request_bodies/disability_compensation/request.json modified: modules/claims_api/spec/fixtures/v2/veterans/disability_compensation/form_526_json_api.json modified: modules/claims_api/spec/lib/claims_api/v2/disability_compensation_pdf_mapper_spec.rb modified: modules/claims_api/spec/requests/v2/veterans/disability_compensation_request_spec.rb modified: spec/support/schemas/claims_api/v2/forms/disability/submission.json --- .../v2/disability_compensation_validation.rb | 58 +- .../swagger/claims_api/v2/dev/swagger.json | 257 +-- modules/claims_api/config/schemas/v2/526.json | 1939 ++++++++--------- .../disability_compensation/example.json | 73 +- .../disability_compensation/request.json | 84 +- .../form_526_json_api.json | 34 +- ...disability_compensation_pdf_mapper_spec.rb | 26 +- .../disability_compensation_request_spec.rb | 303 ++- .../v2/forms/disability/submission.json | 66 +- 9 files changed, 1550 insertions(+), 1290 deletions(-) diff --git a/modules/claims_api/app/controllers/concerns/claims_api/v2/disability_compensation_validation.rb b/modules/claims_api/app/controllers/concerns/claims_api/v2/disability_compensation_validation.rb index 08e16c7d0cc..bcd42f328dc 100644 --- a/modules/claims_api/app/controllers/concerns/claims_api/v2/disability_compensation_validation.rb +++ b/modules/claims_api/app/controllers/concerns/claims_api/v2/disability_compensation_validation.rb @@ -156,7 +156,7 @@ def validate_form_526_disability_approximate_begin_date! approx_begin_date = disability['approximateDate'] next if approx_begin_date.blank? - next if Date.parse(approx_begin_date) < Time.zone.today + next if date_is_valid_against_current_time_after_check_on_format?(approx_begin_date) raise ::Common::Exceptions::InvalidFieldValue.new('disability.approximateDate', approx_begin_date) end @@ -245,7 +245,7 @@ def validate_form_526_disability_secondary_disability_classification_code_matche end def validate_form_526_disability_secondary_disability_approximate_begin_date!(secondary_disability) - return if Date.parse(secondary_disability['approximateDate']) < Time.zone.today + return if date_is_valid_against_current_time_after_check_on_format?(secondary_disability['approximateDate']) raise ::Common::Exceptions::InvalidFieldValue.new( 'disabilities.secondaryDisabilities.approximateDate', @@ -368,7 +368,7 @@ def validate_form_526_separation_pay_received_date! 'datePaymentReceived') return if separation_pay_received_date.blank? - return if Date.parse(separation_pay_received_date) < Time.zone.today + return if date_is_valid_against_current_time_after_check_on_format?(separation_pay_received_date) raise ::Common::Exceptions::InvalidFieldValue.new('separationSeverancePay.datePaymentReceived', separation_pay_received_date) @@ -468,7 +468,8 @@ def validate_confinements! service_information['confinements'].each do |confinement| approximate_begin_date = confinement['approximateBeginDate'] approximate_end_date = confinement['approximateEndDate'] - if Date.parse(approximate_begin_date) > Date.parse(approximate_end_date) + + if begin_date_is_not_after_end_date?(approximate_begin_date, approximate_end_date) raise ::Common::Exceptions::UnprocessableEntity.new( detail: 'Approximate end date must be after approximate begin date.' ) @@ -576,6 +577,55 @@ def raise_exception_if_value_present(val) detail: "The #{val} is required for direct deposit." ) end + + private + + def begin_date_is_not_after_end_date?(begin_date, end_date) + # see what format each date is in + begin_date_has_day = date_has_day?(begin_date) + end_date_has_day = date_has_day?(end_date) + # determine how to compare, being = is ok + if (begin_date_has_day && end_date_has_day) || (!begin_date_has_day && !end_date_has_day) # same format + begin_date > end_date + else # mixed formats on dates + begin_date_not_after_end_date_with_mixed_format_dates?(begin_date, end_date) + end + end + + # Either date could be in MM-YYYY or MM-DD-YYYY format + def begin_date_not_after_end_date_with_mixed_format_dates?(begin_date, end_date) + # figure out which one has the day and remove it + if date_has_day?(begin_date) + begin_date = remove_chars(begin_date.dup) + elsif date_has_day?(end_date) + end_date = remove_chars(end_date.dup) + end + Date.strptime(begin_date, '%m-%Y') > Date.strptime(end_date, '%m-%Y') # = is ok + end + + def date_is_valid_against_current_time_after_check_on_format?(date) + if date_has_day?(date) + param_date = Date.strptime(date, '%m-%d-%Y') + now_date = Date.strptime(Time.zone.today.strftime('%m-%d-%Y'), '%m-%d-%Y') + else + param_date = Date.strptime(date, '%m-%Y') + now_date = Date.strptime(Time.zone.today.strftime('%m-%Y'), '%m-%Y') + end + param_date <= now_date # Since it is approximate we go with <= + end + + # just need to know if day is present or not + def date_has_day?(date) + date.length == 10 + end + + # making date approximate to compare + def remove_chars(str) + indices = [2, 3, 4] # MM| -DD |-YYYY + sz = str.size + indices.map { |i| i >= 0 ? i : sz + i }.sort.reverse_each { |i| str[i] = '' } + str + end end end end diff --git a/modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json b/modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json index bb6feb244c4..3a3d02ba64d 100644 --- a/modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json +++ b/modules/claims_api/app/swagger/claims_api/v2/dev/swagger.json @@ -1791,7 +1791,7 @@ "properties": { "servedInGulfWarHazardLocations": { "type": "boolean", - "description": "Did the Veteran serve in any of the following Gulf War hazard locations?", + "description": "Did the Veteran serve in any of the following Gulf War hazard locations? Iraq; Kuwait; Saudi Arabia; the neutral zone between Iraq and Saudi Arabia; Bahrain; Qatar; the United Arab Emirates; Oman; Yemen; Lebanon; Somalia; Afghanistan; Israel; Egypt; Turkey; Syria; Jordan; Djibouti; Uzbekistan; the Gulf of Aden; the Gulf of Oman; the Persian Gulf; the Arabian Sea; and the Red Sea.", "example": true }, "serviceDates": { @@ -1799,16 +1799,16 @@ "description": "Date range for when the exposure happened.", "properties": { "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate start date for serving in Gulf War hazard location.", - "example": "2018-06-04" + "example": "06-2018" }, "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate end date for serving in Gulf War hazard location.", - "example": "2018-06-04" + "example": "06-2018" } } } @@ -1831,16 +1831,16 @@ "description": "Date range for when the exposure happened.", "properties": { "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate start date for serving in herbicide location.", - "example": "2018-06-04" + "example": "06-2018" }, "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate end date for serving in herbicide location.", - "example": "2018-06-04" + "example": "06-2018" } } } @@ -1872,16 +1872,16 @@ "description": "Date range for when the exposure happened.", "properties": { "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate start date for exposure.", - "example": "2018-06-04" + "example": "06-2018" }, "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate end date for exposure.", - "example": "2018-06-04" + "example": "06-2018" } } } @@ -1896,16 +1896,16 @@ "description": "Date range for when the exposure happened.", "properties": { "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate start date for exposure.", - "example": "2018-06-04" + "example": "06-2018" }, "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate end date for exposure.", - "example": "2018-06-04" + "example": "06-2018" } } }, @@ -1950,10 +1950,10 @@ "example": "Heavy equipment operator in service." }, "approximateDate": { - "description": "Approximate date disability began. Date must be in the past.", + "description": "Approximate date disability began. Date must be in the past. \n Format can be either MM-DD-YYYY or MM-YYYY", "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", + "example": "03-12-2019 or 03-2019" }, "ratedDisabilityId": { "description": "When submitting a contention with action type INCREASE, the previously rated disability id may be included.", @@ -2014,10 +2014,10 @@ "example": "249470" }, "approximateDate": { - "description": "Approximate date disability began.", + "description": "Approximate date disability began. \n Format can be either MM-DD-YYYY or MM-YYYY", "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", + "example": "03-12-2019 or 03-2019" }, "exposureOrEventOrInjury": { "type": "array", @@ -2105,8 +2105,8 @@ "null", "string" ], - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", + "example": "03-2018" }, "treatedDisabilityNames": { "description": "Name(s) of Disabilities treated in this time frame.", @@ -2264,14 +2264,14 @@ ], "properties": { "approximateBeginDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", "type": "string", - "example": "2018-06-04" + "example": "06-12-2019 or 06-2019" }, "approximateEndDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", "type": "string", - "example": "2018-08-04" + "example": "07-12-2019 or 07-2019" } } } @@ -2483,10 +2483,10 @@ "description": "", "properties": { "datePaymentReceived": { - "description": "Approximate date separation pay was received.", + "description": "Approximate date separation pay was received. \n Format can be either MM-DD-YYYY or MM-YYYY", "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", + "example": "03-02-2018 or 03-2018" }, "branchOfService": { "description": "Branch of Service making payments.", @@ -2970,16 +2970,16 @@ "description": "Date range for when the exposure happened.", "properties": { "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate start date for serving in Gulf War hazard location.", - "example": "2018-06-04" + "example": "06-2018" }, "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate end date for serving in Gulf War hazard location.", - "example": "2018-06-04" + "example": "06-2018" } } } @@ -3002,16 +3002,16 @@ "description": "Date range for when the exposure happened.", "properties": { "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate start date for serving in herbicide location.", - "example": "2018-06-04" + "example": "06-2018" }, "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate end date for serving in herbicide location.", - "example": "2018-06-04" + "example": "06-2018" } } } @@ -3049,16 +3049,16 @@ "description": "Date range for when the exposure happened.", "properties": { "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate start date for exposure.", - "example": "2018-06-04" + "example": "06-2018" }, "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate end date for exposure.", - "example": "2018-06-04" + "example": "06-2018" } } } @@ -3073,16 +3073,16 @@ "description": "Date range for when the exposure happened.", "properties": { "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate start date for exposure.", - "example": "2018-06-04" + "example": "06-2018" }, "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate end date for exposure.", - "example": "2018-06-04" + "example": "06-2018" } } }, @@ -3127,10 +3127,10 @@ "example": "Heavy equipment operator in service." }, "approximateDate": { - "description": "Approximate date disability began. Date must be in the past.", + "description": "Approximate date disability began. Date must be in the past. \n Format can be either MM-DD-YYYY or MM-YYYY", "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", + "example": "03-12-2019 or 03-2019" }, "ratedDisabilityId": { "description": "When submitting a contention with action type INCREASE, the previously rated disability id may be included.", @@ -3191,10 +3191,10 @@ "example": "249470" }, "approximateDate": { - "description": "Approximate date disability began.", + "description": "Approximate date disability began. \n Format can be either MM-DD-YYYY or MM-YYYY", "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", + "example": "03-12-2019 or 03-2019" }, "exposureOrEventOrInjury": { "type": "string", @@ -3282,8 +3282,8 @@ "null", "string" ], - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", + "example": "02-2018" }, "treatedDisabilityNames": { "description": "Name(s) of Disabilities treated in this time frame.", @@ -3298,36 +3298,36 @@ "Trauma" ] } - } - }, - "center": { - "description": "VA Medical Center(s) and Department of Defense Military Treatment Facilities where the Veteran received treatment after discharge for any claimed disabilities.", - "type": "object", - "additionalProperties": false, - "required": [ - "name", - "state" - ], - "properties": { - "name": { - "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", - "type": "string", - "pattern": "(?!(?: )$)([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,# ])?)+$", - "example": "Private Facility 2", - "minLength": 1, - "maxLength": 100 - }, - "city": { - "description": "City of treatment facility.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.#]([-a-zA-Z0-9'.# ])?)+$", - "example": "Portland" - }, - "state": { - "description": "State of treatment facility.", - "type": "string", - "pattern": "^[a-z,A-Z]{2}$", - "example": "OR" + }, + "center": { + "description": "VA Medical Center(s) and Department of Defense Military Treatment Facilities where the Veteran received treatment after discharge for any claimed disabilities.", + "type": "object", + "additionalProperties": false, + "required": [ + "name", + "state" + ], + "properties": { + "name": { + "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", + "type": "string", + "pattern": "(?!(?: )$)([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,# ])?)+$", + "example": "Private Facility 2", + "minLength": 1, + "maxLength": 100 + }, + "city": { + "description": "City of treatment facility.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.#]([-a-zA-Z0-9'.# ])?)+$", + "example": "Portland" + }, + "state": { + "description": "State of treatment facility.", + "type": "string", + "pattern": "^[a-z,A-Z]{2}$", + "example": "OR" + } } } } @@ -3437,14 +3437,14 @@ ], "properties": { "approximateBeginDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", "type": "string", - "example": "2018-06-04" + "example": "06-12-2019 or 06-2019" }, "approximateEndDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", "type": "string", - "example": "2018-08-04" + "example": "07-12-2019 or 07-2019" } } } @@ -3661,10 +3661,10 @@ "description": "", "properties": { "datePaymentReceived": { - "description": "Approximate date separation pay was received.", + "description": "Approximate date separation pay was received. \n Format can be either MM-DD-YYYY or MM-YYYY", "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", + "example": "03-02-2018 or 03-2018" }, "branchOfService": { "description": "Branch of Service making payments.", @@ -3829,16 +3829,16 @@ "gulfWarHazard": { "servedInGulfWarHazardLocations": true, "serviceDates": { - "startDate": "1999-07-21", - "endDate": "2005-01-21" + "startDate": "07-1999", + "endDate": "01-2005" } }, "herbicideHazardService": { "servedInHerbicideHazardLocations": true, "otherLocationsServed": "Guam", "serviceDates": { - "startDate": "2002-03-07", - "endDate": "2004-10-31" + "startDate": "03-2002", + "endDate": "10-2004" } }, "additionalHazardExposures": { @@ -3848,14 +3848,14 @@ ], "specifyOtherExposures": "Other exposure details", "exposureDates": { - "startDate": "2011-07-30", - "endDate": "2013-10-03" + "startDate": "07-2011", + "endDate": "10-2013" } }, "multipleExposures": { "exposureDates": { - "startDate": "2012-12-09", - "endDate": "2013-07-27" + "startDate": "12-2012", + "endDate": "07-2013" }, "exposureLocation": "Guam", "hazardExposedTo": "RADIATION" @@ -3865,44 +3865,23 @@ { "disabilityActionType": "REOPEN", "name": "PTSD (post traumatic stress disorder)", - "classificationCode": "ABCDEFGHIJ", - "serviceRelevance": "ABCDEFG", - "approximateDate": "4592-11-04", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 0, - "secondaryDisabilities": [ - { - "name": "ABCDEF", - "disabilityActionType": "SECONDARY", - "serviceRelevance": "ABCDEFGHIJKLMNOPQ", - "classificationCode": "ABCDEFGHIJKLMNO", - "approximateDate": "9904-01-03", - "exposureOrEventOrInjury": "EXPOSURE" - } - ], - "isRelatedToToxicExposure": true, - "exposureOrEventOrInjury": "EXPOSURE" - }, - { - "disabilityActionType": "REOPEN", - "name": "Trauma", - "classificationCode": "ABCDEFGHIJ", - "serviceRelevance": "ABCDEFG", - "approximateDate": "4592-11-04", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 0, + "classificationCode": "249470", + "serviceRelevance": "Heavy equipment operator in service.", + "approximateDate": "04-11-2019", + "ratedDisabilityId": "1100583", + "diagnosticCode": 9999, "secondaryDisabilities": [ { - "name": "GHIJKLM", + "name": "PTSD personal trauma", "disabilityActionType": "SECONDARY", - "serviceRelevance": "ABCDEFGHIJKLMNOPQ", - "classificationCode": "ABCDEFGHIJKLMNO", - "approximateDate": "9904-01-03", - "exposureOrEventOrInjury": "EXPOSURE" + "serviceRelevance": "Caused by a service-connected disability\\nLengthy description", + "classificationCode": "249470", + "approximateDate": "03-01-2018", + "exposureOrEventOrInjury": "" } ], "isRelatedToToxicExposure": true, - "exposureOrEventOrInjury": "EXPOSURE" + "exposureOrEventOrInjury": "" } ], "treatments": [ @@ -3942,12 +3921,12 @@ ], "confinements": [ { - "approximateBeginDate": "2016-11-06", - "approximateEndDate": "2016-11-09" + "approximateBeginDate": "06-11-2016", + "approximateEndDate": "09-11-2016" }, { - "approximateBeginDate": "2019-11-06", - "approximateEndDate": "2019-11-09" + "approximateBeginDate": "06-2019", + "approximateEndDate": "07-2019" } ], "reservesNationalGuardService": { @@ -4638,8 +4617,8 @@ "id": "1", "type": "intent_to_file", "attributes": { - "creationDate": "2023-06-05", - "expirationDate": "2024-06-05", + "creationDate": "2023-06-07", + "expirationDate": "2024-06-07", "type": "compensation", "status": "active" } diff --git a/modules/claims_api/config/schemas/v2/526.json b/modules/claims_api/config/schemas/v2/526.json index a47e32ceb89..c142a4ee0d1 100644 --- a/modules/claims_api/config/schemas/v2/526.json +++ b/modules/claims_api/config/schemas/v2/526.json @@ -1,1103 +1,1102 @@ { - "$schema": "http://json-schema.org/draft-07/schema#", - "description": "Claims API 526 Schema", - "type": "object", - "additionalProperties": false, - "required": [ - "veteranIdentification", - "serviceInformation", - "disabilities", - "claimantCertification", - "claimProcessType" - ], - "properties": { - "claimDate": { - "description": "Date of claim submission to be applied to signature on form 21-526EZ. Date cannot be in the future.", - "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])(?:T[0-1][0-9]:[0-5][0-9]:[0-5][0-9](?:[-+][0-9]{2}:[0-9]{2}|Z))*$", - "type": "string", - "example": "2018-06-04" - }, - "claimProcessType": { - "type": "string", - "description": "Select type of claim program/process that applies to the Veteran.", - "enum": [ - "STANDARD_CLAIM_PROCESS", - "FDC_PROGRAM", - "BDD_PROGRAM" - ] - }, - "claimantCertification": { + "$schema": "http://json-schema.org/draft-07/schema#", + "description": "Claims API 526 Schema", + "type": "object", + "additionalProperties": false, + "required": [ + "veteranIdentification", + "serviceInformation", + "disabilities", + "claimantCertification", + "claimProcessType" + ], + "properties": { + "claimDate": { + "description": "Date of claim submission to be applied to signature on form 21-526EZ. Date cannot be in the future.", + "pattern": "^(?:[0-9]{4})-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])(?:T[0-1][0-9]:[0-5][0-9]:[0-5][0-9](?:[-+][0-9]{2}:[0-9]{2}|Z))*$", + "type": "string", + "example": "2018-06-04" + }, + "claimProcessType": { + "type": "string", + "description": "Select type of claim program/process that applies to the Veteran.", + "enum": [ + "STANDARD_CLAIM_PROCESS", + "FDC_PROGRAM", + "BDD_PROGRAM" + ] + }, + "claimantCertification": { + "type": "boolean", + "description": "Claimant certifies and authorizes release of information.", + "default": false + }, + "veteranIdentification": { + "type": "object", + "additionalProperties": false, + "required": ["mailingAddress"], + "properties": { + "currentlyVaEmployee": { "type": "boolean", - "description": "Claimant certifies and authorizes release of information.", + "description": "Set to true if Veteran is a VA employee.", "default": false + }, + "serviceNumber": { + "type": "string", + "description": "Service identification number", + "maxLength": 9 + }, + "emailAddress": { + "description": "Information associated with the Veteran's email address.", + "type": "object", + "properties": { + "email": { + "type": "string", + "pattern": "^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$", + "description": "The most current email address of the Veteran.", + "maxLength": 50 + }, + "agreeToEmailRelatedToClaim": { + "type": "boolean", + "description": "Agreement to email information relating to this claim.", + "example": true + } + } + }, + "veteranNumber": { + "description": "", + "type": "object", + "properties": { + "telephone": { + "type": "string", + "pattern": "^\\d{10}?$", + "description": "Veteran's phone number.", + "maxLength": 10 + }, + "internationalTelephone": { + "type": "string", + "pattern": "^\\d{10}?$", + "description": "Veteran's international phone number.", + "maxLength": 10 + } + } + }, + "vaFileNumber": { + "type": "string", + "description": "VA File Number associated to the Veteran.", + "maxLength": 9 }, - "veteranIdentification": { + "mailingAddress": { "type": "object", "additionalProperties": false, - "required": ["mailingAddress"], "properties": { - "currentlyVaEmployee": { - "type": "boolean", - "description": "Set to true if Veteran is a VA employee.", - "default": false + "numberAndStreet": { + "description": "Number and street, rural route, or P.O. Box for the Veteran's current mailing address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 30, + "example": "1234 Couch Street" + }, + "apartmentOrUnitNumber": { + "description": "Apartment or unit number for the Veteran's current mailing address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 5, + "example": "22" + }, + "city": { + "description": "City for the Veteran's current mailing address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.#]([-a-zA-Z0-9'.# ])?)+$", + "example": "Portland" + }, + "country": { + "description": "Country for the Veteran's current mailing address. Must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "type": "string", + "example": "USA" + }, + "zipFirstFive": { + "description": "Zipcode (First 5 digits) for the Veteran's current mailing address.", + "type": "string", + "pattern": "^\\d{5}?$", + "example": "12345" }, - "serviceNumber": { + "zipLastFour": { + "description": "Zipcode (Last 4 digits) for the Veteran's current mailing address.", "type": "string", - "description": "Service identification number", - "maxLength": 9 + "pattern": "^\\d{4}?$", + "example": "6789" }, - "emailAddress": { - "description": "Information associated with the Veteran's email address.", + "state": { + "description": "State for the Veteran's current mailing address.", + "type": "string", + "pattern": "^[a-z,A-Z]{2}$", + "example": "OR" + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "const": "DOMESTIC" + } + } + }, + "then": { + "required": [ + "numberAndStreet", + "city", + "country", + "zipFirstFive", + "state" + ] + } + } + ] + } + } + }, + "changeOfAddress": { + "type": "object", + "additionalProperties": false, + "required": ["country", "typeOfAddressChange", "numberAndStreet", "dates"], + "properties": { + "dates": { "type": "object", "properties": { - "email": { + "beginningDate": { + "description": "Date in YYYY-MM-DD the Veteran changed address. Date must be in the future if change is temporary.", + "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", "type": "string", - "pattern": "^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$", - "description": "The most current email address of the Veteran.", - "maxLength": 50 + "example": "2018-06-04" }, - "agreeToEmailRelatedToClaim": { - "type": "boolean", - "description": "Agreement to email information relating to this claim.", - "example": true + "endingDate": { + "description": "Date in YYYY-MM-DD the changed address expires, if change is temporary.", + "type": "string", + "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "2018-06-04" } } - }, - "veteranNumber": { - "description": "", + }, + "typeOfAddressChange": { + "description": "Temporary or Permanent change of address.", + "type": "string", + "enum": [ + "TEMPORARY", + "PERMANENT" + ], + "example": "PERMANENT" + }, + "numberAndStreet": { + "description": "Number and street, rural route, or P.O. Box for the Veteran's new address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "maxLength": 30, + "example": "1234 Couch Street" + }, + "apartmentOrUnitNumber": { + "description": "Apartment or unit number for the Veteran's new address.", + "type": "string", + "maxLength": 5, + "example": "22" + }, + "city": { + "description": "City for the Veteran's new address.", + "type": "string", + "pattern": "^([-a-zA-Z0-9'.#]([-a-zA-Z0-9'.# ])?)+$", + "example": "Portland" + }, + "country": { + "description": "Country for the Veteran's new address. Value must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "type": "string", + "example": "USA" + }, + "zipFirstFive": { + "description": "Zipcode (First 5 digits) for the Veteran's new address.", + "type": "string", + "pattern": "^\\d{5}?$", + "example": "12345" + }, + "zipLastFour": { + "description": "Zipcode (Last 4 digits) for the Veteran's new address.", + "type": "string", + "pattern": "^\\d{4}?$", + "example": "6789" + }, + "state": { + "description": "State for the Veteran's new address.", + "type": "string", + "pattern": "^[a-z,A-Z]{2}$", + "example": "OR" + } + }, + "allOf": [ + { + "if": { + "properties": { + "type": { + "const": "DOMESTIC" + } + } + }, + "then": { + "required": [ + "city", + "zipFirstFive", + "state" + ] + } + }, + { + "if": { + "properties": { + "type": { + "const": "MILITARY" + } + } + }, + "then": { + "required": [ + "zipFirstFive" + ] + } + } + ] + }, + "homeless": { + "type": "object", + "additionalProperties": false, + "properties": { + "pointOfContact": { + "description": "Point of contact in direct contact with Veteran.", + "type": "string", + "minLength": 1, + "maxLength": 100, + "pattern": "^([-a-zA-Z0-9/']+( ?))*$", + "example": "Jane Doe" + }, + "pointOfContactNumber": { "type": "object", + "additionalProperties": false, "properties": { "telephone": { + "description": "Primary phone of Point of Contact.", "type": "string", "pattern": "^\\d{10}?$", - "description": "Veteran's phone number.", + "example": "5555555", "maxLength": 10 - }, + }, "internationalTelephone": { + "description": "international phone of Point of Contact.", "type": "string", "pattern": "^\\d{10}?$", - "description": "Veteran's international phone number.", - "maxLength": 10 + "example": "5555555", + "maxLength": 10 } } - }, - "vaFileNumber": { - "type": "string", - "description": "VA File Number associated to the Veteran.", - "maxLength": 9 }, - "mailingAddress": { + "currentlyHomeless": { "type": "object", "additionalProperties": false, "properties": { - "numberAndStreet": { - "description": "Number and street, rural route, or P.O. Box for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 30, - "example": "1234 Couch Street" - }, - "apartmentOrUnitNumber": { - "description": "Apartment or unit number for the Veteran's current mailing address.", + "homelessSituationOptions": { + "description": "Current state of the veteran's homelessness.", "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 5, - "example": "22" - }, - "city": { - "description": "City for the Veteran's current mailing address.", - "type": "string", - "pattern": "^([-a-zA-Z0-9'.#]([-a-zA-Z0-9'.# ])?)+$", - "example": "Portland" - }, - "country": { - "description": "Country for the Veteran's current mailing address. Must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "default": "other", + "enum": [ + "LIVING_IN_A_HOMELESS_SHELTER", + "NOT_CURRENTLY_IN_A_SHELTERED_ENVIRONMENT", + "STAYING_WITH_ANOTHER_PERSON", + "FLEEING_CURRENT_RESIDENCE", + "OTHER" + ], + "example": "FLEEING_CURRENT_RESIDENCE" + }, + "otherDescription": { + "description": "For a 'homelessSituationOptions' of value 'other', please provide additional comments on the living situation.", "type": "string", - "example": "USA" - }, - "zipFirstFive": { - "description": "Zipcode (First 5 digits) for the Veteran's current mailing address.", + "maxLength": 500, + "example": "other living situation" + } + } + }, + "riskOfBecomingHomeless": { + "type": "object", + "additionalProperties": false, + "properties": { + "livingSituationOptions": { "type": "string", - "pattern": "^\\d{5}?$", - "example": "12345" - }, - "zipLastFour": { - "description": "Zipcode (Last 4 digits) for the Veteran's current mailing address.", + "default": "OTHER", + "enum": ["HOUSING_WILL_BE_LOST_IN_30_DAYS", "LEAVING_PUBLICLY_FUNDED_SYSTEM_OF_CARE", "OTHER"] + }, + "otherDescription": { + "description": "For a 'livingSituationOptions' of value 'other', please provide additional comments on the living situation.", "type": "string", - "pattern": "^\\d{4}?$", - "example": "6789" + "maxLength": 500, + "example": "other living situation" + } + } + } + } + }, + "toxicExposure": { + "type": "object", + "properties": { + "gulfWarHazardService": { + "type": "object", + "description": "Toxic exposure related to the Gulf war.", + "properties": { + "servedInGulfWarHazardLocations": { + "type": "boolean", + "description": "Did the Veteran serve in any of the following Gulf War hazard locations? Iraq; Kuwait; Saudi Arabia; the neutral zone between Iraq and Saudi Arabia; Bahrain; Qatar; the United Arab Emirates; Oman; Yemen; Lebanon; Somalia; Afghanistan; Israel; Egypt; Turkey; Syria; Jordan; Djibouti; Uzbekistan; the Gulf of Aden; the Gulf of Oman; the Persian Gulf; the Arabian Sea; and the Red Sea.", + "example": true }, - "state": { - "description": "State for the Veteran's current mailing address.", - "type": "string", - "pattern": "^[a-z,A-Z]{2}$", - "example": "OR" - } - }, - "allOf": [ - { - "if": { + "serviceDates": { + "type": "object", + "description": "Date range for when the exposure happened.", "properties": { - "type": { - "const": "DOMESTIC" + "startDate": { + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", + "type": "string", + "description": "Approximate start date for serving in Gulf War hazard location.", + "example": "06-2018" + }, + "endDate": { + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", + "type": "string", + "description": "Approximate end date for serving in Gulf War hazard location.", + "example": "06-2018" } } + } + } + }, + "herbicideHazardService": { + "type": "object", + "description": "Toxic exposure related to herbicide hazards.", + "properties": { + "servedInHerbicideHazardLocations": { + "type": "boolean", + "description": "Did the Veteran serve in any of the following Herbicide (e.g., Agent Orange) locations? These locations include: Republic of Vietnam to include the 12 nautical mile territorial waters; Thailand at any United States or Royal Thai base; Laos; Cambodia at Mimot or Krek; Kampong Cham Province; Guam or American Samoa; or in the territorial waters thereof; Johnston Atoll or a ship that called at Johnston Atoll; Korean demilitarized zone; aboard (to include repeated operations and maintenance with) a C-123 aircraft known to have been used to spray an herbicide agent (during service in the Air Force and Air Force Reserves)." }, - "then": { - "required": [ - "numberAndStreet", - "city", - "country", - "zipFirstFive", - "state" - ] + "otherLocationsServed": { + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "description": "Other location(s) where Veteran served." + }, + "serviceDates": { + "type": "object", + "description": "Date range for when the exposure happened.", + "properties": { + "startDate": { + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", + "type": "string", + "description": "Approximate start date for serving in herbicide location.", + "example": "06-2018" + }, + "endDate": { + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", + "type": "string", + "description": "Approximate end date for serving in herbicide location.", + "example": "06-2018" + } + } } - } - ] - } - } - }, - "changeOfAddress": { - "type": "object", - "additionalProperties": false, - "required": ["country", "typeOfAddressChange", "numberAndStreet", "dates"], - "properties": { - "dates": { - "type": "object", - "properties": { - "beginningDate": { - "description": "Date in YYYY-MM-DD the Veteran changed address. Date must be in the future if change is temporary.", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + } + }, + "additionalHazardExposures": { + "type": "object", + "description": "Additional hazardous exposures.", + "properties": { + "additionalExposures": { + "description": "Additional exposure incidents.", + "type": "array", + "uniqueItems": true, + "items": { "type": "string", - "example": "2018-06-04" - }, - "endingDate": { - "description": "Date in YYYY-MM-DD the changed address expires, if change is temporary.", + "additionalProperties": false, + "enum": [ + "ASBESTOS", + "MUSTARD_GAS", + "RADIATION", + "SHAD", + "MILITARY_OCCUPATIONAL_SPECIALTY_RELATED", + "CONTAMINATED_WATER_AT_CAMP_LEJEUNE", + "OTHER" + ] + } + }, + "specifyOtherExposures": { + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "description": "Exposure to asbestos." + }, + "exposureDates": { + "type": "object", + "description": "Date range for when the exposure happened.", + "properties": { + "startDate": { + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", + "type": "string", + "description": "Approximate start date for exposure.", + "example": "06-2018" + }, + "endDate": { + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-06-04" + "description": "Approximate end date for exposure.", + "example": "06-2018" + } } } - }, - "typeOfAddressChange": { - "description": "Temporary or Permanent change of address.", + } + }, + "multipleExposures": { + "type": "object", + "description": "", + "properties": { + "exposureDates": { + "type": "object", + "description": "Date range for when the exposure happened.", + "properties": { + "startDate": { + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", + "type": "string", + "description": "Approximate start date for exposure.", + "example": "06-2018" + }, + "endDate": { + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", + "type": "string", + "description": "Approximate end date for exposure.", + "example": "06-2018" + } + } + }, + "exposureLocation": { + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "description": "" + }, + "hazardExposedTo": { + "type": "string", + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", + "description": "" + } + } + } + } + }, + "disabilities": { + "description": "Any current disabilities or symptoms the Veteran is claiming are related to their military service and/or are service-connected.", + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object", + "additionalProperties": false, + "required": ["disabilityActionType", "name"], + "properties": { + "name": { + "description": "If 'classificationCode' is included, the disability 'name' must match the associated name value returned in the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", "type": "string", - "enum": [ - "TEMPORARY", - "PERMANENT" - ], - "example": "PERMANENT" + "example": "PTSD (post traumatic stress disorder)" }, - "numberAndStreet": { - "description": "Number and street, rural route, or P.O. Box for the Veteran's new address.", + "classificationCode": { "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "maxLength": 30, - "example": "1234 Couch Street" + "description": "The contention classification code must match the associated id value returned in the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current). If 'classificationCode' is included, the disability 'name' must match the associated name value returned in the /disabilities endpoint.", + "example": "249470" }, - "apartmentOrUnitNumber": { - "description": "Apartment or unit number for the Veteran's new address.", + "serviceRelevance": { + "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury.", "type": "string", - "maxLength": 5, - "example": "22" + "example": "Heavy equipment operator in service." }, - "city": { - "description": "City for the Veteran's new address.", + "approximateDate": { + "description": "Approximate date disability began. Date must be in the past. \n Format can be either MM-DD-YYYY or MM-YYYY", "type": "string", - "pattern": "^([-a-zA-Z0-9'.#]([-a-zA-Z0-9'.# ])?)+$", - "example": "Portland" + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", + "example": "03-12-2019 or 03-2019" }, - "country": { - "description": "Country for the Veteran's new address. Value must match the values returned by the /countries endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "ratedDisabilityId": { + "description": "When submitting a contention with action type INCREASE, the previously rated disability id may be included.", "type": "string", - "example": "USA" + "example": "1100583" }, - "zipFirstFive": { - "description": "Zipcode (First 5 digits) for the Veteran's new address.", - "type": "string", - "pattern": "^\\d{5}?$", - "example": "12345" + "diagnosticCode": { + "description": "The diagnosticCode is required if disabilityActionType is NONE and there are secondary disabilities included with the primary. The diagnosticCode must match an existing rated disability if disabilityActionType is NONE and there are secondary disabilities included with the primary.", + "type": "integer", + "example": 9999 }, - "zipLastFour": { - "description": "Zipcode (Last 4 digits) for the Veteran's new address.", + "disabilityActionType": { + "description": "The status of the current disability. \n If value is \"INCREASE\", then \"ratedDisabilityId\" and \"diagnosticCode\" are required.", "type": "string", - "pattern": "^\\d{4}?$", - "example": "6789" + "enum": [ + "NONE", + "NEW", + "SECONDARY", + "REOPEN", + "INCREASE" + ], + "example": "NEW" + }, + "secondaryDisabilities": { + "description": "Identifies the Secondary Service Disability information of the Veteran.", + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object", + "additionalProperties": false, + "required": ["name", "disabilityActionType", "serviceRelevance"], + "properties": { + "name": { + "description": "What the Disability is called.", + "type": "string", + "pattern": "([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,# ])?)+$", + "example": "PTSD (post traumatic stress disorder)", + "maxLength" : 255 + }, + "disabilityActionType": { + "description": "The status of the secondary disability.", + "type": "string", + "enum": ["SECONDARY"], + "example": "SECONDARY" + }, + "serviceRelevance": { + "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury.", + "type": "string", + "example": "Heavy equipment operator in service." + }, + "classificationCode": { + "type": "string", + "example": "249470" + }, + "approximateDate": { + "description": "Approximate date disability began. \n Format can be either MM-DD-YYYY or MM-YYYY", + "type": "string", + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", + "example": "03-12-2019 or 03-2019" + }, + "exposureOrEventOrInjury": { + "type": "string", + "description": "What caused the disability?", + "enum": [ + "EXPOSURE", + "EVENT", + "INJURY" + ] + } + } + } + }, + "isRelatedToToxicExposure": { + "type": "boolean", + "description": "Is the disability related to toxic exposures? If so, include exposure information.", + "example": true }, - "state": { - "description": "State for the Veteran's new address.", + "exposureOrEventOrInjury": { "type": "string", - "pattern": "^[a-z,A-Z]{2}$", - "example": "OR" + "description": "Type of exposure, event, or injury.", + "examples": ["Agent Orange", "radiation", "burn pits"] } }, - "allOf": [ - { + "allOf": [ + { "if": { - "properties": { - "type": { - "const": "DOMESTIC" - } + "properties": { + "disabilityActionType": { + "enum": ["INCREASE"] } + } }, "then": { - "required": [ - "city", - "zipFirstFive", - "state" - ] + "required": ["ratedDisabilityId", "diagnosticCode"] } - }, - { + }, + { "if": { - "properties": { - "type": { - "const": "MILITARY" - } + "properties": { + "disabilityActionType": { + "enum": ["NONE"] } }, + "required": ["secondaryDisabilities"] + }, "then": { - "required": [ - "zipFirstFive" - ] - } + "required": ["diagnosticCode"] } + } ] - }, - "homeless": { + } + }, + "treatments": { + "description": "Identifies the Service Treatment information of the Veteran.", + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { "type": "object", "additionalProperties": false, + "required": [ + "treatedDisabilityNames", + "center" + ], "properties": { - "pointOfContact": { - "description": "Point of contact in direct contact with Veteran.", - "type": "string", - "minLength": 1, - "maxLength": 100, - "pattern": "^([-a-zA-Z0-9/']+( ?))*$", - "example": "Jane Doe" + "startDate": { + "description": "Start date for treatment. If treatment began from 2005 to present, you do not need to provide dates.", + "type": ["null", "string"], + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", + "example": "02-2018" }, - "pointOfContactNumber": { + "treatedDisabilityNames": { + "description": "Name(s) of Disabilities treated in this time frame.", + "type": "array", + "minItems": 1, + "maxItems": 101, + "items": { + "type": "string", + "additionalProperties": false, + "example": ["PTSD (post traumatic stress disorder)","Trauma"] + } + }, + "center": { + "description": "VA Medical Center(s) and Department of Defense Military Treatment Facilities where the Veteran received treatment after discharge for any claimed disabilities.", "type": "object", "additionalProperties": false, + "required": ["name", "state"], "properties": { - "telephone": { - "description": "Primary phone of Point of Contact.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555", - "maxLength": 10 - }, - "internationalTelephone": { - "description": "international phone of Point of Contact.", - "type": "string", - "pattern": "^\\d{10}?$", - "example": "5555555", - "maxLength": 10 - } - } - }, - "currentlyHomeless": { - "type": "object", - "additionalProperties": false, - "properties": { - "homelessSituationOptions": { - "description": "Current state of the veteran's homelessness.", - "type": "string", - "default": "other", - "enum": [ - "LIVING_IN_A_HOMELESS_SHELTER", - "NOT_CURRENTLY_IN_A_SHELTERED_ENVIRONMENT", - "STAYING_WITH_ANOTHER_PERSON", - "FLEEING_CURRENT_RESIDENCE", - "OTHER" - ], - "example": "FLEEING_CURRENT_RESIDENCE" - }, - "otherDescription": { - "description": "For a 'homelessSituationOptions' of value 'other', please provide additional comments on the living situation.", - "type": "string", - "maxLength": 500, - "example": "other living situation" - } - } - }, - "riskOfBecomingHomeless": { - "type": "object", - "additionalProperties": false, - "properties": { - "livingSituationOptions": { - "type": "string", - "default": "OTHER", - "enum": ["HOUSING_WILL_BE_LOST_IN_30_DAYS", "LEAVING_PUBLICLY_FUNDED_SYSTEM_OF_CARE", "OTHER"] - }, - "otherDescription": { - "description": "For a 'livingSituationOptions' of value 'other', please provide additional comments on the living situation.", - "type": "string", - "maxLength": 500, - "example": "other living situation" - } - } - } - } + "name": { + "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", + "type": "string", + "pattern": "(?!(?: )$)([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,# ])?)+$", + "example": "Private Facility 2", + "minLength": 1, + "maxLength": 100 + }, + "city": { + "description": "City of treatment facility.", + "type": "string", + "pattern": "^([-a-zA-Z'.#]([-a-zA-Z'.# ])?)+$", + "example": "Portland" + }, + "state": { + "description": "State of treatment facility.", + "type": "string", + "pattern": "^[a-z,A-Z]{2}$", + "example": "OR" + } + } + } + } + } }, - "toxicExposure": { + "serviceInformation": { "type": "object", + "additionalProperties": false, + "required": ["servicePeriods"], "properties": { - "gulfWarHazardService": { - "type": "object", - "description": "Toxic exposure related to the Gulf war.", - "properties": { - "servedInGulfWarHazardLocations": { - "type": "boolean", - "description": "Did the Veteran serve in any of the following Gulf War hazard locations? Iraq; Kuwait; Saudi Arabia; the neutral zone between Iraq and Saudi Arabia; Bahrain; Qatar; the United Arab Emirates; Oman; Yemen; Lebanon; Somalia; Afghanistan; Israel; Egypt; Turkey; Syria; Jordan; Djibouti; Uzbekistan; the Gulf of Aden; the Gulf of Oman; the Persian Gulf; the Arabian Sea; and the Red Sea.", - "example": true - }, - "serviceDates": { - "type": "object", - "description": "Date range for when the exposure happened.", - "properties": { - "startDate": { - "type": "string", - "pattern": "(?!(?: )$)([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,# ])?)+$", - "example": "Private Facility 2", - "minLength": 1, - "maxLength": 100 - } - }, - "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "type": "string", - "description": "Approximate end date for serving in Gulf War hazard location.", - "example": "2018-06-04" - } - } - } - }, - "herbicideHazardService": { - "type": "object", - "description": "Toxic exposure related to herbicide hazards.", - "properties": { - "servedInHerbicideHazardLocations": { - "type": "boolean", - "description": "Did the Veteran serve in any of the following Herbicide (e.g., Agent Orange) locations? These locations include: Republic of Vietnam to include the 12 nautical mile territorial waters; Thailand at any United States or Royal Thai base; Laos; Cambodia at Mimot or Krek; Kampong Cham Province; Guam or American Samoa; or in the territorial waters thereof; Johnston Atoll or a ship that called at Johnston Atoll; Korean demilitarized zone; aboard (to include repeated operations and maintenance with) a C-123 aircraft known to have been used to spray an herbicide agent (during service in the Air Force and Air Force Reserves)." - }, - "otherLocationsServed": { - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "description": "Other location(s) where Veteran served." - }, - "serviceDates": { - "type": "object", - "description": "Date range for when the exposure happened.", - "properties": { - "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "type": "string", - "description": "Approximate start date for serving in herbicide location.", - "example": "2018-06-04" - }, - "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "type": "string", - "description": "Approximate end date for serving in herbicide location.", - "example": "2018-06-04" - } + "servicePeriods": { + "description": "Identifies the Service dates and Branch the Veteran served in.", + "type": "array", + "minItems": 1, + "uniqueItems": true, + "items": { + "type": "object", + "required": [ + "serviceBranch", + "activeDutyBeginDate", + "activeDutyEndDate" + ], + "properties": { + "serviceBranch": { + "description": "Branch of Service during period.", + "type": "string", + "example": "Air Force", + "enum": [ + "Air Force", + "Air Force Academy", + "Air Force Reserves", + "Air Force Civilian", + "Air National Guard", + "Army", + "Army Air Corps", + "Army Air Corps or Army Air Force", + "Army National Guard", + "Army Nurse Corps", + "Army Reserves", + "Coast Guard", + "Coast Guard Academy", + "Coast Guard Reserves", + "Commonwealth Army Veteran", + "Guerrilla Combination Service", + "Marine", + "Marine Corps", + "Marine Corps Reserves", + "Merchant Marine", + "National Oceanic & Atmospheric Administration", + "National Oceanic and Atmospheric Administration", + "Naval Academy", + "Navy", + "Navy Reserves", + "Other", + "Public Health Service", + "Regular Philippine Scout", + "Regular Scout Service", + "Space Force", + "Special Philippine Scout", + "Unknown", + "US Military Academy", + "Woman Air Corps", + "Women's Army Corps" + ] + }, + "serviceComponent": { + "type": "string", + "description": "", + "enum": [ + "Active", + "Reserves", + "National Guard" + ] + }, + "activeDutyBeginDate": { + "description": "Date Started Active Duty.", + "type": "string", + "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "1980-02-05" + }, + "activeDutyEndDate": { + "description": "Date Completed Active Duty. If in the future, 'separationLocationCode' is required.", + "type": "string", + "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "example": "1990-01-02" + }, + "separationLocationCode": { + "description": "Location code for the facility the Veteran plans to separate from. Required if 'servicePeriod.activeDutyEndDate' is in the future. Code must match the values returned by the /intake-sites endpoint on the [Benefits reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", + "type": "string", + "example": "98283" } } } }, - "additionalHazardExposures": { - "type": "object", - "description": "Additional hazardous exposures.", - "properties": { - "additionalExposures": { - "description": "Additional exposure incidents.", - "type": "array", - "uniqueItems": true, - "items": { + "confinements": { + "type": "array", + "description": "", + "uniqueItems": true, + "items": { + "additionalProperties": false, + "type": "object", + "required": [ + "approximateBeginDate", + "approximateEndDate" + ], + "properties": { + "approximateBeginDate": { + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", "type": "string", - "additionalProperties": false, - "enum": [ - "ASBESTOS", - "MUSTARD_GAS", - "RADIATION", - "SHAD", - "MILITARY_OCCUPATIONAL_SPECIALTY_RELATED", - "CONTAMINATED_WATER_AT_CAMP_LEJEUNE", - "OTHER" - ] - } - }, - "specifyOtherExposures": { - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "description": "Exposure to asbestos." - }, - "exposureDates": { - "type": "object", - "description": "Date range for when the exposure happened.", - "properties": { - "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "type": "string", - "description": "Approximate start date for exposure.", - "example": "2018-06-04" - }, - "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "type": "string", - "description": "Approximate end date for exposure.", - "example": "2018-06-04" - } + "example": "06-12-2019 or 06-2019" + }, + "approximateEndDate": { + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", + "type": "string", + "example": "07-12-2019 or 07-2019" } } } - }, - "multipleExposures": { + }, + "reservesNationalGuardService": { "type": "object", - "description": "", + "additionalProperties": false, + "required": [ + "obligationTermsOfService", + "unitName" + ], "properties": { - "exposureDates": { + "obligationTermsOfService": { "type": "object", - "description": "Date range for when the exposure happened.", + "additionalProperties": false, + "required": ["startDate","endDate"], "properties": { "startDate": { "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", "type": "string", - "description": "Approximate start date for exposure.", "example": "2018-06-04" }, "endDate": { "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", "type": "string", - "description": "Approximate end date for exposure.", "example": "2018-06-04" } } }, - "exposureLocation": { - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "description": "" - }, - "hazardExposedTo": { + "component": { "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$", - "description": "" - } - } - } - } - }, - "disabilities": { - "description": "Any current disabilities or symptoms the Veteran is claiming are related to their military service and/or are service-connected.", - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items": { - "type": "object", - "additionalProperties": false, - "required": ["disabilityActionType", "name"], - "properties": { - "name": { - "description": "If 'classificationCode' is included, the disability 'name' must match the associated name value returned in the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "example": "PTSD (post traumatic stress disorder)" - }, - "classificationCode": { - "type": "string", - "description": "The contention classification code must match the associated id value returned in the /disabilities endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current). If 'classificationCode' is included, the disability 'name' must match the associated name value returned in the /disabilities endpoint.", - "example": "249470" - }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury.", - "type": "string", - "example": "Heavy equipment operator in service." - }, - "approximateDate": { - "description": "Approximate date disability began. Date must be in the past.", - "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" - }, - "ratedDisabilityId": { - "description": "When submitting a contention with action type INCREASE, the previously rated disability id may be included.", - "type": "string", - "example": "1100583" - }, - "diagnosticCode": { - "description": "The diagnosticCode is required if disabilityActionType is NONE and there are secondary disabilities included with the primary. The diagnosticCode must match an existing rated disability if disabilityActionType is NONE and there are secondary disabilities included with the primary.", - "type": "integer", - "example": 9999 - }, - "disabilityActionType": { - "description": "The status of the current disability. \n If value is \"INCREASE\", then \"ratedDisabilityId\" and \"diagnosticCode\" are required.", - "type": "string", - "enum": [ - "NONE", - "NEW", - "SECONDARY", - "REOPEN", - "INCREASE" - ], - "example": "NEW" - }, - "secondaryDisabilities": { - "description": "Identifies the Secondary Service Disability information of the Veteran.", - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items": { - "type": "object", - "additionalProperties": false, - "required": ["name", "disabilityActionType", "serviceRelevance"], + "description": "", + "enum": ["Active", "Reserves", "National Guard"] + }, + "title10Activation": { + "description": "Include if the Veteran is currently activated on federal orders within the National Guard or Reserves", + "type": "object", + "additionalProperties": false, + "required": [ + "anticipatedSeparationDate", + "title10ActivationDate" + ], "properties": { - "name": { - "description": "What the Disability is called.", - "type": "string", - "pattern": "([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,# ])?)+$", - "example": "PTSD (post traumatic stress disorder)", - "maxLength" : 255 - }, - "disabilityActionType": { - "description": "The status of the secondary disability.", - "type": "string", - "enum": ["SECONDARY"], - "example": "SECONDARY" - }, - "serviceRelevance": { - "description": "Explanation of how the disability(ies) relates to the in-service event/exposure/injury.", - "type": "string", - "example": "Heavy equipment operator in service." - }, - "classificationCode": { - "type": "string", - "example": "249470" - }, - "approximateDate": { - "description": "Approximate date disability began.", - "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" - }, - "exposureOrEventOrInjury": { - "type": "string", - "description": "What caused the disability?", - "enum": [ - "EXPOSURE", - "EVENT", - "INJURY" - ] - } + "anticipatedSeparationDate": { + "description": "Anticipated date of separation. Date must be in the future.", + "type": "string", + "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$" + }, + "title10ActivationDate": { + "description": "Date cannot be in the future and must be after the earliest servicePeriod.activeDutyBeginDate.", + "type": "string", + "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$" } - } - }, - "isRelatedToToxicExposure": { - "type": "boolean", - "description": "Is the disability related to toxic exposures? If so, include exposure information.", - "example": true - }, - "exposureOrEventOrInjury": { - "type": "string", - "description": "Type of exposure, event, or injury.", - "examples": ["Agent Orange", "radiation", "burn pits"] - } - }, - "allOf": [ - { - "if": { - "properties": { - "disabilityActionType": { - "enum": ["INCREASE"] - } - } - }, - "then": { - "required": ["ratedDisabilityId", "diagnosticCode"] - } - }, - { - "if": { - "properties": { - "disabilityActionType": { - "enum": ["NONE"] - } - }, - "required": ["secondaryDisabilities"] - }, - "then": { - "required": ["diagnosticCode"] - } - } - ] - } - }, - "treatments": { - "description": "Identifies the Service Treatment information of the Veteran.", - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items": { - "type": "object", - "additionalProperties": false, - "required": [ - "treatedDisabilityNames", - "center" - ], - "properties": { - "startDate": { - "description": "Start date for treatment. If treatment began from 2005 to present, you do not need to provide dates.", - "type": ["null", "string"], - "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", - "example": "02-2018" - }, - "treatedDisabilityNames": { - "description": "Name(s) of Disabilities treated in this time frame.", - "type": "array", - "minItems": 1, - "maxItems": 101, - "items": { + } + }, + "unitName": { + "type": "string", + "pattern": "([a-zA-Z0-9\\-'.,# ][a-zA-Z0-9\\-'.,# ]?)*$" + }, + "unitAddress": { "type": "string", - "additionalProperties": false, - "example": ["PTSD (post traumatic stress disorder)","Trauma"] - } - }, - "center": { - "description": "VA Medical Center(s) and Department of Defense Military Treatment Facilities where the Veteran received treatment after discharge for any claimed disabilities.", - "type": "object", - "additionalProperties": false, - "required": ["name", "state"], - "properties": { - "name": { - "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", - "type": "string", - "pattern": "(?!(?: )$)([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,# ])?)+$", - "example": "Private Facility 2", - "minLength": 1, - "maxLength": 100 - }, - "city": { - "description": "City of treatment facility.", - "type": "string", - "pattern": "^([-a-zA-Z'.#]([-a-zA-Z'.# ])?)+$", - "example": "Portland" + "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$" + }, + "unitPhone": { + "type": "object", + "additionalProperties": false, + "required": ["areaCode", "phoneNumber"], + "properties": { + "areaCode": { + "type": "string", + "maxLength": 3, + "pattern": "^\\d{3}$", + "example": "555" }, - "state": { - "description": "State of treatment facility.", - "type": "string", - "pattern": "^[a-z,A-Z]{2}$", - "example": "OR" + "phoneNumber": { + "type": "string", + "maxLength": 7, + "pattern": "^\\d{7}$", + "example": "5555555" } } - } + }, + "receivingInactiveDutyTrainingPay": { + "type": "boolean" + } } + }, + "alternateNames": { + "description": "List any other names under which the Veteran served, if applicable.", + "type": "array", + "maxItems": 100, + "uniqueItems": true, + "items": { + "type": "string", + "additionalProperties": false, + "examples": ["jane", "janey lee", "jane lee MacDonald"] + } + }, + "servedInActiveCombatSince911": { + "type": "boolean", + "description": "Did Veteran serve in a combat zone since 9-11-2001?", + "example": true } + } }, - "serviceInformation": { - "type": "object", - "additionalProperties": false, - "required": ["servicePeriods"], - "properties": { - "servicePeriods": { - "description": "Identifies the Service dates and Branch the Veteran served in.", - "type": "array", - "minItems": 1, - "uniqueItems": true, - "items": { - "type": "object", - "required": [ - "serviceBranch", - "activeDutyBeginDate", - "activeDutyEndDate" + "servicePay": { + "type": "object", + "additionalProperties": false, + "properties": { + "favorTrainingPay": { + "description": "Is the Veteran waiving VA benefits to retain training pay? See item 28 on form 21-526EZ for more details. ", + "type": "boolean", + "example": true + }, + "favorMilitaryRetiredPay": { + "description": "Is the Veteran waiving VA benefits to retain military retired pay? See item 26 on form 21-526EZ for more details.", + "type": "boolean", + "example": true + }, + "receivingMilitaryRetiredPay": { + "description": "Is the Veteran receiving military retired pay?", + "type": "boolean", + "example": true + }, + "futureMilitaryRetiredPay": { + "description": "Will the Veteran receive military retired pay pay in future? \n If true, then 'futurePayExplanation' is required.", + "type": "boolean", + "default": false, + "example": false + }, + "futureMilitaryRetiredPayExplanation": { + "description": "Explains why future pay will be received.", + "type": "string", + "example": "Will be retiring soon." + }, + "militaryRetiredPay": { + "type": "object", + "description": "", + "properties": { + "branchOfService": { + "description": "Branch of Service making payments.", + "type": "string", + "enum": [ + "Air Force", + "Air Force Reserves", + "Air National Guard", + "Army", + "Army National Guard", + "Army Reserves", + "Coast Guard", + "Coast Guard Reserves", + "Marine Corps", + "Marine Corps Reserves", + "National Oceanic & Atmospheric Administration", + "National Oceanic & Atmospheric Administration", + "Navy", + "Navy Reserves", + "Public Health Service", + "Air Force Academy", + "Army Air Corps or Army Air Force", + "Army Nurse Corps", + "Coast Guard Academy", + "Merchant Marine", + "Naval Academy", + "Other", + "US Military Academy", + "Women's Army Corps", + "Space Force" ], - "properties": { - "serviceBranch": { - "description": "Branch of Service during period.", - "type": "string", - "example": "Air Force", - "enum": [ - "Air Force", - "Air Force Academy", - "Air Force Reserves", - "Air Force Civilian", - "Air National Guard", - "Army", - "Army Air Corps", - "Army Air Corps or Army Air Force", - "Army National Guard", - "Army Nurse Corps", - "Army Reserves", - "Coast Guard", - "Coast Guard Academy", - "Coast Guard Reserves", - "Commonwealth Army Veteran", - "Guerrilla Combination Service", - "Marine", - "Marine Corps", - "Marine Corps Reserves", - "Merchant Marine", - "National Oceanic & Atmospheric Administration", - "National Oceanic and Atmospheric Administration", - "Naval Academy", - "Navy", - "Navy Reserves", - "Other", - "Public Health Service", - "Regular Philippine Scout", - "Regular Scout Service", - "Space Force", - "Special Philippine Scout", - "Unknown", - "US Military Academy", - "Woman Air Corps", - "Women's Army Corps" - ] - }, - "serviceComponent": { - "type": "string", - "description": "", - "enum": [ - "Active", - "Reserves", - "National Guard" - ] - }, - "activeDutyBeginDate": { - "description": "Date Started Active Duty.", - "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "1980-02-05" - }, - "activeDutyEndDate": { - "description": "Date Completed Active Duty. If in the future, 'separationLocationCode' is required.", - "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "1990-01-02" - }, - "separationLocationCode": { - "description": "Location code for the facility the Veteran plans to separate from. Required if 'servicePeriod.activeDutyEndDate' is in the future. Code must match the values returned by the /intake-sites endpoint on the [Benefits reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current).", - "type": "string", - "example": "98283" - } - } + "example": "Air Force" + }, + "monthlyAmount": { + "description": "Amount being received.", + "type": "number", + "minimum": 1, + "maximum": 999999, + "example": 100 } - }, - "confinements": { - "type": "array", - "description": "", - "uniqueItems": true, - "items": { - "additionalProperties": false, - "type": "object", - "required": [ - "approximateBeginDate", - "approximateEndDate" + } + }, + "retiredStatus": { + "type": "string", + "description": "", + "enum": [ + "RETIRED", + "TEMPORARY_DISABILITY_RETIRED_LIST", + "PERMANENT_DISABILITY_RETIRED_LIST" + ] + }, + "receivedSeparationOrSeverancePay": { + "description": "Has the Veteran ever received separation pay, disability severance pay, or any other lump sum payment from their branch of service?", + "type": "boolean", + "example": true, + "default": true + }, + "separationSeverancePay": { + "type": "object", + "description": "", + "properties": { + "datePaymentReceived": { + "description": "Approximate date separation pay was received. \n Format can be either MM-DD-YYYY or MM-YYYY", + "type": "string", + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", + "example": "03-02-2018 or 03-2018" + }, + "branchOfService": { + "description": "Branch of Service making payments.", + "type": "string", + "enum": [ + "Air Force", + "Air Force Reserves", + "Air National Guard", + "Army", + "Army National Guard", + "Army Reserves", + "Coast Guard", + "Coast Guard Reserves", + "Marine Corps", + "Marine Corps Reserves", + "National Oceanic & Atmospheric Administration", + "National Oceanic & Atmospheric Administration", + "Navy", + "Navy Reserves", + "Public Health Service", + "Air Force Academy", + "Army Air Corps or Army Air Force", + "Army Nurse Corps", + "Coast Guard Academy", + "Merchant Marine", + "Naval Academy", + "Other", + "US Military Academy", + "Women's Army Corps", + "Space Force" ], - "properties": { - "approximateBeginDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "type": "string", - "example": "2018-06-04" - }, - "approximateEndDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "type": "string", - "example": "2018-08-04" - } - } + "example": "Air Force" + }, + "preTaxAmountReceived": { + "description": "Amount being received.", + "type": "number", + "minimum": 1, + "maximum": 999999, + "example": 100 } - }, - "reservesNationalGuardService": { - "type": "object", - "additionalProperties": false, - "required": [ - "obligationTermsOfService", - "unitName" - ], - "properties": { - "obligationTermsOfService": { - "type": "object", - "additionalProperties": false, - "required": ["startDate","endDate"], - "properties": { - "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "type": "string", - "example": "2018-06-04" - }, - "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "type": "string", - "example": "2018-06-04" - } - } - }, - "component": { - "type": "string", - "description": "", - "enum": ["Active", "Reserves", "National Guard"] - }, - "title10Activation": { - "description": "Include if the Veteran is currently activated on federal orders within the National Guard or Reserves", - "type": "object", - "additionalProperties": false, - "required": [ - "anticipatedSeparationDate", - "title10ActivationDate" - ], - "properties": { - "anticipatedSeparationDate": { - "description": "Anticipated date of separation. Date must be in the future.", - "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$" - }, - "title10ActivationDate": { - "description": "Date cannot be in the future and must be after the earliest servicePeriod.activeDutyBeginDate.", - "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$" - } - } - }, - "unitName": { - "type": "string", - "pattern": "([a-zA-Z0-9\\-'.,# ][a-zA-Z0-9\\-'.,# ]?)*$" - }, - "unitAddress": { - "type": "string", - "pattern": "^([-a-zA-Z0-9'.,&#]([-a-zA-Z0-9'.,&# ])?)+$" - }, - "unitPhone": { - "type": "object", - "additionalProperties": false, - "required": ["areaCode", "phoneNumber"], - "properties": { - "areaCode": { - "type": "string", - "maxLength": 3, - "pattern": "^\\d{3}$", - "example": "555" - }, - "phoneNumber": { - "type": "string", - "maxLength": 7, - "pattern": "^\\d{7}$", - "example": "5555555" - } - } - }, - "receivingInactiveDutyTrainingPay": { - "type": "boolean" - } - } - }, - "alternateNames": { - "description": "List any other names under which the Veteran served, if applicable.", - "type": "array", - "maxItems": 100, - "uniqueItems": true, - "items": { - "type": "string", - "additionalProperties": false, - "examples": ["jane", "janey lee", "jane lee MacDonald"] - } - }, - "servedInActiveCombatSince911": { - "type": "boolean", - "description": "Did Veteran serve in a combat zone since 9-11-2001?", - "example": true - } - } - }, - "servicePay": { + } + } + } + }, + "directDeposit": { "type": "object", "additionalProperties": false, "properties": { - "favorTrainingPay": { - "description": "Is the Veteran waiving VA benefits to retain training pay? See item 28 on form 21-526EZ for more details. ", - "type": "boolean", - "example": true - }, - "favorMilitaryRetiredPay": { - "description": "Is the Veteran waiving VA benefits to retain military retired pay? See item 26 on form 21-526EZ for more details.", - "type": "boolean", - "example": true - }, - "receivingMilitaryRetiredPay": { - "description": "Is the Veteran receiving military retired pay?", - "type": "boolean", - "example": true - }, - "futureMilitaryRetiredPay": { - "description": "Will the Veteran receive military retired pay pay in future? \n If true, then 'futurePayExplanation' is required.", - "type": "boolean", - "default": false, - "example": false - }, - "futureMilitaryRetiredPayExplanation": { - "description": "Explains why future pay will be received.", + "accountType": { + "description": "Account type for the direct deposit.", "type": "string", - "example": "Will be retiring soon." - }, - "militaryRetiredPay": { - "type": "object", - "description": "", + "example": "CHECKING", "properties": { - "branchOfService": { - "description": "Branch of Service making payments.", - "type": "string", - "enum": [ - "Air Force", - "Air Force Reserves", - "Air National Guard", - "Army", - "Army National Guard", - "Army Reserves", - "Coast Guard", - "Coast Guard Reserves", - "Marine Corps", - "Marine Corps Reserves", - "National Oceanic & Atmospheric Administration", - "National Oceanic & Atmospheric Administration", - "Navy", - "Navy Reserves", - "Public Health Service", - "Air Force Academy", - "Army Air Corps or Army Air Force", - "Army Nurse Corps", - "Coast Guard Academy", - "Merchant Marine", - "Naval Academy", - "Other", - "US Military Academy", - "Women's Army Corps", - "Space Force" - ], - "example": "Air Force" - }, - "monthlyAmount": { - "description": "Amount being received.", - "type": "number", - "minimum": 1, - "maximum": 999999, - "example": 100 + "result": { + "oneOf": [ + { + "type": "string", + "enum": ["CHECKING", "SAVINGS"] + }, + { + "type": "string", + "enum": [""] + } + ] } } }, - "retiredStatus": { + "accountNumber": { + "description": "Account number for the direct deposit.", + "pattern": "^(?:[a-zA-Z0-9]{4,17})?$", "type": "string", - "description": "", - "enum": [ - "RETIRED", - "TEMPORARY_DISABILITY_RETIRED_LIST", - "PERMANENT_DISABILITY_RETIRED_LIST" - ] + "example": "123123123123" }, - "receivedSeparationOrSeverancePay": { - "description": "Has the Veteran ever received separation pay, disability severance pay, or any other lump sum payment from their branch of service?", - "type": "boolean", - "example": true, - "default": true + "routingNumber": { + "description": "Routing number for the direct deposit.", + "type": "string", + "pattern": "^(?:\\d{9})?$", + "example": "123123123" }, - "separationSeverancePay": { - "type": "object", - "description": "", - "properties": { - "datePaymentReceived": { - "description": "Approximate date separation pay was received.", - "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" - }, - "branchOfService": { - "description": "Branch of Service making payments.", - "type": "string", - "enum": [ - "Air Force", - "Air Force Reserves", - "Air National Guard", - "Army", - "Army National Guard", - "Army Reserves", - "Coast Guard", - "Coast Guard Reserves", - "Marine Corps", - "Marine Corps Reserves", - "National Oceanic & Atmospheric Administration", - "National Oceanic & Atmospheric Administration", - "Navy", - "Navy Reserves", - "Public Health Service", - "Air Force Academy", - "Army Air Corps or Army Air Force", - "Army Nurse Corps", - "Coast Guard Academy", - "Merchant Marine", - "Naval Academy", - "Other", - "US Military Academy", - "Women's Army Corps", - "Space Force" - ], - "example": "Air Force" - }, - "preTaxAmountReceived": { - "description": "Amount being received.", - "type": "number", - "minimum": 1, - "maximum": 999999, - "example": 100 - } - } + "financialInstitutionName": { + "description": "Provide the name of the financial institution where the Veteran wants the direct deposit.", + "maxLength": 35, + "type": "string", + "example": "Some Bank" + }, + "noAccount": { + "type": "boolean", + "description": "Claimant certifies that they do not have an account with a financial institution or certified payment agent.", + "default": false } } - }, - "directDeposit": { - "type": "object", - "additionalProperties": false, - "properties": { - "accountType": { - "description": "Account type for the direct deposit.", - "type": "string", - "example": "CHECKING", - "properties": { - "result": { - "oneOf": [ - { - "type": "string", - "enum": ["CHECKING", "SAVINGS"] - }, - { - "type": "string", - "enum": [""] - } - ] - } - } - }, - "accountNumber": { - "description": "Account number for the direct deposit.", - "pattern": "^(?:[a-zA-Z0-9]{4,17})?$", - "type": "string", - "example": "123123123123" - }, - "routingNumber": { - "description": "Routing number for the direct deposit.", - "type": "string", - "pattern": "^(?:\\d{9})?$", - "example": "123123123" - }, - "financialInstitutionName": { - "description": "Provide the name of the financial institution where the Veteran wants the direct deposit.", - "maxLength": 35, - "type": "string", - "example": "Some Bank" - }, - "noAccount": { - "type": "boolean", - "description": "Claimant certifies that they do not have an account with a financial institution or certified payment agent.", - "default": false - } - } - } - } - } \ No newline at end of file + } + } +} \ No newline at end of file diff --git a/modules/claims_api/config/schemas/v2/request_bodies/disability_compensation/example.json b/modules/claims_api/config/schemas/v2/request_bodies/disability_compensation/example.json index bfb42505994..6c5b7f2e28d 100644 --- a/modules/claims_api/config/schemas/v2/request_bodies/disability_compensation/example.json +++ b/modules/claims_api/config/schemas/v2/request_bodies/disability_compensation/example.json @@ -56,30 +56,30 @@ "gulfWarHazard": { "servedInGulfWarHazardLocations": true, "serviceDates": { - "startDate": "1999-07-21", - "endDate": "2005-01-21" + "startDate": "07-1999", + "endDate": "01-2005" } }, "herbicideHazardService": { "servedInHerbicideHazardLocations": true, "otherLocationsServed": "Guam", "serviceDates": { - "startDate": "2002-03-07", - "endDate": "2004-10-31" + "startDate": "03-2002", + "endDate": "10-2004" } }, "additionalHazardExposures": { "additionalExposures": ["ASBESTOS","SHAD"], "specifyOtherExposures": "Other exposure details", "exposureDates": { - "startDate": "2011-07-30", - "endDate": "2013-10-03" + "startDate": "07-2011", + "endDate": "10-2013" } }, "multipleExposures": { "exposureDates": { - "startDate": "2012-12-09", - "endDate": "2013-07-27" + "startDate": "12-2012", + "endDate": "07-2013" }, "exposureLocation": "Guam", "hazardExposedTo": "RADIATION" @@ -87,25 +87,36 @@ }, "disabilities": [ { - "disabilityActionType": "REOPEN", - "name": "PTSD (post traumatic stress disorder)", - "classificationCode": "ABCDEFGHIJ", - "serviceRelevance": "ABCDEFG", - "approximateDate": "4592-11-04", - "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", - "diagnosticCode": 0, - "secondaryDisabilities": [ - { - "name": "ABCDEF", - "disabilityActionType": "SECONDARY", - "serviceRelevance": "ABCDEFGHIJKLMNOPQ", - "classificationCode": "ABCDEFGHIJKLMNO", - "approximateDate": "9904-01-03", - "exposureOrEventOrInjury": "EXPOSURE" - } - ], - "isRelatedToToxicExposure": true, - "exposureOrEventOrInjury": "EXPOSURE" + "disabilityActionType": "REOPEN", + "name": "PTSD (post traumatic stress disorder)", + "classificationCode": "249470", + "serviceRelevance": "Heavy equipment operator in service.", + "approximateDate": "04-11-2019", + "ratedDisabilityId": "1100583", + "diagnosticCode": 9999, + "secondaryDisabilities": [ + { + "name": "PTSD personal trauma", + "disabilityActionType": "SECONDARY", + "serviceRelevance": "Caused by a service-connected disability\\nLengthy description", + "classificationCode": "249470", + "approximateDate": "03-01-2018", + "exposureOrEventOrInjury": "" + } + ], + "isRelatedToToxicExposure": true, + "exposureOrEventOrInjury": "" + } + ], + "treatments": [ + { + "center": { + "name": "Private Facility 2", + "state": "CO", + "city": "Pueblo" + }, + "startDate": "03-2014", + "treatedDisabilityNames": ["PTSD (post traumatic stress disorder)"] }, { "disabilityActionType": "REOPEN", @@ -161,12 +172,12 @@ ], "confinements": [ { - "approximateBeginDate": "2016-11-06", - "approximateEndDate": "2016-11-09" + "approximateBeginDate": "06-11-2016", + "approximateEndDate": "09-11-2016" }, { - "approximateBeginDate": "2019-11-06", - "approximateEndDate": "2019-11-09" + "approximateBeginDate": "06-2019", + "approximateEndDate": "07-2019" } ], "reservesNationalGuardService": { diff --git a/modules/claims_api/config/schemas/v2/request_bodies/disability_compensation/request.json b/modules/claims_api/config/schemas/v2/request_bodies/disability_compensation/request.json index 6e04a5fa80f..1f908ac917a 100644 --- a/modules/claims_api/config/schemas/v2/request_bodies/disability_compensation/request.json +++ b/modules/claims_api/config/schemas/v2/request_bodies/disability_compensation/request.json @@ -362,16 +362,16 @@ "description": "Date range for when the exposure happened.", "properties": { "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate start date for serving in Gulf War hazard location.", - "example": "2018-06-04" + "example": "06-2018" }, "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate end date for serving in Gulf War hazard location.", - "example": "2018-06-04" + "example": "06-2018" } } } @@ -394,16 +394,16 @@ "description": "Date range for when the exposure happened.", "properties": { "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate start date for serving in herbicide location.", - "example": "2018-06-04" + "example": "06-2018" }, "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate end date for serving in herbicide location.", - "example": "2018-06-04" + "example": "06-2018" } } } @@ -441,16 +441,16 @@ "description": "Date range for when the exposure happened.", "properties": { "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate start date for exposure.", - "example": "2018-06-04" + "example": "06-2018" }, "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate end date for exposure.", - "example": "2018-06-04" + "example": "06-2018" } } } @@ -465,16 +465,16 @@ "description": "Date range for when the exposure happened.", "properties": { "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate start date for exposure.", - "example": "2018-06-04" + "example": "06-2018" }, "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate end date for exposure.", - "example": "2018-06-04" + "example": "06-2018" } } }, @@ -517,10 +517,10 @@ "example": "Heavy equipment operator in service." }, "approximateDate": { - "description": "Approximate date disability began. Date must be in the past.", + "description": "Approximate date disability began. Date must be in the past. \n Format can be either MM-DD-YYYY or MM-YYYY", "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", + "example": "03-12-2019 or 03-2019" }, "ratedDisabilityId": { "description": "When submitting a contention with action type INCREASE, the previously rated disability id may be included.", @@ -544,7 +544,7 @@ ], "example": "NEW" }, - "secondaryDisabilities": { + "secondaryDisabilities": { "description": "Identifies the Secondary Service Disability information of the Veteran.", "type": "array", "minItems": 1, @@ -575,10 +575,10 @@ "example": "249470" }, "approximateDate": { - "description": "Approximate date disability began.", + "description": "Approximate date disability began. \n Format can be either MM-DD-YYYY or MM-YYYY", "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", + "example": "03-12-2019 or 03-2019" }, "exposureOrEventOrInjury": { "type": "string", @@ -603,7 +603,7 @@ "examples": ["Agent Orange", "radiation", "burn pits"] } }, - "allOf": [ + "allOf": [ { "if": { "properties": { @@ -648,8 +648,8 @@ "startDate": { "description": "Start date for treatment. If treatment began from 2005 to present, you do not need to provide dates.", "type": ["null", "string"], - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", + "example": "02-2018" }, "treatedDisabilityNames": { "description": "Name(s) of Disabilities treated in this time frame.", @@ -660,7 +660,6 @@ "type": "string", "additionalProperties": false, "examples": ["PTSD (post traumatic stress disorder)","Trauma"] - } } }, "center": { @@ -670,13 +669,13 @@ "required": ["name", "state"], "properties": { "name": { - "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", - "type": "string", - "pattern": "(?!(?: )$)([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,# ])?)+$", - "example": "Private Facility 2", - "minLength": 1, - "maxLength": 100 - }, + "description": "Name of facility Veteran was treated in. The /treatment-centers endpoint on the [Benefits Reference Data API](https://developer.va.gov/explore/benefits/docs/benefits_reference_data?version=current) may be used to retrieve possible treatment center names.", + "type": "string", + "pattern": "(?!(?: )$)([a-zA-Z0-9\"\\/&\\(\\)\\-'.,# ]([a-zA-Z0-9(\\)\\-'.,# ])?)+$", + "example": "Private Facility 2", + "minLength": 1, + "maxLength": 100 + }, "city": { "description": "City of treatment facility.", "type": "string", @@ -692,6 +691,7 @@ } } } + } }, "serviceInformation": { "type": "object", @@ -795,14 +795,14 @@ ], "properties": { "approximateBeginDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", "type": "string", - "example": "2018-06-04" + "example": "06-12-2019 or 06-2019" }, "approximateEndDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", "type": "string", - "example": "2018-08-04" + "example": "07-12-2019 or 07-2019" } } } @@ -1005,10 +1005,10 @@ "description": "", "properties": { "datePaymentReceived": { - "description": "Approximate date separation pay was received.", - "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" + "description": "Approximate date separation pay was received. \n Format can be either MM-DD-YYYY or MM-YYYY", + "type": "string", + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", + "example": "03-02-2018 or 03-2018" }, "branchOfService": { "description": "Branch of Service making payments.", diff --git a/modules/claims_api/spec/fixtures/v2/veterans/disability_compensation/form_526_json_api.json b/modules/claims_api/spec/fixtures/v2/veterans/disability_compensation/form_526_json_api.json index d70159c8deb..67ed929d5c4 100644 --- a/modules/claims_api/spec/fixtures/v2/veterans/disability_compensation/form_526_json_api.json +++ b/modules/claims_api/spec/fixtures/v2/veterans/disability_compensation/form_526_json_api.json @@ -36,12 +36,12 @@ ], "confinements": [ { - "approximateBeginDate": "2018-06-04", - "approximateEndDate": "2018-07-04" + "approximateBeginDate": "06-04-2018", + "approximateEndDate": "06-04-2018" } , { - "approximateBeginDate": "2020-06-04", - "approximateEndDate": "2020-07-04" + "approximateBeginDate": "06-2020", + "approximateEndDate": "06-2020" } ], "reservesNationalGuardService": { @@ -73,7 +73,7 @@ "name": "PTSD (post traumatic stress disorder)", "classificationCode": "5420", "serviceRelevance": "ABCDEFG", - "approximateDate": "2018-03-02", + "approximateDate": "03-11-2018", "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", "diagnosticCode": 9999, "secondaryDisabilities": [ @@ -82,7 +82,7 @@ "disabilityActionType": "SECONDARY", "serviceRelevance": "ABCDEFGHIJKLMNOPQ", "classificationCode": "249470", - "approximateDate": "2018-03-02", + "approximateDate": "03-12-2018", "exposureOrEventOrInjury": "EXPOSURE" } ], @@ -94,7 +94,7 @@ "name": "Traumatic Brain Injury", "classificationCode": "9020", "serviceRelevance": "ABCDEFG", - "approximateDate": "2018-03-02", + "approximateDate": "03-02-2018", "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX", "diagnosticCode": 0, "secondaryDisabilities": [ @@ -103,7 +103,7 @@ "disabilityActionType": "SECONDARY", "serviceRelevance": "ABCDEFGHIJKLMNOPQ", "classificationCode": "249470", - "approximateDate": "2018-03-02", + "approximateDate": "03-12-2018", "exposureOrEventOrInjury": "EXPOSURE" } ], @@ -143,30 +143,30 @@ "gulfWarHazardService": { "servedInGulfWarHazardLocations": true, "serviceDates": { - "startDate": "2523-07-21", - "endDate": "1540-01-21" + "startDate": "07-2018", + "endDate": "08-2018" } }, "herbicideHazardService": { "servedInHerbicideHazardLocations": true, "otherLocationsServed": "ABCDEFGHIJKLM", "serviceDates": { - "startDate": "0401-03-07", - "endDate": "9754-10-31" + "startDate": "07-2018", + "endDate": "08-2018" } }, "additionalHazardExposures": { "additionalExposures": ["ASBESTOS", "SHAD"], "specifyOtherExposures": "Other exposure details", "exposureDates": { - "startDate": "4520-07-30", - "endDate": "3405-10-03" + "startDate": "07-2018", + "endDate": "08-2018" } }, "multipleExposures": { "exposureDates": { - "startDate": "8697-12-09", - "endDate": "5517-07-27" + "startDate": "07-2018", + "endDate": "08-2018" }, "exposureLocation": "ABCDEFGHIJKLMN", "hazardExposedTo": "ABCDEFGHIJKLMNO" @@ -196,7 +196,7 @@ "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST", "receivedSeparationOrSeverancePay": false, "separationSeverancePay": { - "datePaymentReceived": "2022-03-01", + "datePaymentReceived": "03-12-2022", "branchOfService": "Naval Academy", "preTaxAmountReceived": 379.25 } diff --git a/modules/claims_api/spec/lib/claims_api/v2/disability_compensation_pdf_mapper_spec.rb b/modules/claims_api/spec/lib/claims_api/v2/disability_compensation_pdf_mapper_spec.rb index a1c0ba8c8f8..1205f325724 100644 --- a/modules/claims_api/spec/lib/claims_api/v2/disability_compensation_pdf_mapper_spec.rb +++ b/modules/claims_api/spec/lib/claims_api/v2/disability_compensation_pdf_mapper_spec.rb @@ -201,21 +201,21 @@ multi_exp_hazard = toxic_exp_data[:multipleExposures][:hazardExposedTo] expect(gulf_locations).to eq(true) - expect(gulf_start_date).to eq('2523-07-21') - expect(gulf_end_date).to eq('1540-01-21') + expect(gulf_start_date).to eq('07-2018') + expect(gulf_end_date).to eq('08-2018') expect(herbicide_locations).to eq(true) expect(other_locations).to eq('ABCDEFGHIJKLM') - expect(herb_start_date).to eq('0401-03-07') - expect(herb_end_date).to eq('9754-10-31') + expect(herb_start_date).to eq('07-2018') + expect(herb_end_date).to eq('08-2018') expect(additional_exposures).to eq(%w[ASBESTOS SHAD]) expect(specify_other_exp).to eq('Other exposure details') - expect(exp_start_date).to eq('4520-07-30') - expect(exp_end_date).to eq('3405-10-03') + expect(exp_start_date).to eq('07-2018') + expect(exp_end_date).to eq('08-2018') - expect(multi_exp_start_date).to eq('8697-12-09') - expect(multi_exp_end_date).to eq('5517-07-27') + expect(multi_exp_start_date).to eq('07-2018') + expect(multi_exp_end_date).to eq('08-2018') expect(multi_exp_location).to eq('ABCDEFGHIJKLMN') expect(multi_exp_hazard).to eq('ABCDEFGHIJKLMNO') end @@ -244,7 +244,7 @@ expect(has_conditions).to eq(true) expect(name).to eq('PTSD (post traumatic stress disorder)') expect(relevance).to eq('ABCDEFG') - expect(date).to eq('2018-03-02') + expect(date).to eq('03-11-2018') expect(event).to eq('EXPOSURE') expect(is_related).to eq(true) expect(attribut_count).to eq(5) @@ -330,10 +330,10 @@ expect(addtl_end).to eq('1991-11-30') expect(last_sep).to eq('ABCDEFGHIJKLMN') expect(pow).to eq(true) - expect(pow_start).to eq('2018-06-04') - expect(pow_end).to eq('2018-07-04') - expect(pow_start_two).to eq('2020-06-04') - expect(pow_end_two).to eq('2020-07-04') + expect(pow_start).to eq('06-04-2018') + expect(pow_end).to eq('06-04-2018') + expect(pow_start_two).to eq('06-2020') + expect(pow_end_two).to eq('06-2020') expect(natl_guard).to eq(true) expect(natl_guard_comp).to eq('Active') expect(obl_start).to eq('2019-06-04') diff --git a/modules/claims_api/spec/requests/v2/veterans/disability_compensation_request_spec.rb b/modules/claims_api/spec/requests/v2/veterans/disability_compensation_request_spec.rb index 1b15d0b096c..5ed24ba6699 100644 --- a/modules/claims_api/spec/requests/v2/veterans/disability_compensation_request_spec.rb +++ b/modules/claims_api/spec/requests/v2/veterans/disability_compensation_request_spec.rb @@ -871,12 +871,14 @@ with_okta_user(scopes) do |auth_header| VCR.use_cassette('evss/claims/claims') do VCR.use_cassette('brd/countries') do - json = JSON.parse(data) - json['data']['attributes']['toxicExposure']['herbicideHazardService']['otherLocationsServed'] = - other_locations_served - data = json.to_json - post submit_path, params: data, headers: auth_header - expect(response).to have_http_status(:unprocessable_entity) + VCR.use_cassette('brd/disabilities') do + json = JSON.parse(data) + json['data']['attributes']['toxicExposure']['herbicideHazardService']['otherLocationsServed'] = + other_locations_served + data = json.to_json + post submit_path, params: data, headers: auth_header + expect(response).to have_http_status(:unprocessable_entity) + end end end end @@ -890,12 +892,14 @@ with_okta_user(scopes) do |auth_header| VCR.use_cassette('evss/claims/claims') do VCR.use_cassette('brd/countries') do - json = JSON.parse(data) - json['data']['attributes']['toxicExposure']['additionalHazardExposures']['additionalExposures'] = - additional_exposures - data = json.to_json - post submit_path, params: data, headers: auth_header - expect(response).to have_http_status(:unprocessable_entity) + VCR.use_cassette('brd/disabilities') do + json = JSON.parse(data) + json['data']['attributes']['toxicExposure']['additionalHazardExposures']['additionalExposures'] = + additional_exposures + data = json.to_json + post submit_path, params: data, headers: auth_header + expect(response).to have_http_status(:unprocessable_entity) + end end end end @@ -930,12 +934,14 @@ with_okta_user(scopes) do |auth_header| VCR.use_cassette('evss/claims/claims') do VCR.use_cassette('brd/countries') do - json = JSON.parse(data) - json['data']['attributes']['toxicExposure']['multipleExposures']['exposureLocation'] = - exposure_location - data = json.to_json - post submit_path, params: data, headers: auth_header - expect(response).to have_http_status(:unprocessable_entity) + VCR.use_cassette('brd/disabilities') do + json = JSON.parse(data) + json['data']['attributes']['toxicExposure']['multipleExposures']['exposureLocation'] = + exposure_location + data = json.to_json + post submit_path, params: data, headers: auth_header + expect(response).to have_http_status(:unprocessable_entity) + end end end end @@ -949,12 +955,14 @@ with_okta_user(scopes) do |auth_header| VCR.use_cassette('evss/claims/claims') do VCR.use_cassette('brd/countries') do - json = JSON.parse(data) - json['data']['attributes']['toxicExposure']['multipleExposures']['hazardExposedTo'] = - hazard_exposed_to - data = json.to_json - post submit_path, params: data, headers: auth_header - expect(response).to have_http_status(:unprocessable_entity) + VCR.use_cassette('brd/disabilities') do + json = JSON.parse(data) + json['data']['attributes']['toxicExposure']['multipleExposures']['hazardExposedTo'] = + hazard_exposed_to + data = json.to_json + post submit_path, params: data, headers: auth_header + expect(response).to have_http_status(:unprocessable_entity) + end end end end @@ -1197,7 +1205,7 @@ { receivedSeparationOrSeverancePay: true, separationSeverancePay: { - datePaymentReceived: (Time.zone.today - 1.year).to_s, + datePaymentReceived: (Time.zone.today - 1.year).strftime('%m-%d-%Y'), branchOfService: 'Air Force', preTaxAmountReceived: separation_payment_amount } @@ -1272,7 +1280,7 @@ end context "when 'datePaymentReceived' is not in the past" do - let(:received_date) { (Time.zone.today + 1.day).to_s } + let(:received_date) { (Time.zone.today + 1.day).strftime('%m-%d-%Y') } it 'responds with a bad request' do with_okta_user(scopes) do |auth_header| @@ -1290,7 +1298,45 @@ end context "when 'datePaymentReceived' is in the past" do - let(:received_date) { (Time.zone.today - 1.year).to_s } + let(:received_date) { (Time.zone.today - 1.year).strftime('%m-%d-%Y') } + + it 'responds with a 200' do + with_okta_user(scopes) do |auth_header| + VCR.use_cassette('evss/claims/claims') do + VCR.use_cassette('brd/countries') do + VCR.use_cassette('brd/disabilities') do + json_data = JSON.parse data + params = json_data + params['data']['attributes']['servicePay'] = service_pay_attribute + post submit_path, params: params.to_json, headers: auth_header + expect(response).to have_http_status(:ok) + end + end + end + end + end + end + + context "when 'datePaymentReceived' is not in the past but is approximate (MM-YYYY)" do + let(:received_date) { (Time.zone.today + 1.month).strftime('%m-%Y') } + + it 'responds with a bad request' do + with_okta_user(scopes) do |auth_header| + VCR.use_cassette('brd/countries') do + VCR.use_cassette('brd/disabilities') do + json_data = JSON.parse data + params = json_data + params['data']['attributes']['servicePay'] = service_pay_attribute + post submit_path, params: params.to_json, headers: auth_header + expect(response).to have_http_status(:bad_request) + end + end + end + end + end + + context "when 'datePaymentReceived' is in the past but is approximate (MM-YYYY)" do + let(:received_date) { (Time.zone.today - 1.year).strftime('%m-%Y') } it 'responds with a 200' do with_okta_user(scopes) do |auth_header| @@ -1691,7 +1737,7 @@ end context 'when the activeDutyBeginDate is after the activeDutyEndDate' do - let(:active_duty_end_date) { '1979-01-02' } + let(:active_duty_end_date) { '1979-01-01' } it 'responds with a 422' do with_okta_user(scopes) do |auth_header| @@ -1710,7 +1756,7 @@ end context 'when the activeDutyBeginDate is not formatted correctly' do - let(:active_duty_begin_date) { '25-06-1979' } + let(:active_duty_begin_date) { '1979-01-01' } it 'responds with a 422' do with_okta_user(scopes) do |auth_header| @@ -1729,7 +1775,7 @@ end context 'when the activeDutyEndDate is not formatted correctly' do - let(:active_duty_end_date) { '28-07-1995' } + let(:active_duty_end_date) { '07-28-1995' } it 'responds with a 422' do with_okta_user(scopes) do |auth_header| @@ -1816,12 +1862,43 @@ let(:confinements) do [ { - approximateBeginDate: '2016-01-01', - approximateEndDate: '2016-01-06' + approximateBeginDate: '01-11-2016', + approximateEndDate: '01-13-2016' + }, + { + approximateBeginDate: '01-11-2017', + approximateEndDate: '01-13-2017' + } + ] + end + + it 'responds with a 200' do + with_okta_user(scopes) do |auth_header| + VCR.use_cassette('evss/claims/claims') do + VCR.use_cassette('brd/countries') do + VCR.use_cassette('brd/disabilities') do + json = JSON.parse(data) + json['data']['attributes']['serviceInformation']['confinements'] = confinements + data = json.to_json + post submit_path, params: data, headers: auth_header + expect(response).to have_http_status(:ok) + end + end + end + end + end + end + + context 'when there are confinements with mixed date formatting and begin date is <= to end date' do + let(:confinements) do + [ + { + approximateBeginDate: '01-11-2016', + approximateEndDate: '01-2016' }, { - approximateBeginDate: '2017-01-01', - approximateEndDate: '2017-01-06' + approximateBeginDate: '01-11-2017', + approximateEndDate: '02-2017' } ] end @@ -1843,8 +1920,35 @@ end end + context 'when there are confinements with mixed date formatting where begin date is after the end date' do + let(:confinements) do + [ + { + approximateBeginDate: '02-11-2016', + approximateEndDate: '01-2016' + } + ] + end + + it 'responds with a 422' do + with_okta_user(scopes) do |auth_header| + VCR.use_cassette('evss/claims/claims') do + VCR.use_cassette('brd/countries') do + VCR.use_cassette('brd/disabilities') do + json = JSON.parse(data) + json['data']['attributes']['serviceInformation']['confinements'] = confinements + data = json.to_json + post submit_path, params: data, headers: auth_header + expect(response).to have_http_status(:unprocessable_entity) + end + end + end + end + end + end + context 'when confinements.confinement.approximateBeginDate is formatted incorrectly' do - let(:approximate_begin_date) { '11-24-2021' } + let(:approximate_begin_date) { '2021-11-24' } it 'responds with a 422' do with_okta_user(scopes) do |auth_header| @@ -1863,7 +1967,7 @@ end context 'when confinements.confinement.approximateEndDate is formatted incorrectly' do - let(:approximate_end_date) { '11-24-2022' } + let(:approximate_end_date) { '2022-11-24' } it 'responds with a 422' do with_okta_user(scopes) do |auth_header| @@ -1882,7 +1986,8 @@ end context 'when confinements.confinement.approximateBeginDate is after approximateEndDate' do - let(:approximate_end_date) { '2017-05-06' } + let(:approximate_end_date) { '05-06-2015' } + let(:approximate_begin_date) { '05-06-2016' } it 'responds with a 422' do with_okta_user(scopes) do |auth_header| @@ -1892,6 +1997,7 @@ json = JSON.parse(data) confinement = json['data']['attributes']['serviceInformation']['confinements'][0] confinement['approximateEndDate'] = approximate_end_date + confinement['approximateBeginDate'] = approximate_begin_date data = json.to_json post submit_path, params: data, headers: auth_header expect(response).to have_http_status(:unprocessable_entity) @@ -2124,7 +2230,7 @@ end context "when 'approximateDate' is in the future" do - let(:approximate_date) { (Time.zone.today + 1.year).to_s } + let(:approximate_date) { (Time.zone.today + 1.year).strftime('%m-%d-%Y') } it 'responds with a bad request' do with_okta_user(scopes) do |auth_header| @@ -2140,7 +2246,27 @@ end context "when 'approximateDate' is in the past" do - let(:approximate_date) { (Time.zone.today - 1.year).to_s } + let(:approximate_date) { (Time.zone.today - 1.year).strftime('%m-%d-%Y') } + + it 'responds with a 200' do + with_okta_user(scopes) do |auth_header| + VCR.use_cassette('evss/claims/claims') do + VCR.use_cassette('brd/countries') do + VCR.use_cassette('brd/disabilities') do + json_data = JSON.parse data + params = json_data + params['data']['attributes']['disabilities'] = disabilities + post submit_path, params: params.to_json, headers: auth_header + expect(response).to have_http_status(:ok) + end + end + end + end + end + end + + context 'when approximateDate is formatted MM-YYYY and is in the past' do + let(:approximate_date) { (Time.zone.today - 6.months).strftime('%m-%Y') } it 'responds with a 200' do with_okta_user(scopes) do |auth_header| @@ -2158,6 +2284,47 @@ end end end + + context 'when approximateDate is formatted MM-YYYY and is in the future' do + let(:approximate_date) { (Time.zone.today + 1.year).strftime('%m-%Y') } + + it 'responds with a bad_request' do + with_okta_user(scopes) do |auth_header| + VCR.use_cassette('evss/claims/claims') do + VCR.use_cassette('brd/countries') do + VCR.use_cassette('brd/disabilities') do + json_data = JSON.parse data + params = json_data + params['data']['attributes']['disabilities'] = disabilities + post submit_path, params: params.to_json, headers: auth_header + expect(response).to have_http_status(:bad_request) + end + end + end + end + end + end + + # because of the adjusted regex in the schema I wanted to lock this in + context 'when approximateDate is formatted YYYY' do + let(:approximate_date) { (Time.zone.today - 1.month).strftime('%Y') } + + it 'responds with a 422' do + with_okta_user(scopes) do |auth_header| + VCR.use_cassette('evss/claims/claims') do + VCR.use_cassette('brd/countries') do + VCR.use_cassette('brd/disabilities') do + json_data = JSON.parse data + params = json_data + params['data']['attributes']['disabilities'] = disabilities + post submit_path, params: params.to_json, headers: auth_header + expect(response).to have_http_status(:unprocessable_entity) + end + end + end + end + end + end end end @@ -2297,7 +2464,61 @@ disabilityActionType: 'SECONDARY', name: 'PTSD', serviceRelevance: 'Caused by a service-connected disability.', - approximateDate: '2019-02-30' + approximateDate: '02-30-2019' + } + ] + } + ] + params['data']['attributes']['disabilities'] = disabilities + post submit_path, params: params.to_json, headers: auth_header + expect(response).to have_http_status(:bad_request) + end + end + end + + it 'returns ok if date is approximate and in the past' do + with_okta_user(scopes) do |auth_header| + VCR.use_cassette('brd/countries') do + json_data = JSON.parse data + params = json_data + disabilities = [ + { + disabilityActionType: 'NONE', + name: 'PTSD (post traumatic stress disorder)', + diagnosticCode: 9999, + secondaryDisabilities: [ + { + disabilityActionType: 'SECONDARY', + name: 'PTSD', + serviceRelevance: 'Caused by a service-connected disability.', + approximateDate: '02-2019' + } + ] + } + ] + params['data']['attributes']['disabilities'] = disabilities + post submit_path, params: params.to_json, headers: auth_header + expect(response).to have_http_status(:ok) + end + end + end + + it 'returns an exception if date is approximate and in the future' do + with_okta_user(scopes) do |auth_header| + VCR.use_cassette('brd/countries') do + json_data = JSON.parse data + params = json_data + disabilities = [ + { + disabilityActionType: 'NONE', + name: 'PTSD (post traumatic stress disorder)', + diagnosticCode: 9999, + secondaryDisabilities: [ + { + disabilityActionType: 'SECONDARY', + name: 'PTSD', + serviceRelevance: 'Caused by a service-connected disability.', + approximateDate: "01-#{Time.zone.now.year + 1}" } ] } @@ -2324,7 +2545,7 @@ disabilityActionType: 'SECONDARY', name: 'PTSD', serviceRelevance: 'Caused by a service-connected disability.', - approximateDate: "#{Time.zone.now.year + 1}-01-01" + approximateDate: "01-11-#{Time.zone.now.year + 1}" } ] } diff --git a/spec/support/schemas/claims_api/v2/forms/disability/submission.json b/spec/support/schemas/claims_api/v2/forms/disability/submission.json index 33673e1af79..f9f24a780cb 100644 --- a/spec/support/schemas/claims_api/v2/forms/disability/submission.json +++ b/spec/support/schemas/claims_api/v2/forms/disability/submission.json @@ -354,7 +354,7 @@ "properties": { "servedInGulfWarHazardLocations": { "type": "boolean", - "description": "Did the Veteran serve in any of the following Gulf War hazard locations?", + "description": "Did the Veteran serve in any of the following Gulf War hazard locations? Iraq; Kuwait; Saudi Arabia; the neutral zone between Iraq and Saudi Arabia; Bahrain; Qatar; the United Arab Emirates; Oman; Yemen; Lebanon; Somalia; Afghanistan; Israel; Egypt; Turkey; Syria; Jordan; Djibouti; Uzbekistan; the Gulf of Aden; the Gulf of Oman; the Persian Gulf; the Arabian Sea; and the Red Sea.", "example": true }, "serviceDates": { @@ -362,16 +362,16 @@ "description": "Date range for when the exposure happened.", "properties": { "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate start date for serving in Gulf War hazard location.", - "example": "2018-06-04" + "example": "06-2018" }, "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate end date for serving in Gulf War hazard location.", - "example": "2018-06-04" + "example": "06-2018" } } } @@ -394,16 +394,16 @@ "description": "Date range for when the exposure happened.", "properties": { "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate start date for serving in herbicide location.", - "example": "2018-06-04" + "example": "06-2018" }, "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate end date for serving in herbicide location.", - "example": "2018-06-04" + "example": "06-2018" } } } @@ -435,16 +435,16 @@ "description": "Date range for when the exposure happened.", "properties": { "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate start date for exposure.", - "example": "2018-06-04" + "example": "06-2018" }, "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate end date for exposure.", - "example": "2018-06-04" + "example": "06-2018" } } } @@ -459,16 +459,16 @@ "description": "Date range for when the exposure happened.", "properties": { "startDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate start date for exposure.", - "example": "2018-06-04" + "example": "06-2018" }, "endDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", "type": "string", "description": "Approximate end date for exposure.", - "example": "2018-06-04" + "example": "06-2018" } } }, @@ -513,10 +513,10 @@ "example": "Heavy equipment operator in service." }, "approximateDate": { - "description": "Approximate date disability began. Date must be in the past.", + "description": "Approximate date disability began. Date must be in the past. \n Format can be either MM-DD-YYYY or MM-YYYY", "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", + "example": "03-12-2019 or 03-2019" }, "ratedDisabilityId": { "description": "When submitting a contention with action type INCREASE, the previously rated disability id may be included.", @@ -577,10 +577,10 @@ "example": "249470" }, "approximateDate": { - "description": "Approximate date disability began.", - "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" + "description": "Approximate date disability began. \n Format can be either MM-DD-YYYY or MM-YYYY", + "type": "string", + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", + "example": "03-12-2019 or 03-2019" }, "exposureOrEventOrInjury": { "type": "array", @@ -668,8 +668,8 @@ "null", "string" ], - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" + "pattern": "^(0[1-9]|1[0-2])-(?:19|20)[0-9][0-9]$", + "example": "03-2018" }, "treatedDisabilityNames": { "description": "Name(s) of Disabilities treated in this time frame.", @@ -824,14 +824,14 @@ ], "properties": { "approximateBeginDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", "type": "string", - "example": "2018-06-04" + "example": "06-12-2019 or 06-2019" }, "approximateEndDate": { - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", "type": "string", - "example": "2018-08-04" + "example": "07-12-2019 or 07-2019" } } } @@ -1036,10 +1036,10 @@ "description": "", "properties": { "datePaymentReceived": { - "description": "Approximate date separation pay was received.", + "description": "Approximate date separation pay was received. \n Format can be either MM-DD-YYYY or MM-YYYY", "type": "string", - "pattern": "^(\\d{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", - "example": "2018-03-02" + "pattern": "^(0[1-9]|1[0-2])(-(0[1-9]|[1-2][0-9]|3[0-1]))?-\\d{4}$|^(0[1-9]|1[0-2])-\\d{4}$", + "example": "03-02-2018 or 03-2018" }, "branchOfService": { "description": "Branch of Service making payments.",