Skip to content

Conversation

@stephhou
Copy link
Contributor

@stephhou stephhou commented Nov 17, 2025

Description

https://nhsd-jira.digital.nhs.uk/browse/DTOSS-11459

When a call is made to the RetrieveBSCohortDistribution API it will try to retrieve and return records that do not have a superseded by number.

If there are no records to return without a superseded by number, it retrieves records with a superseded by number. For each record it checks if an entry exists where the superseded by number is the NHS number, if an entry exists the record is added the batch to be returned via API.

Context

This change is required because currently Cohort Manager sends records to BS Select in the order they are processed. Cohort Manager can process a record with a superseded by NHS number before a record has been created with the details of the superseded by NHS Number as the NHS Numbver This causes an error in the BS Select system as they are unable to handle the supersession without the new record to transfer history to.

Type of changes

  • Refactoring (non-breaking change)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would change existing functionality)
  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • I am familiar with the contributing guidelines
  • I have followed the code style of the project
  • I have added tests to cover my changes
  • I have updated the documentation accordingly
  • This PR is a result of pair or mob programming

Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.

  • I confirm that neither PII/PID nor sensitive data are included in this PR and the codebase changes.

@github-actions
Copy link

github-actions bot commented Nov 17, 2025

Unit Test Results

✔️ Tests 890 / 890 - passed in 70.3s
📝 Coverage 47%
📏 4573 / 9970 lines covered 🌿 1106 / 2114 branches covered
🔍 click here for more details

✏️ updated for commit dea91ef

@stephhou stephhou marked this pull request as ready for review December 2, 2025 06:48
@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 3, 2025

Copy link
Contributor

@SamAinsworth-NHS SamAinsworth-NHS left a comment

Choose a reason for hiding this comment

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

Approved

@stephhou stephhou added this pull request to the merge queue Dec 12, 2025
Merged via the queue into main with commit 525f476 Dec 12, 2025
67 checks passed
@stephhou stephhou deleted the fix/DTOSS-11459-supserseded-nhs-number-adds branch December 12, 2025 09:46
@stephhou stephhou added the Deployment 1.0.4 All PRs assigned for deployment 1.0.4 - planned for 18/12/2025 label Dec 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Deployment 1.0.4 All PRs assigned for deployment 1.0.4 - planned for 18/12/2025

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants