Skip to content

VED-837 Refactor get imms by identifier and search endpoints#988

Merged
Akol125 merged 10 commits intomasterfrom
feature/VED-837-refactor-search-imms-endpoint
Nov 24, 2025
Merged

VED-837 Refactor get imms by identifier and search endpoints#988
Akol125 merged 10 commits intomasterfrom
feature/VED-837-refactor-search-imms-endpoint

Conversation

@dlzhry2nhs
Copy link
Contributor

@dlzhry2nhs dlzhry2nhs commented Nov 14, 2025

Summary

  • Routine Change

See linked ticket VED-837 for full summary of what has been moved where. In brief:

  • search imms handler logic which decides which endpoint has been called is all moved into controller.
  • controller layer vastly simplified. Parameter parsing is done once rather than duplicated across different paths through the code. It then decides whether it is an identifier or patient + vacc type search and the performs the relevant validation.
  • service layer has taken some of the business logic from the controller e.g. preparation of the search bundle, adding the patient item, adding operationOutcome if relevant etc.
  • very minor refactoring and tidying up at the repository layer.

Additionally:

  • tried to use FHIR entities as far as possible at the business logic/service layer.
  • IMPORTANT - now only accept query params at the GET /Immunization endpoint and xxx-www-form-urlencoded body at the POST /Immunization/_search endpoint.
  • additionally, 2 minor adjustments to error messages/scenarios. These are summarised in the ticket.

Reviews Required

  • Dev

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
Contributor

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

VED-837

@staticmethod
def _vaccine_type(patientsk) -> str:
parsed = [str.strip(str.lower(s)) for s in patientsk.split("#")]
def _vaccine_type(patient_sk: str) -> str:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was previously unused code. I have resurrected it, and got rid of the .lower() -> not needed.

@sonarqubecloud
Copy link

@Akol125 Akol125 merged commit 26cd2d6 into master Nov 24, 2025
17 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.

3 participants