Skip to content

Commit

Permalink
Merge branch 'master' into ndbex_64881_extend_expiration_date
Browse files Browse the repository at this point in the history
  • Loading branch information
tblackwe authored Apr 5, 2024
2 parents d119eb5 + 85af796 commit b4796d2
Show file tree
Hide file tree
Showing 161 changed files with 10,525 additions and 2,258 deletions.
5 changes: 1 addition & 4 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -399,8 +399,6 @@ app/serializers/receive_application_serializer.rb @department-of-veterans-affair
app/serializers/saved_claim_serializer.rb @department-of-veterans-affairs/Benefits-Team-1 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/serializers/search_serializer.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/serializers/service_history_serializer.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/serializers/sign_in @department-of-veterans-affairs/octo-identity
app/serializers/sign_in/introspect_serializer.rb @department-of-veterans-affairs/octo-identity
app/serializers/submit_disability_form_serializer.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/serializers/supporting_documentation_attachment_serializer.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
app/serializers/supporting_evidence_attachment_serializer.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down Expand Up @@ -889,6 +887,7 @@ lib/pdf_fill/forms/va21p527ez.rb @department-of-veterans-affairs/pensions @depar
lib/pdf_info.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
lib/pdf_utilities @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
lib/pension_burial @department-of-veterans-affairs/mbs-core-team @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
lib/pension_21p527ez @department-of-veterans-affairs/pensions @department-of-veterans-affairs/backend-review-group
lib/periodic_jobs.rb @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
lib/preneeds @department-of-veterans-affairs/mbs-core-team @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
lib/rx @department-of-veterans-affairs/mobile-api-team @department-of-veterans-affairs/vfs-mhv-medications @department-of-veterans-affairs/backend-review-group
Expand Down Expand Up @@ -1576,8 +1575,6 @@ spec/serializers/lighthouse @department-of-veterans-affairs/vfs-facilities
spec/serializers/message_serializer_spec.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/serializers/personal_information_serializer_spec.rb @department-of-veterans-affairs/vfs-authenticated-experience-backend @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/serializers/receive_application_serializer_spec.rb @department-of-veterans-affairs/mbs-core-team @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/serializers/sign_in @department-of-veterans-affairs/octo-identity
spec/serializers/sign_in/introspect_serializer_spec.rb @department-of-veterans-affairs/octo-identity
spec/serializers/triage_team_serializer_spec.rb @department-of-veterans-affairs/vfs-mhv-secure-messaging @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/serializers/user_serializer_spec.rb @department-of-veterans-affairs/octo-identity
spec/serializers/user_verification_serializer_spec.rb @department-of-veterans-affairs/octo-identity
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build_atlas_codeowners.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:

- name: Check codeowner changes
id: check-codeowner-changes
uses: tj-actions/changed-files@v43 # v36.3.0
uses: tj-actions/changed-files@v44 # v36.3.0
with:
files: |
.github/CODEOWNERS
Expand Down
25 changes: 12 additions & 13 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,10 @@ GIT

GIT
remote: https://github.com/department-of-veterans-affairs/vets-json-schema
revision: 7892dc348677325cc57712ff4a12d6a78f024315
revision: 0277d5bcddf48894d22b45f3618bca33e82a8ca4
branch: master
specs:
vets_json_schema (21.5.5)
vets_json_schema (22.0.1)
multi_json (~> 1.0)
script_utils (= 0.0.4)

Expand Down Expand Up @@ -243,16 +243,16 @@ GEM
attr_extras (7.1.0)
awesome_print (1.9.2)
aws-eventstream (1.3.0)
aws-partitions (1.899.0)
aws-sdk-core (3.191.4)
aws-partitions (1.903.0)
aws-sdk-core (3.191.5)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.651.0)
aws-sigv4 (~> 1.8)
jmespath (~> 1, >= 1.6.1)
aws-sdk-kms (1.78.0)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sigv4 (~> 1.1)
aws-sdk-s3 (1.146.0)
aws-sdk-s3 (1.146.1)
aws-sdk-core (~> 3, >= 3.191.0)
aws-sdk-kms (~> 1)
aws-sigv4 (~> 1.8)
Expand Down Expand Up @@ -417,7 +417,7 @@ GEM
factory_bot_rails (6.4.3)
factory_bot (~> 6.4)
railties (>= 5.0.0)
faker (3.3.0)
faker (3.3.1)
i18n (>= 1.8.11, < 2)
faraday (2.9.0)
faraday-net_http (>= 2.0, < 3.2)
Expand All @@ -438,7 +438,7 @@ GEM
typhoeus (~> 1.4)
faraday_curl (0.0.2)
faraday (>= 0.9.0)
fastimage (2.3.0)
fastimage (2.3.1)
ffi (1.16.3)
ffi-compiler (1.0.1)
ffi (>= 1.0.0)
Expand Down Expand Up @@ -509,7 +509,7 @@ GEM
thor (>= 0.20, < 2.a)
google-cloud-env (2.1.1)
faraday (>= 1.0, < 3.a)
google-protobuf (4.26.0)
google-protobuf (4.26.1)
rake (>= 13)
googleauth (1.11.0)
faraday (>= 1.0, < 3.a)
Expand Down Expand Up @@ -692,7 +692,7 @@ GEM
os (1.1.4)
ox (2.14.18)
parallel (1.24.0)
parallel_tests (4.6.0)
parallel_tests (4.6.1)
parallel
parser (3.3.0.5)
ast (~> 2.4.1)
Expand Down Expand Up @@ -828,7 +828,7 @@ GEM
uber (< 0.2.0)
request_store (1.6.0)
rack (>= 1.4)
restforce (7.3.0)
restforce (7.3.1)
faraday (>= 1.1.0, < 2.10.0)
faraday-follow_redirects (<= 0.3.0, < 1.0.0)
faraday-multipart (>= 1.0.0, < 2.0.0)
Expand Down Expand Up @@ -913,7 +913,7 @@ GEM
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (2.28.0)
rubocop-rspec (2.29.1)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
Expand Down Expand Up @@ -952,7 +952,7 @@ GEM
rake (>= 10.0)
semantic_logger (4.15.0)
concurrent-ruby (~> 1.0)
sentry-ruby (5.17.1)
sentry-ruby (5.17.2)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
shellany (0.0.1)
Expand Down Expand Up @@ -1283,4 +1283,3 @@ RUBY VERSION

BUNDLED WITH
2.4.9

