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

[ERP-2589] [ERP-2651] Working Group Types and the Unallocated Working Group #713

Merged
merged 3 commits into from
Oct 25, 2024

Conversation

ppettitau
Copy link
Contributor

@ppettitau ppettitau commented Oct 22, 2024

Background context for these changes:
When new patients self register to the ARRK registry, they should be put into the Unallocated group. The problem is, if we configure an unallocated working group for ARRK (the only working group not tied to a working group type), it shows on the demographics form and is mandatory.

This change addresses this shortfall by:

  • Hiding the Working Group field if the only choice it contains is "Unallocated"
  • Automatically adding or removing the patient to the "Unallocated" group where it makes sense. Specifically, it will add them to Unallocated if, based on the current working group and working group types configuration, they would otherwise have no other working group choices. Once the patient has been allocated to other working group type groups, they will be removed from the "Unallocated" group.
  • This is intended to be seemless without requiring any manual intervention by the patient or clinician
  • If in the future, an addition Working Group that is not assigned to a Working Group Type is added, then this automatic behaviour will not be triggered.

* Hide the Working Group field if the only choice it contains is "Unallocated"
* If the working group field is disabled:
** Remove the patient's membership to the Unallocated working group if additional working groups (from types) have been selected
** Allocate the patient to the unallocated working group if they would otherwise have no other working group membership
@ppettitau ppettitau requested a review from ScriptSmith October 23, 2024 01:04
@ppettitau ppettitau added the ready Ready for review label Oct 23, 2024
* Refactor clean_working_groups in attempt to make it more clearer
* Update field config to allow a hidden field to be optional (to prevent save errors where existing data does not exist - and the user has no option to change it)
@ppettitau ppettitau changed the title [ERP-2589] Working Group Types and the Unallocated Working Group [ERP-2589] [ERP-2651] Working Group Types and the Unallocated Working Group Oct 24, 2024
@ppettitau ppettitau merged commit 4f854ff into next_release Oct 25, 2024
8 checks passed
@ppettitau ppettitau deleted the unallocated_working_group branch October 25, 2024 01:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants