Skip to content

Ved 1224 update MNS validation method to handle duplicate NHS numbers#1396

Open
FimranNHS wants to merge 5 commits intomasterfrom
VED-1224--update-method-to-handle-duplicate-NHS-numbers
Open

Ved 1224 update MNS validation method to handle duplicate NHS numbers#1396
FimranNHS wants to merge 5 commits intomasterfrom
VED-1224--update-method-to-handle-duplicate-NHS-numbers

Conversation

@FimranNHS
Copy link
Copy Markdown
Contributor

@FimranNHS FimranNHS commented Apr 9, 2026

Summary

This update enhances the MNS validation logic to correctly handle scenarios where the same NHS number appears multiple times within a batch file. Previously, the batch test failed because duplicate NHS numbers caused the dataframe lookup to overwrite earlier rows, keeping only the last record. Since each event has a unique IMMS_ID, the validator now iterates through all rows for a given NHS number and matches messages using both NHS number and IMMS_ID to identify the correct MNS event.

all functional test passed : https://github.com/NHSDigital/immunisation-fhir-api/actions/runs/24182442830/job/70578590562

Review Checklist

ℹ️ This section is to be filled in by the reviewer.

  • I have reviewed the changes in this PR and they fill all of the acceptance criteria of the ticket.
  • If there were infrastructure, operational, or build changes, I have made sure there is sufficient evidence that the changes will work.
  • If there were changes that are outside of the regular release processes e.g. account infrastructure to setup, manual setup for external API integrations, secrets to set, then I have checked that the developer has flagged this to the Tech Lead as release steps.
  • I have checked that no Personal Identifiable Data (PID) is logged as part of the changes.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 9, 2026

This branch is working on a ticket in the NHS England VED JIRA Project. Here's a handy link to the ticket:

VED-1224

FimranNHS and others added 3 commits April 9, 2026 13:35
…eps.py

Co-authored-by: Thomas-Boyle <45789537+Thomas-Boyle@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

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.

3 participants