4 changes: 1 addition & 3 deletions app/controllers/v0/decision_review_evidences_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ class DecisionReviewEvidencesController < ApplicationController
def save_attachment_to_cloud!
common_log_params = {
key: :evidence_upload_to_s3,
# Will have to update this when NOD and SC using same LH API version. The beginning of that work is ticketed in
# https://github.com/department-of-veterans-affairs/va.gov-team/issues/66514.
form_id: get_form_id_from_request_headers,
user_uuid: current_user.uuid,
downstream_system: 'AWS S3',
Expand All @@ -41,7 +39,7 @@ def get_form_id_from_request_headers
# - vets-website/src/platform/startup/setup.js (setUpCommonFunctionality)
# - vets-website/src/platform/startup/index.js (startApp)
source_app_name = request.headers['Source-App-Name']
# The higher-level review form (966) is not included in this list because it does permit evidence uploads.
# The higher-level review form (996) is not included in this list because it does not permit evidence uploads.
form_id = {
'10182-board-appeal' => '10182',
'995-supplemental-claim' => '995'
Expand Down
2 changes: 1 addition & 1 deletion app/controllers/v0/pension_claims_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def create
raise Common::Exceptions::ValidationErrors, claim.errors
end

claim.upload_to_lighthouse
claim.upload_to_lighthouse(current_user)

pension_monitor.track_create_success(in_progress_form, claim, current_user)

Expand Down
19 changes: 10 additions & 9 deletions app/controllers/v0/rated_disabilities_discrepancies_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,26 @@ def show
lh_response = get_lh_rated_disabilities
evss_response = get_evss_rated_disabilities

lh_response_length = lh_response.dig('data', 'attributes', 'individual_ratings').length
evss_response_length = evss_response.rated_disabilities.length

if lh_response_length != evss_response_length
log_length_discrepancy((lh_response_length - evss_response_length).abs)
end
lh_ratings = lh_response.dig('data', 'attributes', 'individual_ratings')
evss_ratings = evss_response.rated_disabilities
log_length_discrepancy(evss_ratings, lh_ratings) if lh_ratings.length != evss_ratings.length

# This doesn't need to return anything at the moment
render json: nil
end

private

def log_length_discrepancy(difference)
message = "Discrepancy of #{difference} disability ratings"
def log_length_discrepancy(evss_ratings, lh_ratings)
message = 'Discrepancy between Lighthouse and EVSS disability ratings'

::Rails.logger.info(message, {
message_type: 'lh.rated_disabilities.length_discrepancy',
revision: 4
evss_length: evss_ratings.length,
evss_rating_ids: evss_ratings.pluck('rated_disability_id'),
lighthouse_length: lh_ratings.length,
lighthouse_rating_ids: lh_ratings.pluck('disability_rating_id'),
revision: 5
})
end

Expand Down
6 changes: 0 additions & 6 deletions app/controllers/v0/sign_in_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -223,12 +223,6 @@ def logingov_logout_proxy
render json: { errors: e }, status: :bad_request
end

def introspect
render json: @current_user, serializer: SignIn::IntrospectSerializer, status: :ok
rescue SignIn::Errors::StandardError => e
render json: { errors: e }, status: :unauthorized
end

private

def validate_authorize_params(type, client_id, acr, operation)
Expand Down
23 changes: 16 additions & 7 deletions app/models/concerns/form526_claim_fast_tracking_concern.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,16 @@ module Form526ClaimFastTrackingConcern
MAX_CFI_STATSD_KEY_PREFIX = 'api.max_cfi'
EP_MERGE_STATSD_KEY_PREFIX = 'worker.ep_merge'

DISABILITIES_WITH_MAX_CFI = [ClaimFastTracking::DiagnosticCodes::TINNITUS].freeze
EP_MERGE_BASE_CODES = %w[010 110 020 030 040].freeze
EP_MERGE_SPECIAL_ISSUE = 'EMP'
OPEN_STATUSES = ['CLAIM RECEIVED', 'UNDER REVIEW', 'GATHERING OF EVIDENCE', 'REVIEW OF EVIDENCE'].freeze
OPEN_STATUSES = [
'CLAIM RECEIVED',
'UNDER REVIEW',
'GATHERING OF EVIDENCE',
'REVIEW OF EVIDENCE',
'CLAIM_RECEIVED',
'INITIAL_REVIEW'
].freeze

def send_rrd_alert_email(subject, message, error = nil, to = Settings.rrd.alerts.recipients)
RrdAlertMailer.build(self, subject, message, error, to).deliver_now
Expand Down Expand Up @@ -117,14 +123,17 @@ def prepare_for_ep_merge!
pending_eps = open_claims.select do |claim|
EP_MERGE_BASE_CODES.include?(claim['base_end_product_code']) && OPEN_STATUSES.include?(claim['status'])
end
StatsD.distribution("#{EP_MERGE_STATSD_KEY_PREFIX}.pending_ep_count", pending_eps.count)
Rails.logger.info('EP Merge total open EPs', id:, count: pending_eps.count)
return unless pending_eps.count == 1

date = Date.strptime(pending_eps.first['date'], '%m/%d/%Y')
days_ago = (Time.zone.today - date).round
StatsD.distribution("#{EP_MERGE_STATSD_KEY_PREFIX}.pending_ep_age", days_ago)

if Flipper.enabled?(:disability_526_ep_merge_api, User.find(user_uuid))
feature_enabled = Flipper.enabled?(:disability_526_ep_merge_api, User.find(user_uuid))
Rails.logger.info(
'EP Merge open EP eligibility',
{ id:, feature_enabled:, pending_ep_age: days_ago, pending_ep_status: pending_eps.first['status'] }
)
if feature_enabled
save_metadata(ep_merge_pending_claim_id: pending_eps.first['id'])
add_ep_merge_special_issue!
end
Expand Down Expand Up @@ -179,7 +188,7 @@ def update_form_with_classification_code(classification_code)
end

def log_max_cfi_metrics_on_submit
DISABILITIES_WITH_MAX_CFI.intersection(diagnostic_codes).each do |diagnostic_code|
ClaimFastTracking::DiagnosticCodesForMetrics::DC.intersection(diagnostic_codes).each do |diagnostic_code|
next unless disabilities.any? do |dis|
diagnostic_code == dis['diagnosticCode']
end
Expand Down
4 changes: 4 additions & 0 deletions app/models/prescription_details.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ class PrescriptionDetails < Prescription
attribute :tracking, Boolean
attribute :orderable_item, String
attribute :sorted_dispensed_date
attribute :shape, String
attribute :color, String
attribute :back_imprint, String
attribute :front_imprint, String

def sorted_dispensed_date
has_refills = try(:rx_rf_records).present?
Expand Down
7 changes: 5 additions & 2 deletions app/models/saved_claim/burial.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ def process_attachments!
refs = attachment_keys.map { |key| Array(open_struct_form.send(key)) }.flatten
files = PersistentAttachment.where(guid: refs.map(&:confirmationCode))
files.find_each { |f| f.update(saved_claim_id: id) }

CentralMail::SubmitSavedClaimJob.new.perform(id)
if Flipper.enabled?(:central_mail_benefits_intake_submission)
Lighthouse::SubmitBenefitsIntakeClaim.new.perform(id)
else
CentralMail::SubmitSavedClaimJob.new.perform(id)
end
end

def regional_office
Expand Down
4 changes: 2 additions & 2 deletions app/models/saved_claim/pension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ def send_confirmation_email
# Send this Pension claim to the Lighthouse Benefit Intake API
# https://developer.va.gov/explore/api/benefits-intake/docs
# @see Lighthouse::PensionBenefitIntakeJob
def upload_to_lighthouse
def upload_to_lighthouse(current_user = nil)
refs = attachment_keys.map { |key| Array(open_struct_form.send(key)) }.flatten
files = PersistentAttachment.where(guid: refs.map(&:confirmationCode))
files.find_each { |f| f.update(saved_claim_id: id) }

Lighthouse::PensionBenefitIntakeJob.perform_async(id)
Lighthouse::PensionBenefitIntakeJob.perform_async(id, current_user&.uuid)
end
end
10 changes: 3 additions & 7 deletions app/models/saved_claim/veteran_readiness_employment_claim.rb
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def send_to_central_mail!(user)
log_message_to_sentry(guid, :warn, { attachment_id: guid }, { team: 'vfs-ebenefits' })
@sent_to_cmp = true
log_to_statsd('cmp') do
process_attachments!(user)
process_attachments!
end

send_central_mail_confirmation_email(user)
Expand Down Expand Up @@ -217,16 +217,12 @@ def send_central_mail_confirmation_email(user)
)
end

def process_attachments!(user)
def process_attachments!
refs = attachment_keys.map { |key| Array(open_struct_form.send(key)) }.flatten
files = PersistentAttachment.where(guid: refs.map(&:confirmationCode))
files.find_each { |f| f.update(saved_claim_id: id) }

if Flipper.enabled?(:central_mail_benefits_intake_submission, user)
Lighthouse::SubmitBenefitsIntakeClaim.new.perform(id)
else
CentralMail::SubmitSavedClaimJob.new.perform(id)
end
Lighthouse::SubmitBenefitsIntakeClaim.new.perform(id)
end

def business_line
Expand Down
2 changes: 2 additions & 0 deletions app/policies/mhv_messaging_policy.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# frozen_string_literal: true

require 'sm/client'

MHVMessagingPolicy = Struct.new(:user, :mhv_messaging) do
def access?
return false unless user.mhv_correlation_id
Expand Down
39 changes: 0 additions & 39 deletions app/serializers/sign_in/introspect_serializer.rb

This file was deleted.

9 changes: 8 additions & 1 deletion app/services/claim_fast_tracking/diagnostic_codes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,15 @@

module ClaimFastTracking
module DiagnosticCodes
LIMITED_MOTION_OF_WRIST = 5215
LIMITATION_OF_MOTION_OF_INDEX_OR_LONG_FINGER = 5229
LIMITATION_OF_EXTENSION_OF_THE_THIGH = 5251
FLATFOOT_ACQUIRED = 5276
HALLUX_VALGUS_UNILATERAL = 5280
TINNITUS = 6260
ASTHMA = 6602
HYPERTENSION = 7101
TINNITUS = 6260
SCARS_GENERAL = 7805
MIGRAINES = 8100
end
end
Loading

0 comments on commit b4796d2

Please sign in to comment.