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

FILTER: Filter By Date (Part 1 - Default selections) #2752

Open
10 tasks done
emmastephenson opened this issue Oct 10, 2024 · 7 comments · May be fixed by #3072
Open
10 tasks done

FILTER: Filter By Date (Part 1 - Default selections) #2752

emmastephenson opened this issue Oct 10, 2024 · 7 comments · May be fixed by #3072
Assignees
Labels
needs design review The PR for this issue will need design review before merging pairing Streamline eCR Issues for Streamline eCR team to work on

Comments

@emmastephenson
Copy link
Collaborator

emmastephenson commented Oct 10, 2024

User Story

As a user of the eCR Library, I want to filter by date, so that I can only see eCRs from within a given date range.

Example: I only want to see eCRs for the last week, so I can identify issues.

Acceptance Criteria

  • "Filter By Received Date" implemented for:
    • Last 24 hours
    • Last 7 days
    • Last 30 days
    • Last 3 months
    • Last 6 months
    • Last year
  • When user applies filter for any of the above, only eCRs received in that date range are included
  • My selection is shown as the button text (e.g. "Last 7 days")
  • By default, only eCRs from the last 24h are shown

Scenarios

Scenario 1

  • I click on the date filter button
  • A menu appears with selectable presets
  • I choose "Last 7 days"
  • I click "Apply Filter"
  • Only eCRs from the last week are shown

Design Notes

Link to Figma design in Dev mode
Link to Figma prototype

Screenshots below should not be used for working on this ticket - always refer to Figma design for most up-to-date designs:
Screenshot 2024-10-11 at 8.27.15 AM.png

Additional context

This ticket does NOT include implementing or showing the custom date filter - that is a separate ticket.

This ticket includes both the frontend design implementation and the backend querying needed for full functionality.

@emmastephenson emmastephenson added needs design review The PR for this issue will need design review before merging Streamline eCR Issues for Streamline eCR team to work on labels Oct 10, 2024
@emmastephenson emmastephenson changed the title Copy of FILTER: Frontend condition filtering FILTER: Filter By Date Oct 10, 2024
@emmastephenson emmastephenson changed the title FILTER: Filter By Date FILTER: Filter By Date (Part 1 - Default selections) Oct 11, 2024
@emmastephenson
Copy link
Collaborator Author

emmastephenson commented Nov 18, 2024

Notes from Planning:

  • "Last year" == today's date minus one year (whatever the JS default is - setFullYear)
  • May need a different default from dev mode (since last 24h is too fresh for our data)
  • "Received Date" is what we're filtering by here - NOT by "Encounter Date"

@angelathe
Copy link
Collaborator

@emmastephenson Would it be alright if I assigned myself to this, or at least added my current ticket "Filter by conditions" as a blocker? There's a lot of code overlap and it would probably save a lot of time if this got worked on after my other ticket is merged to main

@emmastephenson
Copy link
Collaborator Author

@angelathe yes please, adding your ticket as a blocker makes sense to me!

@angelathe angelathe assigned angelathe and unassigned angelathe Dec 3, 2024
@angelathe
Copy link
Collaborator

@emmastephenson Thinking ahead to the custom date range ticket, should there always be a start AND end date? Or is it possible a user could input only a start date filter or only an end date filter?

@angelathe
Copy link
Collaborator

@emmastephenson Also, I know the default is Last 24 hours, but would there ever be a case where we would want to see all eCRs (no date filter at all)? Or should there always be a date range included in the query?

@emmastephenson
Copy link
Collaborator Author

@angelathe For the custom date range, I'd want to double-check with @ashton-skylight but my guess is you do need both! But perhaps end date defaults to "today"? I just worry about setting the start date default to be "all time" or w/e, since that gets expensive very quickly.
As for the second one, I think we should always include a date range for now! Maybe later we'll add an "all time" filter option, but for now let's keep it simple.

@ashton-skylight
Copy link
Collaborator

Hello @angelathe @emmastephenson! Yes, if the user wants to see eCRs for all time, they can specify that in the custom date range, but for right now, we won't provide that as a filter.

@angelathe angelathe linked a pull request Dec 17, 2024 that will close this issue
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs design review The PR for this issue will need design review before merging pairing Streamline eCR Issues for Streamline eCR team to work on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants