Skip to content

[PRMP-1588] Expedite journey prevent ingestion on incorrectly formatted ODS Codes#1181

Open
PedroSoaresNHS wants to merge 12 commits intomainfrom
PRMP-1588
Open

[PRMP-1588] Expedite journey prevent ingestion on incorrectly formatted ODS Codes#1181
PedroSoaresNHS wants to merge 12 commits intomainfrom
PRMP-1588

Conversation

@PedroSoaresNHS
Copy link
Contributor

Overview

Jira ticket: (https://nhsd-jira.digital.nhs.uk/browse/PRMP-1588)

Description

Add verification logic to prevent ingestion on incorrectly formatted ODS codes in expedite

Checklist

Tasks for all changes:

  • 1. I have linked this PR to its Jira ticket.
  • 2. I have run git pre-commits. (WIP)
  • 3. I have added and/or updated relevant tests.
  • 4. I have updated relevant documentation.
  • 5. I have considered the cross-team impact (and have PR approval from both Core & Demographics if necessary).
  • 6. I have successfully deployed this change to a sandbox and witnessed unit, e2e and smoke tests passing:

@PedroSoaresNHS PedroSoaresNHS marked this pull request as ready for review March 16, 2026 15:40
@PedroSoaresNHS PedroSoaresNHS requested review from a team as code owners March 16, 2026 15:40
SWhyteAnswer
SWhyteAnswer previously approved these changes Mar 19, 2026
"""Ensure the parent directory of the expedite file is a valid ODS code."""
ods_code = Path(s3_object_key).parent.name

if not re.fullmatch(r"^[A-Z]\d{5}$", ods_code):
Copy link
Contributor

@NogaNHS NogaNHS Mar 20, 2026

Choose a reason for hiding this comment

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

Can move this logic to utils, so this can be reused

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

NogaNHS
NogaNHS previously approved these changes Mar 20, 2026
@github-actions
Copy link

Code security issues found

View full details here.

@sonarqubecloud
Copy link

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.

4 participants