Explore vaccination schedule designs#266
Draft
wrightmartin wants to merge 4 commits into
Draft
Conversation
Phase 1 of the rebase: brings in the vaccination record UI, dose-schedule classifier, canonical/duplicate vaccination data model, and the new DOB-in-header on patient pages. Patient-programme model touch-ups (scheduleSummary, canonicalVaccinationOutcomes) land in phase 2.
Adds canonicalVaccinationOutcomes and scheduleSummary getters on PatientProgramme, switches dosesRemaining to use the schedule summary so ignored MMR doses no longer count, and corrects lastPatientSession to pick the most recent session (patientSessions is sorted DESC). PatientSession.vaccinationOutcomes now filters by patientSession_uuid as well as programme_id so a session does not surface vaccinations recorded at a different session.
Rebuilds the Y9/Y10 MMR catch-up scenario on top of the refactored upstream create-data. Adds seven seeded patients (Alice through Gareth) that exercise the schedule classifier across valid, out-of-schedule and duplicate dose cases, ties them to a co-located MMR + Doubles session at Grace Academy, and seeds Bilal historical Y8 HPV and Y9 Doubles refusals plus oncology-history health-answer detail. Dmitri carries an AlreadyVaccinated refusal on MMR; the rest get positive consent so the cohort can be walked through end-to-end in user research. Spec: mmr-test-scenarios.md.
A patient whose programme status is Vaccinated via historical doses would throw when viewing the current session page, because lastVaccinationOutcome filters by session uuid and returned undefined. Fall back to patientProgramme.lastVaccinationGiven and guard against a missing createdBy user.
6cabb3a to
18f063b
Compare
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.
Introduces a Vaccination record view on the patient programme page that shows a child's progress through the MMR schedule, distinguishing doses that count toward the schedule from doses that don't (e.g. given too early, or too close to a previous dose).
For testing