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

align customize query flow to design #25

Merged
merged 8 commits into from
Oct 17, 2024

Conversation

fzhao99
Copy link
Collaborator

@fzhao99 fzhao99 commented Oct 16, 2024

PULL REQUEST

Apologies for the large PR!

Summary

Breaks the query flow into the intended four step process by

  • Moving the customize query into a subflow of select-query, updating the mode type / constants as needed.
  • Lifting / pushing down query response and value states into the component steps where it's needed, hopefully to simplify which components know about which states
  • Moving the async fetch calls that used to be scattered around the flow into one place within SelectQuery / their own hooks file.
  • Update tests to reflect the new stepped flow / copy changes, including splitting the tests up into separate files to help them run a bit faster

Related Issue

After all the demo v0 pages are implemented independently, ensure that the pages link to one another according to the user flow that Michelle put together

Fixes #2663

Acceptance Criteria

For design

@mikang

  • Step 1 Patient discovery

    • Added "step 1" to the title
    • Color / spacing on the search form
    • Misaligned from design: the "Advanced" link isn't in Figma right now but we mentioned we needed to have that as a technical constraint. Treated it like another section of the form, but happy to change as needed.
  • Step 2 Patient Selection

    • Added "step 2" to the title
    • Added redirect to query selection
  • Step 3 Query Selection

    • Implemented the backlink to return to "Select patient"
    • Added a loading state since the result query flow takes quite a while.
    • Also ported over the toast message from previous implementation where we went back to Patient Discovery from customize query. Let me know if still want this.
      Screenshot 2024-10-15 at 3 55 17 PM
    • Noticed also for some of the use cases, the "apply changes" button that actually saves your selection is below the fold. Flagging since some users might do their selections and then hit "return", which won't actually save things.
      Screenshot 2024-10-15 at 3 55 45 PM
    • Noting that the "customize query" selection state will only maintain itself within the select query page despite what we talked about in Slack. Getting it to persist longer will be kinda complicated, so I didn't want it to block this work. Can have a followup ticket if we want to add that.
  • Step 4 Patient Record shouldn't have changed

    • The table widths in this page might need to be tweaked since there's horizontal scrolling on some default viewports

@fzhao99 fzhao99 changed the title Bob/2663 customize query alignment align customize query flow to design #17 Oct 16, 2024
@fzhao99 fzhao99 changed the title align customize query flow to design #17 align customize query flow to design Oct 16, 2024
@fzhao99 fzhao99 marked this pull request as ready for review October 16, 2024 14:55
Copy link
Collaborator

@robertandremitchell robertandremitchell left a comment

Choose a reason for hiding this comment

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

few minor quibbles, but looks great

Copy link
Collaborator

@robertandremitchell robertandremitchell left a comment

Choose a reason for hiding this comment

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

looks good. one minor thing we might want to consider:
when clicking Search for patient with zero fill-ins, it takes you to a page with a bunch of dummy data patients. We might want to disable the search for patient button unless some combination of name/MRN/phone/DOB are provided.

@fzhao99 fzhao99 force-pushed the bob/2663-customize-query-alignment branch from d03b4f4 to c742639 Compare October 16, 2024 18:32
Copy link
Collaborator

@m-goggins m-goggins left a comment

Choose a reason for hiding this comment

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

I haven't been as close to this work but it looks really nice 😎 and was working well when I ran the changes locally

Copy link
Collaborator

@bamader bamader left a comment

Choose a reason for hiding this comment

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

Looks great to me and works well locally! The medication.administration property is really annoying but I'm pretty tempted to open a follow up bug fix for it and let this PR land since it does so much to correctly align the workflow with designs.

query-connector/src/app/CustomQuery.ts Show resolved Hide resolved
@DanPaseltiner
Copy link
Collaborator

Noting that the "customize query" selection state will only maintain itself within the select query page despite what we talked about in Slack. Getting it to persist longer will be kinda complicated, so I didn't want it to block this work. Can have a followup ticket if we want to add that.

@fzhao99 persisting beyond the scope of the query at hand is beyond what we are hoping to do at this point. Next sprint we will begin tackling query building which will give users the ability to create and edit their queries not just the 6 we currently offer out of the box. Long way of saying you are totally right, but this limitation is fine for now.

@DanPaseltiner
Copy link
Collaborator

I think we need to change the copy here

image

As users will have already provided demographic data by this point. We could address in a separate ticket though.

@fzhao99 @mikang

@mikang
Copy link
Collaborator

mikang commented Oct 17, 2024

I think we need to change the copy here

image As users will have already provided demographic data by this point. We could address in a separate ticket though.

@fzhao99 @mikang

Good catch @DanPaseltiner

I think we can remove the supporting text and have just the bold text that says "Query customization successful." Thoughts?

@fzhao99 fzhao99 enabled auto-merge (squash) October 17, 2024 18:24
@fzhao99 fzhao99 merged commit eca03fb into main Oct 17, 2024
4 checks passed
@fzhao99 fzhao99 deleted the bob/2663-customize-query-alignment branch October 17, 2024 18:32
@mikang
Copy link
Collaborator

mikang commented Oct 17, 2024

Update for visibility — Bob and I paired live, so all good to go from the design side once those changes are made! Mainly spacing

@fzhao99 fzhao99 mentioned this pull request Oct 18, 2024
1 task
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.

6 participants