Skip to content

Commit

Permalink
Merge branch 'master' into API-43906-remove-deprec-services-III
Browse files Browse the repository at this point in the history
  • Loading branch information
stiehlrod authored Jan 10, 2025
2 parents 65f3872 + 3a4ff6f commit f972001
Show file tree
Hide file tree
Showing 23 changed files with 516 additions and 115 deletions.
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -1721,6 +1721,7 @@ spec/requests/swagger_spec.rb @department-of-veterans-affairs/va-api-engineers @
spec/requests/v0/messaging/health/recipients_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/requests/v0/upload_supporting_evidence_spec.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/requests/v0/user_spec.rb @department-of-veterans-affairs/octo-identity
spec/requests/v0/disability_compensation_in_progress_forms_controller_spec.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/requests/v0/disability_compensation_in_progress_forms_controller_request_spec.rb @department-of-veterans-affairs/Disability-Experience @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/requests/v0/evss_claims/documents_spec.rb @department-of-veterans-affairs/benefits-management-tools-be @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
spec/requests/v0/form1010cg @department-of-veterans-affairs/vfs-10-10 @department-of-veterans-affairs/va-api-engineers @department-of-veterans-affairs/backend-review-group
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ group :development, :test do
gem 'rubocop-rspec'
gem 'rubocop-rspec_rails'
gem 'rubocop-thread_safety'
gem 'sidekiq', '~> 7.2.0'
gem 'sidekiq'
gem 'timecop'
gem 'webmock'
gem 'yard'
Expand Down
21 changes: 10 additions & 11 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,13 @@ PATH
GEM
remote: https://enterprise.contribsys.com/
specs:
sidekiq-ent (7.2.4)
sidekiq-ent (7.3.4)
einhorn (~> 1.0)
gserver
sidekiq (>= 7.2.0, < 8)
sidekiq-pro (>= 7.2.0, < 8)
sidekiq-pro (7.2.1)
base64
sidekiq (>= 7.2.0, < 8)
sidekiq (>= 7.3.7, < 8)
sidekiq-pro (>= 7.3.4, < 8)
sidekiq-pro (7.3.5)
sidekiq (>= 7.3.7, < 8)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -874,7 +873,7 @@ GEM
psych (>= 4.0.0)
redis (5.3.0)
redis-client (>= 0.22.0)
redis-client (0.22.2)
redis-client (0.23.0)
connection_pool
redis-namespace (1.11.0)
redis (>= 4)
Expand Down Expand Up @@ -1023,11 +1022,11 @@ GEM
shrine (3.6.0)
content_disposition (~> 1.0)
down (~> 5.1)
sidekiq (7.2.4)
concurrent-ruby (< 2)
sidekiq (7.3.7)
connection_pool (>= 2.3.0)
logger
rack (>= 2.2.4)
redis-client (>= 0.19.0)
redis-client (>= 0.22.2)
sign_in_service (0.4.0)
faraday (~> 2.7)
jwt (~> 2.8)
Expand Down Expand Up @@ -1320,7 +1319,7 @@ DEPENDENCIES
sentry-ruby
shoulda-matchers
shrine
sidekiq (~> 7.2.0)
sidekiq
sidekiq-ent!
sidekiq-pro!
sign_in_service
Expand Down
1 change: 1 addition & 0 deletions app/controllers/v0/apidocs_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ class ApidocsController < ApplicationController
Swagger::Schemas::Vet360::States,
Swagger::Schemas::Vet360::Zipcodes,
Swagger::Schemas::VirtualAgentWebchatToken,
FacilitiesApi::V2::Schemas::Facilities,
self
].freeze

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,21 @@ def data_and_metadata_with_updated_rated_disabilities

# for Toxic Exposure 1.1 - add indicator to In Progress Forms
# moving forward, we don't want to change the version if it is already there
if Flipper.enabled?(:disability_526_toxic_exposure_ipf,
@current_user) && parsed_form_data['startedFormVersion'].blank?
parsed_form_data['startedFormVersion'] = '2019'
end

parsed_form_data = set_started_form_version(parsed_form_data)
{
formData: parsed_form_data,
metadata:
}
end

def set_started_form_version(data)
if data['startedFormVersion'].blank?
log_started_form_version(data, 'existing IPF missing startedFormVersion')
data['startedFormVersion'] = '2019'
end
data
end

def rated_disabilities_evss
@rated_disabilities_evss ||= FormProfiles::VA526ez.for(form_id:, user: @current_user)
.initialize_rated_disabilities_information
Expand Down
4 changes: 1 addition & 3 deletions app/models/form_profiles/va_526ez.rb
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,7 @@ def prefill_base_class_methods

def initialize_form526_prefill
VA526ez::Form526Prefill.new(
# any form that has a startedFormVersion (whether it is '2019' or '2022') will go through the Toxic Exposure flow
# '2022' means the Toxic Exposure 1.0 flag.
started_form_version: Flipper.enabled?(:disability_526_toxic_exposure, user) ? '2022' : nil,
started_form_version: '2022',
sync_modern_0781_flow: Flipper.enabled?(:disability_compensation_sync_modern_0781_flow, user)
)
end
Expand Down
95 changes: 95 additions & 0 deletions app/swagger/swagger/requests/caregivers_assistance_claims.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,101 @@ class CaregiversAssistanceClaims
end
end
end

