Skip to content
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

Closed
wants to merge 5 commits into from

Conversation

arodidev
Copy link
Contributor

Requirements

  • This PR has a title that briefly describes the work done including the ticket number. If there is a ticket, make sure your PR title includes a conventional commit label. See existing PR titles for inspiration.
  • My work conforms to the OpenMRS 3.0 Styleguide and design documentation.
  • My work includes tests or is validated by existing tests.

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

@@ -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);
Copy link
Contributor Author

@arodidev arodidev Jul 18, 2024

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.

@ibacher
Copy link
Member

ibacher commented Jul 22, 2024

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).

@brandones
Copy link
Contributor

@ibacher We merged #1928 , does that mean we should close this out (and the ticket)?

@denniskigen
Copy link
Member

@arodidev should we close this per @ibacher's comment above?

@arodidev
Copy link
Contributor Author

arodidev commented Oct 9, 2024

Yes @denniskigen feel free to close this PR, thanks.

@denniskigen denniskigen closed this Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants