-
Notifications
You must be signed in to change notification settings - Fork 10
Reduce duplicate patient sessions #4526
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
Merged
Merged
Conversation
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
84e8012
to
40cb5d1
Compare
2f7404d
to
548419d
Compare
b6f8b77
to
d7db67d
Compare
548419d
to
a156c4e
Compare
d7db67d
to
b4d444e
Compare
79f1fb6
to
b1b02c5
Compare
b4d444e
to
7a8f5b2
Compare
e9f4b3c
to
03db68d
Compare
4222cb5
to
277f8b4
Compare
8c878a2
to
a24bb38
Compare
277f8b4
to
823515d
Compare
Base automatically changed from
registration-status-patient-session-foreign-key
to
next
September 9, 2025 14:37
a24bb38
to
33abc8f
Compare
c734b27
to
dce4f97
Compare
4073ae3
to
5228f8f
Compare
thomasleese
added a commit
that referenced
this pull request
Sep 16, 2025
This builds on top of the refactoring work done in #4526 which unlocked the ability for clinic sessions to work in a similar way to school sessions where there exists a session per group of programmes (HPV, Flu, and Doubles). This is more of a proof of concept for now, we don't know operationally whether teams are more likely to use clinics per programme, or clinics for all the programmes ("make every contact count").
Base automatically changed from
prepare-for-patient-session-replacement
to
next
September 16, 2025 09:16
5228f8f
to
ec2bfb9
Compare
thomasleese
added a commit
that referenced
this pull request
Sep 16, 2025
This builds on top of the refactoring work done in #4526 which unlocked the ability for clinic sessions to work in a similar way to school sessions where there exists a session per group of programmes (HPV, Flu, and Doubles). This is more of a proof of concept for now, we don't know operationally whether teams are more likely to use clinics per programme, or clinics for all the programmes ("make every contact count").
c440726
to
bf7a210
Compare
thomasleese
added a commit
that referenced
this pull request
Sep 16, 2025
This builds on top of the refactoring work done in #4526 which unlocked the ability for clinic sessions to work in a similar way to school sessions where there exists a session per group of programmes (HPV, Flu, and Doubles). This is more of a proof of concept for now, we don't know operationally whether teams are more likely to use clinics per programme, or clinics for all the programmes ("make every contact count").
jhenderson
reviewed
Sep 17, 2025
db/migrate/20250909145402_replace_patient_session_session_with_location.rb
Outdated
Show resolved
Hide resolved
jhenderson
approved these changes
Sep 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job. 👍
bf7a210
to
c008fdb
Compare
This renames the `PatientSession` model to `PatientLocation` in preparation for the next commit which will restructure the model to remove the association to the session and instead link to a location and an academic year. Jira-Issue: MAV-1822
This reworks the `PatientLocation` model to no longer have a direct association with a session and instead have a separate `location_id` and `academic_year`, which represents the equivelant information since that's all that is needed to get the sessions for the patient. Jira-Issue: MAV-1822
This simplifies the lookups for patients and sessions by removing the duplicate scopes between patient locations and patients, instead using the scopes on the patient only, and making sure to filter out patients who shouldn't belong in the session before we need to query for this. Jira-Issue: MAV-1822
c008fdb
to
a007392
Compare
|
thomasleese
added a commit
that referenced
this pull request
Sep 18, 2025
This builds on top of the refactoring work done in #4526 which unlocked the ability for clinic sessions to work in a similar way to school sessions where there exists a session per group of programmes (HPV, Flu, and Doubles). This is more of a proof of concept for now, we don't know operationally whether teams are more likely to use clinics per programme, or clinics for all the programmes ("make every contact count").
thomasleese
added a commit
that referenced
this pull request
Sep 18, 2025
This builds on top of the refactoring work done in #4526 which unlocked the ability for clinic sessions to work in a similar way to school sessions where there exists a session per group of programmes (HPV, Flu, and Doubles). This is more of a proof of concept for now, we don't know operationally whether teams are more likely to use clinics per programme, or clinics for all the programmes ("make every contact count").
thomasleese
added a commit
that referenced
this pull request
Sep 19, 2025
This builds on top of the refactoring work done in #4526 which unlocked the ability for clinic sessions to work in a similar way to school sessions where there exists a session per group of programmes (HPV, Flu, and Doubles). This is more of a proof of concept for now, we don't know operationally whether teams are more likely to use clinics per programme, or clinics for all the programmes ("make every contact count").
thomasleese
added a commit
that referenced
this pull request
Sep 19, 2025
This builds on top of the refactoring work done in #4526 which unlocked the ability for clinic sessions to work in a similar way to school sessions where there exists a session per group of programmes (HPV, Flu, and Doubles). This is more of a proof of concept for now, we don't know operationally whether teams are more likely to use clinics per programme, or clinics for all the programmes ("make every contact count").
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.
This reworks the
PatientLocation
model to no longer have a direct association with a session and instead have a separatelocation_id
andacademic_year
, which represents the equivalent information since that's all that is needed to get the sessions for the patient.Jira Issue - MAV-1822