From 8477e7e57b18d30159a1b2e79cf3c66cec75edea Mon Sep 17 00:00:00 2001 From: Tyler Date: Mon, 16 Dec 2024 06:23:45 -0800 Subject: [PATCH] [API-43130] Form 526 - Log disability classification code (#19863) * log disability classification code * empty commit to jostle gh actions --- .../v1/forms/disability_compensation_controller.rb | 8 ++++++++ .../v2/veterans/disability_compensation_controller.rb | 10 +++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/modules/claims_api/app/controllers/claims_api/v1/forms/disability_compensation_controller.rb b/modules/claims_api/app/controllers/claims_api/v1/forms/disability_compensation_controller.rb index 80d9a5e598d..d7e80699dcd 100644 --- a/modules/claims_api/app/controllers/claims_api/v1/forms/disability_compensation_controller.rb +++ b/modules/claims_api/app/controllers/claims_api/v1/forms/disability_compensation_controller.rb @@ -56,6 +56,14 @@ def submit_form_526 # rubocop:disable Metrics/MethodLength ClaimsApi::Logger.log('526', claim_id: auto_claim.id, detail: 'Submitted to Lighthouse', pdf_gen_dis: form_attributes['autoCestPDFGenerationDisabled']) + form_attributes['disabilities'].each do |disability| + if disability['classificationCode'].present? + ClaimsApi::Logger.log('526_classification_code', + classification_code: disability['classificationCode'], + cid: token.payload['cid'], version: 'v1') + end + end + # .create returns the resulting object whether the object was saved successfully to the database or not. # If it's lacking the ID, that means the create was unsuccessful and an identical claim already exists. # Find and return that claim instead. diff --git a/modules/claims_api/app/controllers/claims_api/v2/veterans/disability_compensation_controller.rb b/modules/claims_api/app/controllers/claims_api/v2/veterans/disability_compensation_controller.rb index aa510565235..57d6c119d36 100644 --- a/modules/claims_api/app/controllers/claims_api/v2/veterans/disability_compensation_controller.rb +++ b/modules/claims_api/app/controllers/claims_api/v2/veterans/disability_compensation_controller.rb @@ -117,7 +117,7 @@ def synchronous private - def shared_submit_methods + def shared_submit_methods # rubocop:disable Metrics/MethodLength auto_claim = ClaimsApi::AutoEstablishedClaim.create( status: ClaimsApi::AutoEstablishedClaim::PENDING, auth_headers:, form_data: form_attributes, @@ -133,6 +133,14 @@ def shared_submit_methods ) end + form_attributes['disabilities'].each do |disability| + if disability['classificationCode'].present? + ClaimsApi::Logger.log('526_classification_code', + classification_code: disability['classificationCode'], + cid: token.payload['cid'], version: 'v2') + end + end + track_pact_counter auto_claim auto_claim