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) Revalidate visits after submitting the visit notes form #1701

Merged
merged 4 commits into from
Mar 4, 2024

Conversation

nanfuka
Copy link
Contributor

@nanfuka nanfuka commented Feb 28, 2024

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 pull request addresses an issue where the Visit Note was not appearing as saved if the user was on the Visits/Notes page when completing a visit note. The fix ensures that the Visit Note is displayed in both the visit summaries and all encounters.

Screenshots

latest.mp4

Related Issue

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

Other

@nanfuka nanfuka changed the title O3 1721 (Bugfix) O3 1721: The Visit Note does not appear saved if the user was on the Visits/Notes page at the time of completing a visit note Feb 28, 2024
Copy link
Contributor

@njiddasalifu njiddasalifu left a comment

Choose a reason for hiding this comment

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

Looks okay.

@@ -63,6 +64,45 @@ export function useVisitNotes(patientUuid: string): UseVisitNotes {
};
}

export function useInfiniteVisits(patientUuid: string) {
Copy link
Member

Choose a reason for hiding this comment

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

@vasharma05, @ibacher, @brandones should this hook move to Common Lib instead? It's a copy of what exists in the Patient Chart here.

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems reasonable. It has a simple API and what it does is fairly complex; and it will be good to ensure that the cache gets hit correctly.

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.

Thanks, @nanfuka!

@denniskigen denniskigen changed the title (Bugfix) O3 1721: The Visit Note does not appear saved if the user was on the Visits/Notes page at the time of completing a visit note (fix) Revalidate visits after submitting the visit notes form Mar 4, 2024
@denniskigen denniskigen merged commit d5eae7a into openmrs:main Mar 4, 2024
6 checks passed
usamaidrsk pushed a commit to usamaidrsk/openmrs-esm-patient-chart that referenced this pull request Mar 11, 2024
…s#1701)

* Mutate visits when visit note is saved

* Fix tests

* Fix tests

* Edit tests
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