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
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
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.
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.
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.
PULL REQUEST
Summary
Breaks the query flow into the intended four step process by
SelectQuery
/ their own hooks file.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
Step 2 Patient Selection
Step 3 Query Selection
Step 4 Patient Record shouldn't have changed