Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VAOS: Migrate MFS Clinics Search Call Over to VAOS Service #12863

Merged
merged 0 commits into from
Jun 6, 2023

Conversation

ajmagdub
Copy link
Contributor

@ajmagdub ajmagdub commented Jun 1, 2023

Summary

We have updated the system for obtaining clinic information from the Mobile Facility Service (MFS) to the VAOS Service. Update the VAOS::V2::MobileFacilityService#get_clinic method to use the "/vaos/v1/locations/<site_id>/clinics" endpoint, which points to the VAOS Service.

Additionally, the assignments for the friendly name in VAOS::V2::AppointmentsController were modified to retrieve
its value from the clinics service name. The VAOS service provides the friendly name in the service name, if
available, otherwise the internal clinic will be returned.

Related issue(s)

department-of-veterans-affairs/va.gov-team#58434

Testing done

I have made adjustments to the RSpec tests and VCR Cassettes to accommodate the recent change.

@github-actions github-actions bot added the VAOS Va Online Scheduling Contract label Jun 1, 2023
@va-vfs-bot va-vfs-bot temporarily deployed to 58434_clinic_search_migration/main/main June 1, 2023 19:27 Inactive
@va-vsp-bot va-vsp-bot requested a deployment to 58434_clinic_search_migration/main/main June 2, 2023 13:48 In progress
@va-vfs-bot va-vfs-bot temporarily deployed to 58434_clinic_search_migration/main/main June 2, 2023 13:48 Inactive
@va-vsp-bot va-vsp-bot requested a deployment to 58434_clinic_search_migration/main/main June 5, 2023 13:53 In progress
@va-vfs-bot va-vfs-bot temporarily deployed to 58434_clinic_search_migration/main/main June 5, 2023 13:54 Inactive
@va-vsp-bot va-vsp-bot requested a deployment to 58434_clinic_search_migration/main/main June 5, 2023 13:57 In progress
@va-vfs-bot va-vfs-bot temporarily deployed to 58434_clinic_search_migration/main/main June 5, 2023 13:59 Inactive
@va-vsp-bot va-vsp-bot requested a deployment to 58434_clinic_search_migration/main/main June 6, 2023 01:47 In progress
@va-vfs-bot va-vfs-bot temporarily deployed to 58434_clinic_search_migration/main/main June 6, 2023 01:47 Inactive
@va-vsp-bot va-vsp-bot requested a deployment to 58434_clinic_search_migration/main/main June 6, 2023 16:49 In progress
@va-vsp-bot va-vsp-bot requested a deployment to 58434_clinic_search_migration/main/main June 6, 2023 17:05 In progress
@va-vfs-bot va-vfs-bot temporarily deployed to 58434_clinic_search_migration/main/main June 6, 2023 17:12 Inactive
@va-vsp-bot va-vsp-bot requested a deployment to 58434_clinic_search_migration/main/main June 6, 2023 18:27 In progress
@va-vfs-bot va-vfs-bot temporarily deployed to 58434_clinic_search_migration/main/main June 6, 2023 18:28 Inactive
@ajmagdub ajmagdub marked this pull request as ready for review June 6, 2023 18:36
@ajmagdub ajmagdub requested review from a team as code owners June 6, 2023 18:36
Copy link
Contributor

@cferris32 cferris32 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@kpethtel kpethtel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks fine. Per my comment below, would it make sense to add a get_clinics method? Maybe even make a "get_clinics_with_cache" method so that we can get cache optimizations.

Speaking of which, I wasn't aware of the get_clinic_with_cache method. We aren't using this. So thanks for pointing this out. I'll talk to Jayson about changing our code to use it.

@@ -14,12 +14,12 @@ class MobileFacilityService < VAOS::SessionService
# @return [OpenStruct] An OpenStruct object containing information about the clinic.
#
def get_clinic(station_id:, clinic_id:)
params = {}
params = { clinicIds: clinic_id }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So is it possible to send multiple ids? That could actually be useful to the mobile team.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, in VAOS Service it is possible to send multiple clinic ids for a facility. I'll go ahead and submit a GitHub ticket to add a get_clinics method.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, AJ! Just let us know. I didn't realize your team only recently added those "with cache" methods and that Corey updated our proxy to use the cache version of the get facility method. Thanks for doing that. I'll try to update us to use the clinic cache as well. That may largely make the "get clinics in bulk" method irrelevant, but it seems like a reasonable thing to have.

@ajmagdub ajmagdub merged commit 6078929 into master Jun 6, 2023
@ajmagdub ajmagdub deleted the 58434_clinic_search_migration branch June 6, 2023 20:20
ryan-mcneil pushed a commit that referenced this pull request Dec 11, 2023
* refactor(vaos): update MobileFacilityService to use VAOS Service instead of MFS to get clinic data
   refactor(vaos): update friendly_name field to use service_name
   test(vaos): updated VAOS rspec tests work with the changes

* test(mobile): update get clinic vcr cassettes due to change from mfs to vaos service endpoints
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
console-services-review VAOS Va Online Scheduling Contract
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants