Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API-39748-add-index-to-error-collection-messages #18333

Merged
merged 7 commits into from
Sep 9, 2024

Conversation

stiehlrod
Copy link
Contributor

@stiehlrod stiehlrod commented Sep 5, 2024

Summary

  • Adds index to error messages

Related issue(s)

Testing done

  • New code is covered by unit tests
  • Postman
    Request_body:
{
    "meta": {
        "transactionId": "0000-00000000-00000000-0000"
    },
    "data": {
        "type": "form/526",
        "attributes": {
            "claimProcessType": "STANDARD_CLAIM_PROCESS",
            "claimNotes": "Some things that are important to know, and are not included in any other place.",
            "veteranIdentification": {
                "serviceNumber": "123456789",
                "veteranNumber": {
                    "telephone": "5555555555",
                    "internationalTelephone": "+44 20 1234 5678"
                },
                "mailingAddress": {
                    "addressLine1": "1234 Couch Street",
                    "addressLine2": "Unit 4",
                    "addressLine3": "Room 1",
                    "city": "Portland",
                    "state": "OR",
                    "country": "Afghanistan",
                    "zipFirstFive": "41726",
                    "zipLastFour": "1234",
                    "internationalPostalCode": "643728d-hjekfhjd"
                },
                "emailAddress": {
                    "email": "valid@somedomain.com",
                    "agreeToEmailRelatedToClaim": true
                },
                "currentVaEmployee": false
            },
            "changeOfAddress": {
                "typeOfAddressChange": "TEMPORARY",
                "addressLine1": "10 Peach St",
                "addressLine2": "Unit 4",
                "addressLine3": "Room 1",
                "city": "Atlanta",
                "state": "GA",
                "country": "Afghanistan",
                "zipFirstFive": "42220",
                "zipLastFour": "9897",
                "dates": {
                    "beginDate": "2023-06-04",
                    "endDate": "2023-12-04"
                },
                    "internationalPostalCode": "643728dhjekfhjd"
            },
            "homeless": {
                "isCurrentlyHomeless": true,
                "currentlyHomeless": {
                    "homelessSituationOptions": "FLEEING_CURRENT_RESIDENCE",
                    "otherDescription": "ABCDEFGHIJKLM"
                },
                "isAtRiskOfBecomingHomeless": false,
                "pointOfContact": "john stewart",
                "pointOfContactNumber": {
                    "telephone": "5555555555",
                    "internationalTelephone": "+44 20 1234 5678"
                }
            },
            "toxicExposure": {
                "gulfWarHazardService": {
                    "servedInGulfWarHazardLocations": "YES",
                    "serviceDates": {
                        "beginDate": "2018-07",
                        "endDate": "2018-08"
                    }
                },
                "herbicideHazardService": {
                    "servedInHerbicideHazardLocations": "YES",
                    "otherLocationsServed": "The United Arab 'Emirates' (UAE) - [bracket test]",
                    "serviceDates": {
                        "beginDate": "2018-07",
                        "endDate": "2018-08"
                    }
                },
                "additionalHazardExposures": {
                    "additionalExposures": [
                        "ASBESTOS",
                        "SHIPBOARD_HAZARD_AND_DEFENSE"
                    ],
                    "specifyOtherExposures": "The United Arab Emirates:stuff (UAE) - [bracket test]",
                    "exposureDates": {
                        "beginDate": "2018-07",
                        "endDate": "2018-08"
                    }
                },
                "multipleExposures": [
                    {
                        "hazardExposedTo": "RADIATION",
                        "exposureLocation": "The United Arab Emirates/and stuff (UAE) - [bracket test]",
                        "exposureDates": {
                            "beginDate": "2012-12",
                            "endDate": "2013-07"
                        }
                    }
                ]
            },
            "disabilities": [
                {
                    "exposureOrEventOrInjury": "EXPOSURE",
                    "disabilityActionType": "NEW",
                    "classificationCode": "901",
                    "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX",
                    "diagnosticCode": 9020,
                    "isRelatedToToxicExposure": true,
                    "secondaryDisabilities": [
                        {
                            "name": "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders",
                            "exposureOrEventOrInjury": "EXPOSURE",
                            "serviceRelevance": "ABCDEFGHIJKLMNOPQ",
                            "disabilityActionType": "SECONDARY",
                            "approximateDate": "2018-03-12",
                            "classificationCode": "9014"
                        }
                    ]
                },
                {
                    "name": "Cancer - Musculoskeletal - Elbow",
                    "exposureOrEventOrInjury": "EXPOSURE",
                    "approximateDate": "2025-03-02",
                    "serviceRelevance": "ABCDEFG",
                    "disabilityActionType": "NONE",
                    "classificationCode": "901",
                    "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX",
                    "diagnosticCode": 249470,
                    "isRelatedToToxicExposure": true
                },
                {
                    "name": "Cancer - Musculoskeletal - Knee",
                    "exposureOrEventOrInjury": "EXPOSURE",
                    "approximateDate": "2015",
                    "serviceRelevance": "ABCDEFG",
                    "disabilityActionType": "NEW",
                    "classificationCode": "9014",
                    "ratedDisabilityId": "ABCDEFGHIJKLMNOPQRSTUVWX",
                    "diagnosticCode": 249470,
                    "isRelatedToToxicExposure": true,
                    "specialIssues": "PO"
                }
            ],
            "treatments": [
                {
                    "beginDate": "2009-03",
                    "treatedDisabilityNames": [
                        "Traumatic Brain Injury",
                        "Post Traumatic Stress Disorder (PTSD) Combat - Mental Disorders",
                        "Cancer - Musculoskeletal - Elbow"
                    ],
                    "center": {
                        "name": "Center One",
                        "city": "Decatur",
                        "state": "GA"
                    }
                }
            ],
            "serviceInformation": {
                "alternateNames": [
                    "john jacob",
                    "johnny smith"
                ],
                "servicePeriods": [
                    {
                        "serviceBranch": "Public Health Servic",
                        "serviceComponent": "Active",
                        "activeDutyBeginDate": "2023-11-14",
                        "activeDutyEndDate": "2023-10-30",
                        "separationLocationCode": "2491"
                    }
                ],
                "servedInActiveCombatSince911": "NO",
                "reservesNationalGuardService": {
                    "component": "National Guard",
                    "obligationTermsOfService": {
                        "beginDate": "2019-06-04",
                        "endDate": "2020-06-04"
                    },
                    "unitName": "National Guard Unit Name",
                    "unitAddress": "1243 pine court",
                    "unitPhone": {
                        "areaCode": "555",
                        "phoneNumber": "5555555"
                    },
                    "receivingInactiveDutyTrainingPay": "YES"
                },
                "federalActivation": {
                    "activationDate": "2023-10-01",
                    "anticipatedSeparationDate": "2024-10-31"
                },
                "confinements": [
                    {
                        "approximateBeginDate": "2018-06-04",
                        "approximateEndDate": "2018-07-04"
                    },
                    {
                        "approximateBeginDate": "2018-06",
                        "approximateEndDate": "2020-07"
                    }
                ]
            },
            "servicePay": {
                "receivingMilitaryRetiredPay": "NO",
                "futureMilitaryRetiredPay": "YES",
                "futureMilitaryRetiredPayExplanation": "ABCDEFGHIJKLMNOPQRSTUVW",
                "militaryRetiredPay": {
                    "branchOfService": "Army",
                    "monthlyAmount": 840
                },
                "retiredStatus": "PERMANENT_DISABILITY_RETIRED_LIST",
                "favorMilitaryRetiredPay": false,
                "receivedSeparationOrSeverancePay": "NO",
                "separationSeverancePay": {
                    "datePaymentReceived": "2022-03-12",
                    "branchOfService": "Naval Academy",
                    "preTaxAmountReceived": 379
                },
                "favorTrainingPay": true
            },
            "directDeposit": {
                "noAccount": false,
                "accountNumber": "ABCDEF",
                "accountType": "CHECKING",
                "financialInstitutionName": "Chase",
                "routingNumber": "123123123"
            },
            "claimantCertification": true
        }
    }
}

