Skip to content

[EHR] unable to deselect employer in occupational medicine#6228

Open
ValeriyDyachenko wants to merge 2 commits intodevelopfrom
vdyachenko/otr-1820-ehr-unable-to-deselect-employer-in-occupational-medicine
Open

[EHR] unable to deselect employer in occupational medicine#6228
ValeriyDyachenko wants to merge 2 commits intodevelopfrom
vdyachenko/otr-1820-ehr-unable-to-deselect-employer-in-occupational-medicine

Conversation

@ValeriyDyachenko
Copy link
Contributor

Enables clearing the "Employer - Occupational Medicine" field.

  1. Centralized removable fields logic - REMOVABLE_FIELDS constant and isRemovableField() helper control which fields support deletion. Easy to extend for other fields.

  2. Explicit clear token - Cleared fields send answer: [] (tracked via dirtyFields) to signal intentional deletion vs. empty field.

  3. Hidden field protection - filterHiddenRemovableFields() prevents accidental deletion when field is hidden by enableWhen conditions, not explicitly cleared by user.

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.

1 participant