-
Notifications
You must be signed in to change notification settings - Fork 1
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
Replace cohorts with organisations directly #2783
Open
thomasleese
wants to merge
11
commits into
main
Choose a base branch
from
replace-cohort-with-organisation
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
thomasleese
force-pushed
the
cohort-year-group
branch
2 times, most recently
from
December 20, 2024 11:28
32e68cd
to
8396a23
Compare
thomasleese
force-pushed
the
replace-cohort-with-organisation
branch
from
December 20, 2024 11:28
08af78b
to
e9533b0
Compare
thomasleese
force-pushed
the
cohort-year-group
branch
from
December 20, 2024 14:35
8396a23
to
6d718c5
Compare
thomasleese
force-pushed
the
replace-cohort-with-organisation
branch
from
December 20, 2024 14:35
e9533b0
to
f76bbf6
Compare
thomasleese
force-pushed
the
cohort-year-group
branch
from
January 5, 2025 10:57
6d718c5
to
dc95a47
Compare
thomasleese
force-pushed
the
replace-cohort-with-organisation
branch
from
January 5, 2025 10:59
f76bbf6
to
e0ed571
Compare
thomasleese
force-pushed
the
cohort-year-group
branch
from
January 7, 2025 13:42
dc95a47
to
05106be
Compare
thomasleese
force-pushed
the
replace-cohort-with-organisation
branch
2 times, most recently
from
January 7, 2025 13:49
2b320bd
to
e8dfb1b
Compare
thomasleese
force-pushed
the
cohort-year-group
branch
from
January 8, 2025 11:29
05106be
to
9c7b948
Compare
thomasleese
force-pushed
the
replace-cohort-with-organisation
branch
from
January 8, 2025 11:30
e8dfb1b
to
e75047f
Compare
thomasleese
force-pushed
the
replace-cohort-with-organisation
branch
2 times, most recently
from
January 8, 2025 14:37
cd002d6
to
bc17344
Compare
thomasleese
added a commit
that referenced
this pull request
Jan 8, 2025
This fixes a few minor visual issues spotted by the testers when testing #2780 where if the date of birth is missing the same error will appear twice for each row, and similarly an issue where the year group wouldn't render correctly. This fixes are already in place for a future release (in #2783 and #2784), however including them now makes the testing easier and avoids needing to record additional defects.
thomasleese
added a commit
that referenced
this pull request
Jan 8, 2025
This fixes a few minor visual issues spotted by the testers when testing #2780 where if the date of birth is missing the same error will appear twice for each row, and similarly an issue where the year group wouldn't render correctly. This fixes are already in place for a future release (in #2783 and #2784), however including them now makes the testing easier and avoids needing to record additional defects.
thomasleese
added a commit
that referenced
this pull request
Jan 8, 2025
This fixes a few minor visual issues spotted by the testers when testing #2780 where if the date of birth is missing the same error will appear twice for each row, and similarly an issue where the year group wouldn't render correctly. This fixes are already in place for a future release (in #2783 and #2784), however including them now makes the testing easier and avoids needing to record additional defects. ## Screenshots ![{CFD5D2F8-A8E7-40F1-B323-45361B94AB3A}](https://github.com/user-attachments/assets/fa2a0a2b-9ad0-4913-a71f-ea48ae7c82cf) ![{9A759A33-DF06-4FCC-9F59-9B9C8FF22271}](https://github.com/user-attachments/assets/eef016c9-47ad-4b14-8ced-5e2dd8e19427)
thomasleese
force-pushed
the
replace-cohort-with-organisation
branch
2 times, most recently
from
January 10, 2025 11:45
91a9062
to
7b7939f
Compare
thomasleese
force-pushed
the
replace-cohort-with-organisation
branch
from
January 10, 2025 12:34
7b7939f
to
d5304a1
Compare
thomasleese
force-pushed
the
replace-cohort-with-organisation
branch
3 times, most recently
from
January 13, 2025 17:29
42701d1
to
500e67b
Compare
tvararu
approved these changes
Jan 14, 2025
This adds a new reference to the organisation on the patient model which adds a direct link between a patient and an organisation rather than going through the cohort which is going to be removed.
This updates everywhere that sets the cohort on the patient to also set the organisation so we can start to use this instead of the cohort.
This updates the patient policy to select children according to the organisation they belong to rather than the cohort as the cohort is going to be replaced with the organisation.
This updates the component to display the cohort from the organisation as the cohort is going to be removed.
This adds a convenience method which allows us to easily convert between a year group and a birth academic year.
This updates the cohorts page to not rely on the `Cohort` instances and instead go by the `year_group` on the patients.
This updates the school moves to no longer set the cohort on the patient as this is no longer used and instead we will rely on only the organisation.
This adds a scope on the patient model which allows us to filter on patients who are in the programme based on their year group.
This avoids eager loading any cohorts as we're going to stop using this column and it will be shortly removed.
This removes the cohort reference on patients, and removes any final bits of code that rely on the cohort reference.
thomasleese
force-pushed
the
replace-cohort-with-organisation
branch
from
January 14, 2025 17:22
500e67b
to
91c7d09
Compare
Quality Gate passedIssues Measures |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
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.
Following on from #2780 each patient now has a specific year group they belong to, so we don't need the cohort model which at the moment is just a duplicate of this information. Instead we can have a direct link between patients and organisations, simplifying quite a bit of the code related to cohorting.
See individual commits for more details, the business logic is the same before and after. This will allow us to remove the
Cohort
model entirely and simplify our database structure.