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

Don't use not_invalidated scope #2716

Merged
merged 1 commit into from
Dec 13, 2024
Merged

Don't use not_invalidated scope #2716

merged 1 commit into from
Dec 13, 2024

Conversation

thomasleese
Copy link
Contributor

When determining the latest_triage for a patient session, and therefore the status of a patient session. With a scope it forces the query to re-run even if the triages were preloaded, whereas doing it in Ruby means we avoid an extra query to the database. Because there are unlikely to be lots of triages for a particular patient session, this should improve performance.

When determining the `latest_triage` for a patient session, and
therefore the status of a patient session. With a scope it forces the
query to re-run even if the triages were preloaded, whereas doing it in
Ruby means we avoid an extra query to the database. Because there are
unlikely to be lots of triages for a particular patient session, this
should improve performance.
@tvararu tvararu temporarily deployed to mavis-pr-2716 December 11, 2024 19:29 Inactive
@tvararu tvararu merged commit 6cb5b39 into main Dec 13, 2024
13 checks passed
@tvararu tvararu deleted the latest-triage-cache branch December 13, 2024 15:19
@tvararu tvararu added this to the v1.1.1 milestone Dec 17, 2024
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.

2 participants