Ved 1224 update MNS validation method to handle duplicate NHS numbers#1396
Open
Ved 1224 update MNS validation method to handle duplicate NHS numbers#1396
Conversation
…thod-to-handle-duplicate-NHS-numbers
Contributor
|
This branch is working on a ticket in the NHS England VED JIRA Project. Here's a handy link to the ticket: VED-1224 |
Thomas-Boyle
reviewed
Apr 9, 2026
tests/e2e_automation/features/batchTests/Steps/batch_common_steps.py
Outdated
Show resolved
Hide resolved
tests/e2e_automation/features/batchTests/Steps/batch_common_steps.py
Outdated
Show resolved
Hide resolved
…eps.py Co-authored-by: Thomas-Boyle <45789537+Thomas-Boyle@users.noreply.github.com>
…thod-to-handle-duplicate-NHS-numbers
Thomas-Boyle
approved these changes
Apr 9, 2026
krupasindhubaral
approved these changes
Apr 9, 2026
|
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.



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.