swagger_path '/v0/caregivers_assistance_claims/facilities' do
operation :post do
key :description, 'Get a list of medical facilities based on search criteria.'

key :tags, %w[benefits_forms]

parameter do
key :name, :zip
key :in, :query
key :description, 'The zip code for facility search.'
key :type, :string
end

parameter do
key :name, :state
key :in, :query
key :description, 'The state for facility search.'
key :type, :string
end

parameter do
key :name, :lat
key :in, :query
key :description, 'The latitude for facility search.'
key :type, :number
end

parameter do
key :name, :long
key :in, :query
key :description, 'The longitude for facility search.'
key :type, :number
end

parameter do
key :name, :radius
key :in, :query
key :description, 'The radius around the location for facility search.'
key :type, :number
end

parameter do
key :name, :page
key :in, :query
key :description, 'The page of results to retrieve.'
key :type, :integer
end

parameter do
key :name, :per_page
key :in, :query
key :description, 'The number of facilities per page.'
key :type, :integer
end

parameter do
key :name, :facilityIds
key :in, :query
key :description, 'Comma-separated list of facility IDs to filter by.'
key :type, :string
end

response 200 do
key :description, 'List of facilities retrieved successfully'
schema do
key :$ref, :Facilities
end
end
end
end

swagger_path '/v0/caregivers_assistance_claims/download_pdf' do
operation :post do
key :description, 'Download a pre-filled 10-10CG PDF form.'

key :tags, %w[benefits_forms]

parameter do
key :name, :claim_id
key :in, :query
key :description, 'The ID of the claim to download the PDF for.'
key :required, true
key :type, :string
end

response 200 do
key :description, 'PDF form download'

schema do
property :data, type: :string, format: 'binary'
end
end
end
end
end
end
end
125 changes: 124 additions & 1 deletion app/swagger/swagger/requests/health_care_applications.rb
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,130 @@ class HealthCareApplications
end
end

swagger_path '/v0/health_care_applications/facilities' do
operation :get do
key :description, 'Retrieve a list of active healthcare facilities'
key :operationId, 'getFacilities'
key :tags, %w[benefits_forms]

parameter :optional_authorization

parameter do
key :name, :zip
key :in, :query
key :description, 'ZIP code for filtering facilities'
key :required, false
key :type, :string
end

parameter do
key :name, :state
key :in, :query
key :description, 'State for filtering facilities'
key :required, false
key :type, :string
end

parameter do
key :name, :lat
key :in, :query
key :description, 'Latitude for filtering facilities'
key :required, false
key :type, :string
end

parameter do
key :name, :long
key :in, :query
key :description, 'Longitude for filtering facilities'
key :required, false
key :type, :string
end

parameter do
key :name, :radius
key :in, :query
key :description, 'The radius around the location for facility search.'
key :required, false
key :type, :string
end

parameter do
key :name, :bbox
key :in, :query
key :description, 'Bounding box for facility search'
key :required, false
key :type, :string
end

parameter do
key :name, :visn
key :in, :query
key :description, 'VISN code for filtering facilities'
key :required, false
key :type, :string
end

parameter do
key :name, :type
key :in, :query
key :description, 'Type of facility'
key :required, false
key :type, :string
end

parameter do
key :name, :services
key :in, :query
key :description, 'Services offered at the facility'
key :required, false
key :type, :string
end

parameter do
key :name, :mobile
key :in, :query
key :description, 'Filter by mobile facilities'
key :required, false
key :type, :boolean
end

parameter do
key :name, :page
key :in, :query
key :description, 'Page number for pagination'
key :required, false
key :type, :integer
end

parameter do
key :name, :per_page
key :in, :query
key :description, 'Number of facilities per page'
key :required, false
key :type, :integer
end

parameter do
key :name, :facilityIds
key :in, :query
key :description, 'Array of facility IDs'
key :type, :array
items do
key :type, :string
end
key :collectionFormat, :multi
end

response 200 do
key :description, 'Successful response with a list of healthcare facilities'
schema do
key :$ref, :Facilities
end
end
end
end

swagger_schema :HealthCareApplicationSubmissionResponse do
key :required, %i[formSubmissionId timestamp success]

Expand All @@ -195,7 +319,6 @@ class HealthCareApplications

swagger_schema :HealthCareApplicationHealthcheckResponse do
key :required, %i[formSubmissionId timestamp]

property :formSubmissionId, type: :integer
property :timestamp, type: :string
end
Expand Down
2 changes: 1 addition & 1 deletion config/settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -990,7 +990,7 @@ lighthouse:
rsa_key: ~
use_mocks: false
benefits_documents:
timeout: 55
timeout: 65
host: https://sandbox-api.va.gov
access_token:
aud_claim_url: https://deptva-eval.okta.com/oauth2/ausi3ui83fLa68IJv2p7/v1/token
Expand Down
Loading

0 comments on commit f972001

Please sign in to comment.