Don't create unknown school move from cohort upload#6141
Merged
MartinVanIJcken merged 9 commits intonextfrom Mar 5, 2026
Merged
Don't create unknown school move from cohort upload#6141MartinVanIJcken merged 9 commits intonextfrom
MartinVanIJcken merged 9 commits intonextfrom
Conversation
6a53a94 to
5b821a9
Compare
5b821a9 to
7d255b3
Compare
MartinVanIJcken
previously requested changes
Mar 2, 2026
7d255b3 to
7cbd98a
Compare
7cbd98a to
867b2c2
Compare
…ol moves Prevents cohort imports from moving children to unknown schools when they're already registered at a known school in another team's area. These children should remain at their current school rather than being moved to an unknown school.
Displays a dedicated section for children who are skipped during import because they're already registered at a known school in another team's area. These children will not be moved to an unknown school.
This displays the skipped school moves on the import review screen and the completed import screen. This will not work if the import review screen flag is off, but given we want to remove the flag soon, and always have it on, that shouldn't be a problem.
These records should be skipped entirely from the import so no changes to the base patient are made from data that is very likely to be outdated (why we're skipping the school moves in the first place)
The team is delegated so we do not need to navigate to it ourselves through import. It is also not null so we do not need to check for presence. We need not explicitly check for empty current teams as [].include?(x) is always false. Jira-Issue: MAV-3920
…m?` through variable names Jira-Issue: MAV-3920
Jira-Issue:
When these changes were approved, they might have been presented as changes that would be processed. Now they may have moved from changes that will be skipped due to a change performed by the other team. In that case they should not be processed so the user is aware that their status has changed. Jira-Issue: MAV-3920
867b2c2 to
f8a681c
Compare
misaka
approved these changes
Mar 5, 2026
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
When new teams onboard and upload their cohorts, many of their patients already exist in Mavis at known schools in other teams' areas. If the uploading team's CHIS data is out of date, the import moves these children to "unknown school", generating large volumes of school moves that both the uploading team and existing teams have to review. This is causing significant noise — newly onboarding teams are seeing hundreds of school moves, and existing teams are being disrupted by moves they didn't initiate.
During a cohort import, if a child is already registered at a known school in another team's area, we don't move them to "unknown school". We skip those children from the import instead. On the import review screen, we show a summary line explaining how many children were skipped and why (e.g. "250 records not imported"). This summary remains visible on the completed import screen too, so teams can refer back to it.
https://nhsd-jira.digital.nhs.uk/browse/MAV-3920
Screenshots
Pre-release tasks
Post-release tasks