-
Notifications
You must be signed in to change notification settings - Fork 71
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
(feat) Add ability to track deleted fields in repeat component #455
Conversation
Thanks for working on this @CynthiaKamau! I think the remaining part is updating the encounter processor to void any deleted openmrs objects (I think merging the export function prepareEncounter(
context: FormContextProps,
encounterDate: Date,
encounterRole: string,
encounterProvider: string,
location: string,
) {
const { patient, formJson, domainObjectValue: encounter, formFields, deletedFields, visit } = context;
const allFormFields = [...formFields, ...deletedFields];
const obsForSubmission = [];
prepareObs(obsForSubmission, allFormFields); Alternatively, you can explicitly handle the deleted fields for every datatype ie. obs, orders, diagnosis etc. |
I think handling deleted fields for every field is easier, since most transformers are already handling that |
19e4932
to
43a6257
Compare
Size Change: +120 B (+0.01%) Total Size: 1.27 MB ℹ️ View Unchanged
|
@CynthiaKamau will that associate the voided OMRS object say, an obs with the encounter so that it gets posted to the backend on submission? |
43a6257
to
1795024
Compare
Actually no, i will append the deleted fields to the rest of the fields and handle the voided while preparing the fields that need to use anything that may be deleted, for now its only diagnosis |
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.
LGTM
Requirements
Summary
Add ability to track deleted fields in repeat component, this is helpful in instances where the fields need to be voided. currently, the removed fields are not part of the context.
Screenshots
Related Issue
Other