Skip to content

Conversation

tvararu
Copy link
Member

@tvararu tvararu commented Nov 18, 2024

This is a long lived branch/PR that contains work related to Release 1C. It will be periodically rebased from main. During the change freeze, new features should be PRed into this branch, not main.

@tvararu tvararu temporarily deployed to mavis-pr-2489 November 19, 2024 12:19 Inactive
@tvararu tvararu closed this Nov 19, 2024
@tvararu tvararu reopened this Nov 19, 2024
thomasleese and others added 7 commits November 28, 2024 10:58
I'm not sure having a separate controller provides us with any benefit
here, and combining this with the `ProgrammesController` allows us to
re-use the same before actions and keeps the views together in the same
directory.
This makes it possible to filter patients by their date of birth when
looking at the patients page for a particular programme.
This allows us to use the list of available states in places like the
patient filtering.
This allows nurses to filter patients more easily.
Aligns the design to the prototype.
This is unnecessary as we want to create the sessions well before an
organisation has any patients, as part of onboarding. This also helps us
in preparation for the removal of the `create_patient_sessions!` method
as we decouple school moves with session moves.
This adds a scope for getting patients that belong to a particular
organisation, so it can be used in multiple places.
Currently we only set this value if the parent indicates that the
child's school is different to current location, but I think the code
makes more sense if we set it all the time and then we don't need to
worry about checking the location or the school.
This consolidates the values of `school` and `home_educated` to use them
in a consistent way across the service. This means that there will be
three possible combinations of these values:

- school present and home_educated nil
- school nil and home_educated true
- school nil and home_educated false

I will add validation in a follow up commit to ensure this is always the
case.
This ensures that the combination of these two fields is one of three
kinds:

- school present and home_educated nil
- school nil and home_educated true
- school nil and home_educated false

I've also fixed a bug where a school move for a home-schooled patient
wouldn't update their home-schooled status, which would lead to them
staying in the community clinic when they should instead be added to the
school.
Following on from the previous commit this adds a migration which ensures
that the patients are all valid following the introduction of new
validation.
@tvararu tvararu temporarily deployed to mavis-pr-2489 November 28, 2024 17:54 Inactive
Copy link

@misaka misaka marked this pull request as ready for review November 29, 2024 12:42
Copy link
Contributor

@misaka misaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@misaka misaka merged commit 9cc4f32 into main Nov 29, 2024
12 checks passed
@misaka misaka deleted the release-1c branch November 29, 2024 12:45
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.

4 participants