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) Allow edit O2 form in visits widget #1489

Merged
merged 11 commits into from
Dec 4, 2023

Conversation

icrc-jofrancisco
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 pull request addresses an issue where clicking "Edit this Encounter" always opened a new form instead of allowing users to edit the existing O2 form within the visits widget. The modification ensures a more intuitive and efficient workflow by enabling the direct editing of O2 forms.

Screenshots

image

Related Issue

Other

Thanks,
CC: @ibacher

@icrc-jofrancisco icrc-jofrancisco changed the title Allow edit O2 form in visits widget (fix) Allow edit O2 form in visits widget Nov 21, 2023
Copy link
Member

@ibacher ibacher left a comment

Choose a reason for hiding this comment

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

So, I think the PR is fine. However, I don't love having lauchFormEntryOrHtmlForms() defined in two places. I think the thing to do is to move that function from esm-forms-app into the patient-common-lib and then re-use the same function here with a small adapter for handling the MappedEncounter.

The logic for the editPage should look a lot like the logic for the new form page, so we might need to modify some other places. I'd expect it to be populated as ${htmlForm.formEditUiPage} or something similar. This is because HFE itself supports multiple different edit pages depending on the use-case.

@ibacher ibacher merged commit a8bcf2b into openmrs:main Dec 4, 2023
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
2 participants