-
Notifications
You must be signed in to change notification settings - Fork 234
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
(feat) Add configurability to Recently Searched Patients feature #959
Conversation
b6b4d5a
to
3c456ab
Compare
Size Change: +83 kB (+3%) Total Size: 2.89 MB
ℹ️ View Unchanged
|
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.
LGTM
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.
Thanks @denniskigen . I'm not super familiar with this code, so only gave a quick review, but looks good, and your reasoning in the PR is sound as well, thanks!
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.
LGTM. Couple of nits.
packages/esm-patient-search-app/src/compact-patient-search/compact-patient-search.component.tsx
Outdated
Show resolved
Hide resolved
0324255
to
31cc083
Compare
Requirements
Summary
This PR makes the Recently Searched Patients feature configurable by toggling it on only when the
showRecentlySearchedPatients
config property is truthy (it defaults tofalse
). This is a precursor to future work aimed at improving the performance of the feature.Presently, looking up 10 recently searched patient records by default when the search box is launched is not ideal from a performance perspective. Making this behaviour configurable means users get the default, performant search experience out of the box, and then implementers can choose to opt into the Recently Searched Patients functionality.
I've also removed use of the lodash
debounce
function, leveraging theuseDebounce
hook instead for debounce functionality to theCompactPatientSearchComponent
component. I've also updated theopenmrs
and@openmrs/esm-framework
libraries to enable us to leverage some improvements to the configuration system.Here's a sample config schema that enables the feature:
Screenshots
configurable-recent-patient-search.mp4
Related Issue
None
Other
None