Skip to content

Commit

Permalink
feat(vaos): add enableStopCodeFilter query param to clinic calls (#15341
Browse files Browse the repository at this point in the history
)


va.gov-team#74664
  • Loading branch information
ajmagdub authored Feb 1, 2024
1 parent 51f0f36 commit ddf5362
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 5 deletions.
9 changes: 9 additions & 0 deletions modules/vaos/app/services/vaos/v2/systems_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
module VAOS
module V2
class SystemsService < VAOS::SessionService
STOP_CODE_FILTERS = :va_online_scheduling_clinic_filtering

def get_facility_clinics(location_id:,
clinical_service: nil,
clinic_ids: nil,
Expand All @@ -18,6 +20,13 @@ def get_facility_clinics(location_id:,
'pageSize' => page_size,
'pageNumber' => page_number
}.compact

# 'clinicalService' is used to retrieve clinics for appointment scheduling,
# triggering stop code filtering to avoid displaying unavailable clinics.
if url_params['clinicalService'].present? && Flipper.enabled?(STOP_CODE_FILTERS, user)
url_params.merge!('enableStopCodeFilter' => true)
end

response = perform(:get, url, url_params, headers)
response.body[:data].map { |clinic| OpenStruct.new(clinic) }
end
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit ddf5362

Please sign in to comment.