-
Notifications
You must be signed in to change notification settings - Fork 227
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
(fix) O3-3546: Return the specific lab order being modified and not the entire list #1927
Conversation
@@ -67,6 +69,7 @@ function TestTypeSearchResults({ searchTerm, openOrderForm, focusAndClearSearchI | |||
const { t } = useTranslation(); | |||
const isTablet = useLayoutType() === 'tablet'; | |||
const { testTypes, isLoading, error } = useTestTypes(); | |||
const { orders, setOrders } = useOrderBasket<LabOrderBasketItem>('labs', prepLabOrderPostData); |
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.
Moved the useOrderBasket
hook from TestTypeSearchResults
to its parent, TestTypeSearch
. It didn't seem right to have it run for every iteration of the filteredTestTypes
considering it returns the same value for each.
My preferred solution for this problem is this, i.e., just take the user directly to the modify form. This is too aggressive because it removes the ability to add another order of a different type while modifying an order (which is a valid use-case for the order basket). |
Yes @denniskigen feel free to close this PR, thanks. |
Requirements
Summary
This PR introduces adds functionality that filters out test types from the lab order basket when modfying an order and only lists the test type relevant to the order being modified.
Screenshots
Screen.Recording.2024-07-18.at.06.58.40.mov
Related Issue
https://openmrs.atlassian.net/browse/O3-3546
Other