You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This introduces a new model, `PatientSession::RegistrationStatus`, which
stores the vaccination status of a patient-session date pair in the
database so it can queried and rendered quickly. Locally, I'm seeing the
register outcomes page on programmes with 50,000 patients load almost
instantly even when filtering on statuses. The session overview page has
a slight improvement, but that will only load quickly once the other
statuses are cached.
I've decided not to implement a state machine as had been previously
discussed, but this could be built on top of this change to enhancement
the functionality. For now, this effectively caches the existing logic
that runs on the fly to the database.
I've also decided not to implement this using Rails callbacks and
instead be explicit where the status is refreshed. This allows us to
optimise for bulk refreshes, as is necessary when adding new programmes
to sessions, running the seeds, or generally updating the status of an
entire session.
This follows up from
#3273 which
applies the same to the session status.
0 commit comments