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

Public resources for building on and in support of VA.gov. Visit complete Knowledge Hub:
https://depo-platform-documentation.scrollhelp.site/index.html
283 stars 205 forks source link

Recent Facilities Endpoint in vets-api #83352

Closed ldelacosta closed 3 months ago

ldelacosta commented 6 months ago

Description

Create an endpoint to capture the recent facilities for a user.

The vets-api AppointmentService contains a method called get_most_recent_visited_clinic_appointment that performs the calls and checks needed to obtain a user's most recently visited clinics, if any. We will use this method to augment data returned from the AppointmentService, following these rough logical steps:

Additional technical notes:

The spike ticket linked below references the implementation for fetching recent facilities.

Reference spike ticket: #81136

Acceptance Criteria

Background: the va_online_scheduling_recent_locations_filter toggle is on [ ] - new recent_clinics field is returned in the appointments response, following the logic outlined above (the field will be nil if no data was found for it) [ ] - new rspecs and vcr cassettes for the data returned from get_most_recent_visited_clinic_appointment [ ] - all regression tests pass

Design Assets

Figma File

Definition of Done


Bren22va commented 3 months ago

Broken down into smaller tickets in place of this. Closing this "master" ticket.

ldelacosta commented 3 months ago

Please list out the small tickets before closing it out @Bren22va

cferris32 commented 3 months ago

Here are the tickets for this work:

Prototype vets-api endpoint

Enhancements to finalize prototype endpoint

Test coverage for endpoint implementation

ldelacosta commented 3 months ago

Closing out the ticket. No longer is needed.