CDCgov / phdi

https://cdcgov.github.io/dibbs-site/
Creative Commons Zero v1.0 Universal
35 stars 14 forks source link

refactor select patient #2655

Closed fzhao99 closed 2 months ago

fzhao99 commented 2 months ago

PULL REQUEST

Summary

Builds out the patient select page by

Related Issue

Fixes #2585

Acceptance Criteria

This can likely be built off existing work on MultiplePatients /No Patients. Rather than only direct to that page with 2+ patients, we could direct to this page and have the select patient functionality.

https://www.figma.com/design/YU5hAHY1Eg7J6gtNbBxm7d/DIBBs-Site-Experiences?node-id=3576-41989&node-type=instance&m=dev

Additional Information

We haven't fixed the redirect yet since doing so would break query selection, so when a single result is returned, things still get redirected to the results view. You can get to the patient select page that this PR implements by

  1. Selecting the Chlamydia use case
  2. Deleting the first name that autofills and leaving the last name "JMC"
  3. Deleting the medical record number and the birth date
  4. Hitting search for patient

https://github.com/user-attachments/assets/2dd6df81-6a14-4957-a192-8a2c848cc759

You can similarly get to the "No records found" empty state by putting some gibberish in the first name field https://github.com/user-attachments/assets/719e6aee-c29a-4493-afae-da907c2a2881

mikang commented 2 months ago

two minor notes:

fzhao99 commented 2 months ago

two minor notes:

  • Where are switching from "View Record" to "Select Patient"?
  • Blue highlight looks good!

I think in the actions column on the "select a patient screen"

Screenshot 2024-10-03 at 10 15 27 AM
fzhao99 commented 2 months ago

@robertandremitchell ready for re-review!

https://github.com/user-attachments/assets/173a53d3-9505-45b0-9f6e-bd8a33869786

DanPaseltiner commented 2 months ago

two minor notes:

Nice catches @robertandremitchell! 🚀

DanPaseltiner commented 2 months ago

And ditto on the highlighting looking nice

mikang commented 2 months ago

Looks great, thank you!

Can we make the entire row clickable? Keep the link as an affordance, but make the entire row clickable to give a larger click target @fzhao99

fzhao99 commented 2 months ago

Looks great, thank you!

Can we make the entire row clickable? Keep the link as an affordance, but make the entire row clickable to give a larger click target @fzhao99

@mikang sure thing! I'll merge this and add that fix right after