Skip to content

Commit

Permalink
[API-43130] Form 526 - Log disability classification code (#19863)
Browse files Browse the repository at this point in the history
* log disability classification code

* empty commit to jostle gh actions
  • Loading branch information
tycol7 authored Dec 16, 2024
1 parent edf9e1a commit 8477e7e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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
Expand Down

0 comments on commit 8477e7e

Please sign in to comment.