What areas of the site does it impact?

modified:   modules/claims_api/app/controllers/concerns/claims_api/v2/disability_compensation_validation.rb
modified:   modules/claims_api/spec/requests/v2/veterans/526_spec.rb

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

@stiehlrod stiehlrod added the claimsApi modules/claims_api label Sep 5, 2024
@va-vfs-bot va-vfs-bot temporarily deployed to API-39748-add-index-to-error-collection-messages/main/main September 5, 2024 19:15 Inactive
'returned from the /service-branches endpoint of the Benefits ' \
'Reference Data API.'
'Reference Data API.' \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Obviously not going to hold this up, total nit, but I think the \ is not needed here? Did not appear to change the error return for any reason when removing it, again, obviously, total nit.

Copy link
Contributor

@rockwellwindsor-va rockwellwindsor-va left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The error returns look great on this.

@stiehlrod stiehlrod requested a review from a team September 6, 2024 14:36
@stiehlrod stiehlrod enabled auto-merge (squash) September 9, 2024 14:19
@va-vfs-bot va-vfs-bot temporarily deployed to API-39748-add-index-to-error-collection-messages/main/main September 9, 2024 14:32 Inactive
@stiehlrod stiehlrod merged commit 3657683 into master Sep 9, 2024
20 of 21 checks passed
@stiehlrod stiehlrod deleted the API-39748-add-index-to-error-collection-messages branch September 9, 2024 15:43
gabezurita added a commit that referenced this pull request Sep 9, 2024
* master:
  case9 logic fixed (#18362)
  API-39748-add-index-to-error-collection-messages (#18333)
  Use random value in Simple Forms PDF stamping file paths (#18361)
  Add `find_dependents_by_ptcpnt_id` to local bgs (#18303)
  remove request_ping defs (#18353)
  API-38827-update-validations-intl-postal-code (#18323)
  [Document Upload Failure] Email veteran on Form 0781/Form 0781a upload retry exhaustion (#18206)
  add feature flags for meb and 5490 (#18328)
  Handle 500 responses from VA Profile v3 Service for v0/profile/contacts endpoint (#18192)
  Resolve MethodLength Rubocop Disables - Part 3 (#18331)
  Resolve MethodLength Rubocop Disables - Part BGS::Form674 (#18326)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants