-
Notifications
You must be signed in to change notification settings - Fork 23
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-2872: Fix inconsistent data when editing obsGroups in an encounter #125
Conversation
Hello @ibacher Please review this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @icrc-loliveira! I think this needs some small adjustments, but the basic idea looks right.
projects/ngx-formentry/src/form-entry/value-adapters/obs-adapter-helper.ts
Show resolved
Hide resolved
projects/ngx-formentry/src/form-entry/value-adapters/obs-adapter-helper.ts
Show resolved
Hide resolved
projects/ngx-formentry/src/form-entry/value-adapters/obs-adapter-helper.ts
Outdated
Show resolved
Hide resolved
projects/ngx-formentry/src/form-entry/value-adapters/obs-adapter-helper.ts
Outdated
Show resolved
Hide resolved
projects/ngx-formentry/src/form-entry/value-adapters/obs-adapter-helper.ts
Outdated
Show resolved
Hide resolved
projects/ngx-formentry/src/form-entry/value-adapters/obs-adapter-helper.ts
Outdated
Show resolved
Hide resolved
…er-helper.ts Co-authored-by: Ian <[email protected]>
…er-helper.ts Co-authored-by: Ian <[email protected]>
…er-helper.ts Co-authored-by: Ian <[email protected]>
Hi @ibacher, I believe the last requested changes are now addressed. Could you please review and confirm if everything is in order? |
Code looks good, but the tests are failing... |
Hello @ibacher, |
Issue: https://openmrs.atlassian.net/browse/O3-2872
Requirements
Summary
On the O3, while editing a question inside of an ObsGroup only the edited questions are saved, voiding the other questions inside of the same ObsGroup.
This happens because the request only sends the questions that have been changed and the core will void the existing ObsGroup with all the existing questions to create a new one with the questions that came from the request.
In addiction, if an ObsGroup is empty (with all questions voided) it will void the existing ObsGroup and create a new empty one, which doesn't make sense.
1 - Create a form with an ObsGroup
2 - Edit the
ObsGroup
and you will notice that only the edit concept is there.Request:
3 - Remove all ObsGroup questions and will notice that an ObsGroup has been saved but has no questions.
Request:
Screenshots
Related Issue
Other