-
Notifications
You must be signed in to change notification settings - Fork 1
[NDH-478] Practitioner Search Page and Sort Capabilities #297
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
base: main
Are you sure you want to change the base?
Conversation
be078b1 to
88ad429
Compare
* fixed bugs with both pages * [NDH-483] Adding Basic Sort Functionality (#304) * added sort functionality * added practitioner sort support * added sort to all practitioners/organizations page * added sorting tests * fixed spacing * quick test backend tests are failing on my local and im wondering if its doing the same on remote
spopelka-dsac
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking great! One thing I notice off the bat, is that the default API sorting is "Last Name (A-Z)", but the default sort label is "First Name (A-Z)" (screenshot below). Can you update that please? We should have a corresponding test for that. Speaking of tests... it's great to have Playwright tests, but we also need unit tests for the OrganizationSearch and PractitionerSearch pages, to ensure that the components render as expected, given the supplied props
…spelling mistake, added translations
spopelka-dsac
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| </div> | ||
| <div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}> | ||
| {t("organizations.sort.by")} | ||
| <Dropdown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A note for a future PR (not a blocker for this PR) we'd want to create a sort component, so that the drop down and logic aren't repeated across multiple pages
|
|
||
| return ( | ||
| <> | ||
| <TitlePanel |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General comment (but not a blocker for this PR), it would be cool to make this whole search bar its own component, so you don't have to repeat the rendering and logic across the organization and practitioner pages
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should ticketify this for a low prio item
| return ( | ||
| <SearchProvider | ||
| useSearchAPI={usePractitionersAPI} | ||
| defaultSort="first-name-asc" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might not have been clear in my prior comment; it would be great to stick with the default API sort as the default sort here, the label should just be set to last-name-asc accordingly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (params.query) { | ||
| const query = params.query | ||
| const key = detectQueryKey(query) | ||
| url.searchParams.set(key, query) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we're changing the test of the search to read "Name or NPI", then we should append NPI| to the query here if the key is "identifier"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call out!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'd also want a corresponding test to ensure that only records with the specified NPI and not records that have that value as an other identifier are returned when that value is supplied to the search
|
the screenshot you sent is not to be expected but a quick workaround is to change the featureflag perms. i am getting that same bug. i think something got messed up with the user creation maybe? @spopelka-dsac |


Important
This is the base PR that includes 2 other PRs that were merged into this one.
Practitioner Search Page
Jira Ticket #478
Problem
We aren't able to search for Practitioners currently through the frontend or sort through results
Solution
Implement a separate search page similar to Organizations to handle the search of Practitioners and add sort capabilities via api queries
Result
Using the same patterns in the Organization search, we created a Practitioner search that serves as an MVP and both Practitioner and Organizations are sortable
Practitioners
Organizations
Test Plan
make up