Skip to content

Conversation

thomasleese
Copy link
Contributor

No description provided.

paulrobertlloyd and others added 30 commits September 4, 2025 09:18
This adds a column to display `source` in the table of vaccination records at the bottom of the patient overview page.

It also adds a row to the vaccination record view page
Renamed to use more standard names. Also make naming more generic for better use in future tests
This makes the API call to read a vaccination record in the API. It returns a `FHIR::Immunization` object
This makes the API call to read a vaccination record in the API by passing in an API ID string. It returns a `FHIR::Immunization` object.

This is useful because it will allow operational tasks to discover records in the API which don't have a corresponding `VaccinationRecord` object in Mavis
…nhs_immunisations_api_id`

This reduces code duplication a lot, while maintaining the same functionality.

The only downside with this is that the error and log messages will be slightly different ("reading by ID" vs "reading record #{ID}"). Given that we only expect these functions to be run by operational staff, this doesn't seem like too much of a problem.
This is a feature which will `read` a vaccination record in the Imms API, and either print out the resulting JSON, or save it to a file.

It is possible to either search for an existing `VaccinationRecord` by ID, or by an Imms API ID
To make its purpose clearer.

Also changed the postcode to end 3WZ. The previous one ending 3CZ
is meant to be used where you know the person lives in England.

Mavis patients almost certainly do, but we cannot know for sure.

See:
https://www.england.nhs.uk/long-read/cam-flow-chart-2025-26-accompanying-guidance/
If an email ends with a dot this is considered to be invalid and Notify
will refuse to send the email, resulting in an unactionable
`BadRequestError`.

This improves our validation to ensure these emails don't make it in to
the service in the first place. Currently in production there are 305
parents with an email address that will never send.

Jira-Issue: MAV-1961
In the previous commit validation was added to ensure emails don't have
trailing dots. This adds a Rake task which migrated the parents with
invalid email addresses.

Jira-Issue: MAV-1961
Once a patient has been vaccinated, their list of approved vaccine
methods is empty (they're not approved for any vaccines because they're
already vaccinated), therefore we were always showing a message saying
that the vaccine method recorded is not an approved vaccine method for
this patient.

It looks like this broken when we introduced a new consent status of not
required (5eac3c4) although before that
it would also have been showing if the approved method originally came
from triage.

Jira-Issue: MAV-1831
The `SearchVaccinationRecordsInNHSJob` job is in charge of making sure that the vaccination records in Mavis match those in the Imms API.
This renames the model to `AttendanceRecord` to remove the naming of
session as the association is going to be removed and replaced instead
with a separate location and date column.

Jira-Issue: MAV-1938
It's specific to the session so we need to move it out of this model so
it can be used when we no longer have an explicit link to the session.

Jira-Issue: MAV-1938
This replaces the session association with one to the location instead,
as we want registration status to apply across all sessions for a
particular location, in preparation for the removal of the
`PatientSession` model.

Jira-Issue: MAV-1938
Add sticky navigation component
Add digest to manifest path to enable long-lived caching
Send pseudo-postcode to Imms API when patient postcode nil
Remove session association from `AttendanceRecord`
Ensure incorrect vaccine given message isn't shown
…-in-ui

Add `source` to vaccination record UI
Call `StatusUpdater` after Imms API search
Hide discontinued vaccines from summary table
This removes code which is duplicated in the
`import_child_pds_lookup_extravaganza_spec`.
This fixes the test by using `travel 1.minute` to ensure that we're
always clicking on the most recent import (currently the test creates
two imports at the same time which results in them having the same link
text).
This simplifies some code related to generating links to emails, instead
of using `link_to` and linking to `mailto:` href, we can instead use the
`mail_to` helper.
There was a bug where `full_dose` was always true, even when it shouldn't have been.

This fixes the `full_dose_from_fhir` function as well as `dose_volume_ml_from_fhir`.
…or-admins

Hide vaccination tallies table for admins
This ensures that when merging two patients together, if the one to be
destroyed has a PSD, this is moved across to the other patient rather
than preventing the merge from happening due to a foreign key
constraint.
…ch_in_nhs_job

Disable enqueue_vaccinations_search_in_nhs_job until the implementation is fixed
Copy link

@thomasleese thomasleese merged commit a478d8f into main Sep 16, 2025
66 of 69 checks passed
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.