Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

101426 update AppointmentsController#fetch_drive_times #20510

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

PhilipDeFraties
Copy link

@PhilipDeFraties PhilipDeFraties commented Jan 28, 2025

Summary

  • *This work is behind a feature toggle (flipper): NO
  • updates AppointmentsController#fetch_drive_times method to utilize lat/long from user's vet360 data
  • previous implementation assumed the user's residential lat/long would be available from their address attribute, but that data is obtained from the MPI service and does not include lat/long. Instead we can obtain the lat/long from the user's vet360_contact_info data if available.

Related issue(s)

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

Testing done

  • New code is covered by unit tests

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

Requested Feedback

As per John W, return an empty string if the user's lat/long are not available.

@@ -380,6 +380,10 @@ def fetch_provider_slots
end

def fetch_drive_times(provider)
user_address = current_user.vet360_contact_info&.residential_address

return '' unless user_address&.latitude && user_address.longitude
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good. I'm curious how this will get serialized and show up in the response to front-end...should we add a request spec for it, if one doesn't exist already?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, the specs might be a part of department-of-veterans-affairs/va.gov-team#101428 that @devin-mccurdy is working on. if that's the case, this looks good

@@ -380,6 +380,10 @@ def fetch_provider_slots
end

def fetch_drive_times(provider)
user_address = current_user.vet360_contact_info&.residential_address

return '' unless user_address&.latitude && user_address.longitude
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, the specs might be a part of department-of-veterans-affairs/va.gov-team#101428 that @devin-mccurdy is working on. if that's the case, this looks good

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants