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
281 stars 201 forks source link

VVC at Home - Details Not Displaying #25579

Closed marcynadeau closed 3 years ago

marcynadeau commented 3 years ago

The root of this issue is that some MAS appointment ids have a period in them. This causes two problems in VAOS:

  1. The FE is trying to use the appointment id in a selector used with querySelector, which isn't allowed.
  2. The BE is cutting off the data after the period when forwarding the request to VAMF

Here are the steps to reproduce 2:

  1. Log in as judy.morrison@id.me on staging
  2. Open https://staging-api.va.gov/vaos/v0/appointments/va/202106020000000000000000000000000000Upd.6NcgFTbmSgW0kfFTPqQ
  3. Get a 404.
  4. Examine the source data in the error message and find the vamfURL value

The vamfUrl value is https://fwd-proxy/appointments/v1/patients/1012845331V153043/appointments/202106020000000000000000000000000000Upd, which is missing the id data after the period.

Steps to reproduce:

  1. Log into VCM create two VVC home appts. One 20 minutes in the future. One for today +1.
  2. Log into VAOS and view appointments on upcoming page.
  3. Select to view VVC time + 20 minutes. Expected response: Details display and veteran can select to join appointment from VAOS. Actual Response: No details display.
  4. Select to view VVC time today + 1 day. Expected response: Details display and veteran can select to join appointment from VAOS. Actual Response: No details display.

Note I am not sure why this happening on some VVC home appointments and not others.

Jeff triaged and found the appointment Id had a period in it.

"id": "202106020000000000000000000000000000Upd.6NcgFTbmSgW0kfFTPqQ", "type": "va_appointments", "attributes": { "char4": null, "clinicId": null, "clinicFriendlyName": null, "communityCare": null, "facilityId": "983", "phoneOnly": null, "startDate": "2021-06-02T19:50:00Z", "sta6aid": null, "vdsAppointments": [], "vvsAppointments": [ { "id": "a5dffa35-c805-4db9-9281-6d247c54cfa9", "appointmentKind": "ADHOC", "sourceSystem": "VCM", "dateTime": "2021-06-02T19:50:00Z", "desiredDate": "2021-06-02T19:50:00Z", "duration": 20, "status": { "description": "F", "code": "FUTURE"

grossb1 commented 3 years ago

The backend work has been merged in: https://github.com/department-of-veterans-affairs/vets-api/pull/7125