(fix): FDE Forms should display in the O3 Refapp #115
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Requirements
Summary
This PR introduces minimal but essential support for triggering and completing a FormEngine submission within the Fast Data Entry (FDE) workflow. The changes revolve around the
SUBMIT_FOR_COMPLETE
action in the workflow reducer, enabling seamless coordination between the FDE and the FormEngine.🔁 What’s Changed
Trigger FormEngine submission:
Added
window.dispatchEvent(new CustomEvent('triger-form-engine-submit'))
to notify the FormEngine to start submission when the FDE reachesSUBMIT_FOR_COMPLETE
.Handle post-submission flow:
Listens for
form-submission-complete
and performs cleanup:✅ Why it matters
These changes allow FDE workflows to correctly hand over form submission responsibility to the FormEngine and respond to its success state. It ensures that the session is properly cleaned up only after the form has been successfully submitted.
Screenshots
Screancasts
https://www.loom.com/share/193799987e0848a0b20e0575a462a3de?sid=4162802f-4e39-4c1a-93e9-8e50a21651ae
Related Issue
Other
These are the related PRs;
React Form Engine: openmrs/openmrs-esm-form-engine-lib#550
Patient Chart: openmrs/openmrs-esm-patient-chart#2476