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

[MHV-55400]: medications shipped tracking #28827

Merged
merged 13 commits into from
Apr 3, 2024

Conversation

dcloud
Copy link
Contributor

@dcloud dcloud commented Mar 27, 2024

Summary

As someone who receives my prescription refills by mail, I want to see when those medications were shipped.

  • Add "Last refill shipped on " to /my-health/medications/refill, with a truck icon
  • Add unit test

Related issue(s)

Related PR

Testing done

  • Before: no "Last refill shipped on" appeared under the "...isn’t ready to refill"
  • After: "Last refill shipped on" appears for items shipped in last few weeks
  • Mocked data and viewed page
  • Wrote unit test

Screenshots

Note: This field is mandatory for UI changes (non-component work should NOT have screenshots).

Before After
Mobile Screen Shot 2024-03-27 at 14 37 12 Screen Shot 2024-03-27 at 14 33 57
Desktop Screen Shot 2024-03-27 at 14 37 21 Screen Shot 2024-03-27 at 14 33 35

What areas of the site does it impact?

MHV Medications

Acceptance criteria

Quality Assurance & Testing

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Linting warnings have been addressed
  • Documentation has been updated (link to documentation *if necessary)
  • Screenshot of the developed feature is added
  • Accessibility testing has been performed

Error Handling

  • Browser console contains no warnings or errors.
  • Events are being sent to the appropriate logging solution
  • Feature/bug has a monitor built into Datadog or Grafana (if applicable)

Authentication

  • Did you login to a local build and verify all authenticated routes work as expected with a test user

Requested Feedback

(OPTIONAL) What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?

@va-vfs-bot va-vfs-bot temporarily deployed to master/MHV-55400/medications-shipped-tracking/main March 27, 2024 18:47 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/MHV-55400/medications-shipped-tracking/main March 27, 2024 22:02 Inactive
added e2e test for shipped Rx on Refill Page
@va-vfs-bot va-vfs-bot temporarily deployed to master/MHV-55400/medications-shipped-tracking/main March 27, 2024 22:26 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/MHV-55400/medications-shipped-tracking/main March 28, 2024 16:12 Inactive
@dcloud dcloud marked this pull request as ready for review March 28, 2024 16:31
@dcloud dcloud requested a review from a team as a code owner March 28, 2024 16:31
Copy link

@va-vfs-bot va-vfs-bot left a comment

Choose a reason for hiding this comment

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

Icon found

Icons can be decorative, but sometimes they are used to convey meaning. If there are any semantics associated with an icon, those semantics should also be conveyed to a screen reader.

What you can do

Review the markup and see if the icon provides information that isn't represented textually, or wait for a VSP review.

<>
<br />
<span data-testid={`medications-last-shipped-${idx}`}>
<i className="fas fa-truck vads-u-margin-right--1p5" />

Choose a reason for hiding this comment

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

icon found

@@ -166,7 +166,7 @@ const VaPrescription = prescription => {
className="vads-u-margin--0 vads-u-margin-bottom--1"
data-testid="shipped-on"
>
{dateFormat(shippedOn?.[i]?.completeDateTime)}
{dateFormat(latestTrackingStatus?.completeDateTime)}
Copy link
Contributor

Choose a reason for hiding this comment

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

are we supposed to be using the index here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The code change on line 25, const latestTrackingStatus = prescription?.trackingList?.[0]; pulls an object, the first item out of the trackingList array.

We updated the vets-api serialization to remove the unnecessary levels of nesting, so the API will serve a 1-level array.

"refillRemaining": 1,
"facilityName": "SLC10 TEST LAB",
"orderedDate": "2023-08-27T04:00:00.000Z",
"quantity": 1,
"expirationDate": "2024-08-27T04:00:00.000Z",
"dispensedDate": "2023-08-29T04:00:00.000Z",
"dispensedDate": "September 24, 2023",
"stationNumber": "979",
Copy link
Contributor

Choose a reason for hiding this comment

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

what was the reason for the format change?

Copy link
Contributor

Choose a reason for hiding this comment

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

Time does not show in the UI and I used a fixture file that has tracking info for the refill history.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do we actually expect the API to return a date in that format? I'd expect a a consistent format from the backend APIs...

Copy link
Contributor

Choose a reason for hiding this comment

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

Made the suggested changes and pushed the updated one.

agravell047
agravell047 previously approved these changes Mar 28, 2024
updated the date format and assertion
@dcloud dcloud requested a review from a team as a code owner March 28, 2024 19:39
@va-vfs-bot va-vfs-bot temporarily deployed to master/MHV-55400/medications-shipped-tracking/main March 28, 2024 20:07 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/MHV-55400/medications-shipped-tracking/main March 29, 2024 15:20 Inactive
assertion fixes for shipped and dispensed information on UI
@va-vfs-bot va-vfs-bot temporarily deployed to master/MHV-55400/medications-shipped-tracking/main April 1, 2024 14:12 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to master/MHV-55400/medications-shipped-tracking/main April 1, 2024 17:41 Inactive
@dcloud dcloud merged commit 56cc362 into main Apr 3, 2024
82 of 83 checks passed
@dcloud dcloud deleted the MHV-55400/medications-shipped-tracking branch April 3, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants