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-3845: Editing a visit does not immediately update the displayed values #1970

Merged
merged 2 commits into from
Sep 3, 2024

Conversation

mccarthyaaron
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 attempt to solve an issue in the visits section of the patient chart.
When you edit a visit under the visits section of the patient chart, the details of the visit are not immediately updated. Yet when you reload the page the updated visit details will be displayed.
The visits displayed are obtained from the useInfiniteVisits hook yet when the form is successfully submitted, the mutate function from the hook is not called. This create a situation where the displayed data is stale and needs a reload of the page to re-fetch the upto date data.

The suggested solution in this PR is to call the mutate function of the useInfinteVisits hooks whenever the form is successfully submited under the different scenarios.

Screenshots

O3-3845.mp4

Related Issue

https://openmrs.atlassian.net/browse/O3-3845

Copy link
Member

@denniskigen denniskigen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks, @mccarthyaaron!

@denniskigen denniskigen merged commit 5e7a458 into openmrs:main Sep 3, 2024
6 checks passed
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.

2 participants