Skip to content

VED-1252: Site & Route - In case of multiple lists of valid system, it's storing only 1st list and ignores rest all lists in Imms Event table#1446

Merged
Thomas-Boyle merged 4 commits intomasterfrom
ved-1252-list-store-fix
May 1, 2026
Merged

VED-1252: Site & Route - In case of multiple lists of valid system, it's storing only 1st list and ignores rest all lists in Imms Event table#1446
Thomas-Boyle merged 4 commits intomasterfrom
ved-1252-list-store-fix

Conversation

@Thomas-Boyle
Copy link
Copy Markdown
Contributor

  • Updated _validate_immunization method to validate a deep copy of the immunization input, ensuring original data remains unchanged.
  • Enhanced test cases to validate against the modified structure, ensuring all SNOMED codings are persisted during creation and update of immunizations.

The service now normalizes a deep copy for validation, so it still selects the first valid SNOMED coding for validation/business rules, but the original submitted coding list is preserved and saved through create/update.

Updated tests cover the scenario with:

first coding using http://snomed.info/test
second and third codings using http://snomed.info/sct
all codings retained in the persisted Immunization resource

- Updated `_validate_immunization` method to validate a deep copy of the immunization input, ensuring original data remains unchanged.
- Enhanced test cases to validate against the modified structure, ensuring all SNOMED codings are persisted during creation and update of immunizations.
@github-actions
Copy link
Copy Markdown
Contributor

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

VED-1252

@Thomas-Boyle Thomas-Boyle changed the title Refactor FhirService validation to use deep copy of immunization data VED-1252: Site & Route - In case of multiple lists of valid system, it's storing only 1st list and ignores rest all lists in Imms Event table Apr 27, 2026
@Thomas-Boyle Thomas-Boyle temporarily deployed to internal-dev-sandbox April 27, 2026 10:07 — with GitHub Actions Inactive
@Thomas-Boyle Thomas-Boyle temporarily deployed to internal-dev-sandbox April 27, 2026 10:07 — with GitHub Actions Inactive
@Thomas-Boyle Thomas-Boyle temporarily deployed to internal-dev-sandbox April 27, 2026 10:08 — with GitHub Actions Inactive
…nization event table

- Introduced a new scenario in the create.feature file to validate that site and route codings are preserved in the imms event table when the first coding system is invalid.
- Implemented corresponding step definitions in test_create_steps.py to create a valid JSON payload with multiple SNOMED codings and validate the response against expected outcomes.
- Enhanced the test to ensure that the delta table uses the first valid SNOMED site and route coding and that all codings from the request are preserved in the imms event table.
@Thomas-Boyle Thomas-Boyle dismissed stale reviews from avshetty1980 and krupasindhubaral via c509af3 May 1, 2026 08:21
@Thomas-Boyle Thomas-Boyle enabled auto-merge (squash) May 1, 2026 08:21
@Thomas-Boyle Thomas-Boyle temporarily deployed to internal-dev-sandbox May 1, 2026 08:29 — with GitHub Actions Inactive
@Thomas-Boyle Thomas-Boyle temporarily deployed to internal-dev-sandbox May 1, 2026 08:30 — with GitHub Actions Inactive
@Thomas-Boyle Thomas-Boyle temporarily deployed to internal-dev-sandbox May 1, 2026 08:31 — with GitHub Actions Inactive
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 1, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix This PR contains a fix for existing functionality. python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants