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 197 forks source link

[Spike] - Document Appointment Type logic #90109

Open simiadebowale opened 1 month ago

simiadebowale commented 1 month ago

Spike for the upcoming work to move Appointment type logic into the vets-api appointment_service. This will be a joint development effort by vets-website and vets-api.

We want to document the Appointment Type logic I.e, cc appointment, cc request, request, VA appointment on the FE. The primary function we will need to look at is: getAppointmentType found in our transformers.js file (src/applications/vaos/services/appointment/transformers.js).

Tasks

simiadebowale commented 1 month ago
simiadebowale commented 1 month ago

Mobile team need to review. cc: @ldelacosta

simiadebowale commented 2 weeks ago

Logic for modality: Here's the complete logic we have for determining the different types of video appointments: Telephone appointments, Appointment - Kind field = 'phone'. Video appointments, Appointment - Kind field = 'telehealth'. Atlas, Appointment - telehealth field should have an atlas field. i.e telehealth: {atlas: ...} VA Video Connect using a VA device, Appointment - telehealth field should have vvsKind field === 'MOBILE_ANY' i.e telehealth: {vvsKind: 'MOBILE_ANY'} & Appointment.extension.patientHasMobileGfe === true VA Video Connect at Home, Appointment - telehealth field should have vvsKind field === 'MOBILE_ANY' i.e telehealth: {vvsKind: 'MOBILE_ANY'} & Appointment.extension.patientHasMobileGfe === false VA Video Connect at a VA location, Appointment - telehealth field should have vvsKind field === 'CLINIC_BASED' or 'STORE_FORWARD' i.e telehealth: {vvsKind: 'CLINIC_BASED'}

Claim Exam - appt.serviceCategory === 'COMPENSATION & PENSION'; Phone appointment - appt.kind === 'phone'

ldelacosta commented 2 weeks ago

Hey @jperk51. We completed the spike ticket for the Appointment Type. Let us know if you have any questions. Thanks!

simiadebowale commented 1 week ago

@jperk51 - to support cerner appointments, we want to update the logic for requests to: if (appt.kind !== 'cc' && appt.requestedPeriods?.length && !appt.start) { // if kind is NOT cc and has requestPeriods present and has no start time return APPOINTMENT_TYPES.request; } this is because booked Cerner appointments will still have requestedPeriods. we are also open to adding a new cerner appointment type if necessary.