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 #17

Closed
wants to merge 10 commits into from

Conversation

fzhao99
Copy link
Collaborator

@fzhao99 fzhao99 commented Oct 15, 2024

PULL REQUEST

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

  • 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
    • Removed the backlink / some copy on the "No results" screen
    • 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 designs 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

@@ -75,7 +75,7 @@ export class CustomQuery {
: "";
this.medicationRequestQuery =
rxnormFilter !== ""
? `/MedicationRequest?subject=${patientId}&code=${rxnormFilter}&_include=MedicationRequest:medication&_include=MedicationRequest:medication.administration`
? `/MedicationRequest?subject=${patientId}&code=${rxnormFilter}&_include=MedicationRequest:medication&_include=MedicationRequest:intended-performer`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

For some reason, Public HAPI didn't like medication.administration as an includes param, which was breaking the inclusion of the medication requests for the patient. I did a bit of sparse googling and think this is the closest of the provided options below from the error message but if someone knows better lmk and I'm happy to change it.

Invalid _include parameter value: "MedicationRequest:medication.administration". Unknown search parameter "medication.administration" for resource type "MedicationRequest". Valid search parameters for this search are: [encounter, intended-dispenser, intended-performer, medication, patient, requester, subject]

@fzhao99 fzhao99 changed the title Bob/2663 query flow redirect break out customize query into intended four step process Oct 15, 2024
});
});

test("query/test page loads", async ({ page }) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Deleted these since we removed the test page flow as discussed here

@fzhao99 fzhao99 changed the title break out customize query into intended four step process align customize query flow to design Oct 15, 2024
@fzhao99 fzhao99 force-pushed the bob/2663-query-flow-redirect branch from ab92642 to dd038d1 Compare October 16, 2024 13:21
@@ -0,0 +1,81 @@
import { test, expect } from "@playwright/test";
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this whole page is just a copy-paste from the existing file to help parallelize the playwright runners

import { TEST_URL } from "../playwright-setup";
import { metadata } from "@/app/constants";

test("landing page loads", async ({ page }) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

this whole page is just a copy-paste from the existing file to help parallelize the playwright runners

@fzhao99
Copy link
Collaborator Author

fzhao99 commented Oct 16, 2024

closing in favor of #25

@fzhao99 fzhao99 closed this Oct 16, 2024
@fzhao99 fzhao99 deleted the bob/2663-query-flow-redirect branch October 18, 2024 13:34
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.

1 participant