department-of-veterans-affairs / va.gov-cms

Editor-centered management for Veteran-centered content.
https://prod.cms.va.gov
GNU General Public License v2.0
96 stars 70 forks source link

Facility Locator uses Lighthouse API v1 with existing functionality (Phase 2) #12907

Closed kmariepat-cityfriends closed 3 months ago

kmariepat-cityfriends commented 1 year ago

Description

Lighthouse Facilities V1 shipped August 24, 2023. This long-awaited update made CMS the source of truth for nearly all VA health services throughout the ecosystem. This is Phase 2 of 3 parts to implement V1. The work covered by this epic will convert the Facility Locator to use Facility API v1 with existing functionality. (#12907)

Currently, Veterans can search for 19 VA health services in the Facility Locator. Today, those searches are powered by a legacy data source which affiliates services and facilities. This data source has not been entirely accurate for some time and is no longer maintained given the launch of Lighthouse Facilities V1 in August 2023.

Lighthouse V1 (c/o CMS) contains data for over 90 service types. We are not able to make searching for all of these possible given the current UX which presents a dropdown list of services. However, we can point to CMS as the source of truth for the service selected from the existing service dropdown. This will reduce the discrepancies between the facility/service data we return in search results and the data which is available in CMS (and displayed on VAMC pages).

There is relevant history and bigger picture context in #11542.

Tasks

Expected behavior

xiongjaneg commented 8 months ago

closing, no tickets associated and plenty of epics to use

jilladams commented 5 months ago

@jilladams review epic to confirm if the FE work is scoped to adopt

jilladams commented 4 months ago

In theory: when the Facilities API in vets-api has been updated from V1 to V2, theoretically we should be able to update the endpoints that the Facility Locator is calling to point from V1 to V2 endpoints, and everything still works.

In vets-api: facilities-api has 2 endpoints:

  1. va - sends calls to Lighthouse. This one will be changed by the LH V1 work.
  2. ccp - sends calls to PPMS. won't be affected, as we use different PPMS endpoints that aren't modified by LH.

The number of available services won't change until Phase 3, when we adopt the expanded functionality available in LH V1.

mmiddaugh commented 4 months ago

@oddballpete @jilladams you'll want to check on the source of the service list dropdown when Facility type = VA health or VA benefits (example in screenshot below). I think both are hardcoded - I don't think we get either from Lighthouse.

If hiding them becomes necessary, here's data to support that as a interim solution. Year to date,

After the change, Lighthouse v2 should be the source for the following searches

Search functionality for community care providers should be maintained

Facility Locator screenshots ![image](https://github.com/department-of-veterans-affairs/va.gov-cms/assets/55411834/20ddefc2-c05b-45d5-b8b8-303b81d0b1c4) ![image](https://github.com/department-of-veterans-affairs/va.gov-cms/assets/55411834/105df600-562c-4f07-adbd-6bcb6331f1a9) ![image](https://github.com/department-of-veterans-affairs/va.gov-cms/assets/55411834/f3820106-bc7c-4cc9-82c8-951c23e094ce) ![image](https://github.com/department-of-veterans-affairs/va.gov-cms/assets/55411834/3cac19de-7126-49ce-86fb-d15dfdf66c8c)
khenson-oddball commented 4 months ago

@mmiddaugh Thanks for this info! Could I ask a clarifying question about the "Search functionality for community care providers should be maintained" portion? I'm wondering what specifically is meant by the that portion of the comment since it is separated out from the "Lighthouse v2" portion?

I'm thinking this is speaking specifically to searches that have Facility type = "Community providers (in VA’s network)" OR "Community pharmacies (in VA’s network)". Is that correct?

Also, does the comment mean that community care providers search should continue to use Lighthouse v1 (vets-api) and therefore Lighthouse API v0 (instead of v1)?

Cc: @oddballpete

jilladams commented 4 months ago

Great questions. You're right re: Community Care providers & pharmacies -- there's a diagram here that explains data origins / Lighthouse vs. PPMS community care data: https://github.com/department-of-veterans-affairs/va.gov-team/tree/master/products/facilities/facility-locator/engineering#technical-diagrams

@eselkin & @maxx1128 tagging you in for technical expertise re: Kyle's question in the comment above re: PPMS data in the facilities-api V2 version, once we have LH V1 integrated. When we scoped out V1 Lighthouse updates, we didn't really talk about the fact that the PPMS data sits on facilities-api V1 in vets-api and whether or not that will need to increment in some way. I'm curious if either of you or Kyle see any issues around keeping that data / endpoint at V1?

eselkin commented 4 months ago

So it'd be best (for clarity) if the version for our vets-api request be the same between a /facilities_api/v#/va (LH v1 forwarded request) and a /facilities_api/v#/ccp (PPMS forwarded request)... The reason is that we have one module in the vets-website Facility Locator that generates a URL given a version of the routes in vets-api that we use. Right now we provide it 'v1' and that allows us to send either LH VA requests or CCP requests. It'd be best if we could just up the version to 'v2' on our request and not have to worry about creating a second service that uses 'v1' just for the ccp requests.

The Facility Locator frontend uses .../ccp for the community care providers and pharmacies data, not LH v0

khenson-oddball commented 4 months ago

@mmiddaugh @eselkin Thank you for this extra info! After discussing with @oddballpete, we believe that we can get the ccp/ppms functionality moved over from v1 facilities_api (vets-api) to v2. We are planning on working on this after completing the facilities_api (vets-api) Lighthouse v1 to v2 backend change and before starting Phase 2 (frontend change to integrate with v2 of facilities_api). Please let us know if you have any concerns or see any potential issues with this plan.

Also, there's a mobile_covid service I have noticed in facilities_api (vets-api). Is that something we need to consider? The only place I find it being used is in the va_controller (/facilities_api/v1/va endpoint) and it is behind a feature toggle named "facilities_locator_mobile_covid_online_scheduling" and also requires specific "mobile" params be passed from the frontend.

eselkin commented 4 months ago

I've never touched the mobile COVID stuff. I'll look.

Edit: that flipper enables making a request to /facilities/v1/direct-booking-eligibility-criteria/#id

I don't see that flipper listed. Which uses the URL Settings.hqva_mobile.url which is not lighthouse, right? I think it's this URL in reality: https://veteran.apps.va.gov/facilities/v1/direct-booking-eligibility-criteria/

jilladams commented 4 months ago

@khenson-oddball In general your plan makes great sense - thank you!

For the mobile covid bit, are you all able to trace git blame and see who added that? Could be that it was the facilities team who held the contract before us in 2021, but I'm not finding related tickets. If there's still code in the wild that calls the endpoint, we'll need to preserve it OR remove the code that calls it (worst case: someone turns that flipper on and we have problems, if not?). Also: ^ Eli added some notes after posting his original comment that may not have come through in email.

khenson-oddball commented 4 months ago

@eselkin I didn't find that flipper toggle listed either. I believe you are right about the prod endpoint. I don't believe that is Lighthouse, but I can't be certain about that.

@jilladams thanks for the heads up on Eli's comment! It looks like the Lance Sanchez added the mobile covid change back in May of 2021 with these two PRs. Happy to preserve the mobile covid code if needed, but was hoping to remove it if it is not being used. I'm guessing with it being behind a flipper toggle since 2021 and no mention of the toggle in flipper, it's not being used. 😆

jilladams commented 3 months ago

Closing this. IIR team is handling this migration: https://github.com/department-of-veterans-affairs/va-iir/issues/618

As part of epic: https://github.com/department-of-veterans-affairs/va-iir/issues/617

18014 will track our QA