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

[FE] SPIKE: Explore How a VVC Appointment Got Displayed as a Phone Appointment #56581

Closed loripusey closed 1 year ago

loripusey commented 1 year ago

slack thread

loripusey commented 1 year ago

@brianseek @wullaski created this ticket based on PL discussion this morning

brianseek commented 1 year ago

The mystery is pretty much solved in this thread: https://dsva.slack.com/archives/C022AC2STBM/p1680874744840519

the TLDR: VVC appointments all use stop code 179 which we have flagged as also being a secondary phone stopcode. So these appointments' kind key gets set to phone

loripusey commented 1 year ago

So, is stop code 179 only used for VVC appointments?

brianseek commented 1 year ago

I don't think so. It sounds like a phone appointment could also have that stop code

wullaski commented 1 year ago

This is the current logic to determine if an appointment is a phone or in person.

if the clinic Stop Code is any of these

const PRIMARY_PHONE_STOP_CODES = [
  103, 147, 148, 169,
  178, 181, 182, 199,
  216, 221, 224, 229,
  324, 325, 326, 338,
  424, 425, 428, 441,
  527, 528, 530, 536,
  542, 545, 546, 579,
  584, 597, 611, 683,
  685, 686, 718, 901,
];

or Credit Stop Code is any these

const SECONDARY_PHONE_STOP_CODES = [
  136, 137, 179, 371,
  440, 444, 445, 446,
  447, 490, 491, 644,
  645, 646, 647, 648,
  679, 684, 690, 692,
  693, 699, 674685, 685,
];

Then we label the appointment as a phone appointment.

If we had a stop code pattern that would precisely identify video appointments then we could set the appointment type to video and have the front end code handle it.

loripusey commented 1 year ago

Closing for now, we have an epic to have UX explore which additional modalities we should consider supporting. Add a link to this ticket in that Epic.