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

Wait times are broken: Update vets-api to include request to /{facilityId}/services to LH on GET va/facilityId #18427

Closed eselkin closed 1 month ago

eselkin commented 2 months ago

User Story or Problem Statement

As a user on the VAMC pages, I used to get Wait Times data on the individual services. However, after the move to LH v1 (Facilities API v2), that data no longer comes back because they moved that data to a new endpoint. Facilities API needs to add a second request on the GET endpoint and merge the responses and add back the properties into the format we used to receive from the GET.

Acceptance Criteria

  1. Access object is returned from GET endpoint for facilities API v2
  2. VAMC page services on vets-website load the access to care data from the wait times
### Implementation Tasks
- [x] Ruby: Add serializer for services to process response into access format from v0
- [x] Ruby: merge data from 2 responses into one response
- [x] Ruby: Add `attribute :access, Object` to `modules/facilities_api/app/models/facilities_api/v2/lighthouse/facility.rb`
- [x] Return merged response
- [ ] Update vets-website to use GET request instead of POST for single facility requests
### QA
- [ ] QA Tasks to be added here.
laflannery commented 2 months ago

@Agile6MSkinner and @mmiddaugh I was going through my accessibility tickets and this wait time widget previously had a heading level defect present. Could we consider updating the heading level at the same time that this work is done?

Agile6MSkinner commented 1 month ago

@laflannery @eselkin I'll defer to Eli on that. If it's ok, let's just add it to the ACs and rock on.

eselkin commented 1 month ago

Added https://github.com/department-of-veterans-affairs/va.gov-cms/issues/18802 if we have time some day. It's not required.

eselkin commented 1 month ago

Checked on https://www.va.gov/boston-health-care/locations/brockton-va-medical-center/ and https://www.va.gov/boston-vet-center/ Correctly acquiring on VAMC and getting an empty list (as expected) on Vet Centers.