Skip to content

feat: DTOSS-12464 & DTOSS-12468 dummy gp rules#1876

Open
MWClayson-NHS wants to merge 6 commits intomainfrom
feat/dummy-gp-rules
Open

feat: DTOSS-12464 & DTOSS-12468 dummy gp rules#1876
MWClayson-NHS wants to merge 6 commits intomainfrom
feat/dummy-gp-rules

Conversation

@MWClayson-NHS
Copy link
Copy Markdown
Contributor

Description

  • Extending data models sent to Validation Functions to include ReasonForAdding
  • Add CheckIfPrimaryCareProviderExists to TransfromDataLookupFacade - needed for rule 72
  • Add 2 new Transfrom Rules to handle dummy GP code removal
  • Prevent manual add rules from running on dummy GP code removal
  • Add static Rule 70 - Prevents un recognised GPs from being adding in the absence of Current Posting
  • Edit rule 45 to not run when Dummy GP Removal is the reason for adding

Context

DTOSS-12467
DTOSS-12468

Design Doc

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.

@MWClayson-NHS MWClayson-NHS requested a review from Copilot March 31, 2026 13:50
@MWClayson-NHS MWClayson-NHS changed the title feat: [DT] dummy gp rules feat: DTOSS-12464 & DTOSS-12468 dummy gp rules Mar 31, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 31, 2026

Unit Test Results

✔️ Tests 1031 / 1031 - passed in 74.1s
📝 Coverage 47.36%
📏 4829 / 10508 lines covered 🌿 1194 / 2210 branches covered
🔍 click here for more details

✏️ updated for commit 5cf85ba

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR extends the validation/transformation pipeline to propagate ReasonForAdding through request models and uses it to support “Dummy GP code removal” behavior, including new transform and lookup-validation rules and adjustments to when “manual add” rule sets run.

Changes:

  • Add ReasonForAdding to request/record models passed through validation + transform services.
  • Add new RulesEngine workflows/rules for dummy GP code removal (transform + lookup validation) and adjust manual-add execution conditions.
  • Add CheckIfPrimaryCareProviderExists to the transform data lookup facade and expand unit tests for the new scenarios.

Reviewed changes

Copilot reviewed 15 out of 16 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/UnitTests/TransformDataServiceTests/TransformDataServiceTests/TransformDataServiceTests.cs Adds unit tests covering dummy GP code removal transform behaviors and updates existing tests to set ReasonForAdding.
tests/UnitTests/ScreeningValidationServiceTests/LookupValidation/LookupValidationTests.cs Adds lookup validation unit tests for dummy GP code removal scenarios and updates manual-add test input.
application/CohortManager/src/Functions/Shared/Model/ParticipantCsvRecord.cs Adds nullable ReasonForAdding to the CSV record model used by validation.
application/CohortManager/src/Functions/Shared/Common/TransformDataRequestBody.cs Extends transform request body to include nullable ReasonForAdding.
application/CohortManager/src/Functions/Shared/Common/LookupValidationRequestBody.cs Extends lookup validation request body to include nullable ReasonForAdding.
application/CohortManager/src/Functions/ScreeningValidationService/StaticValidation/StaticValidation.cs Passes reasonForAdding into RulesEngine parameters and skips manual-add rules for dummy GP removal.
application/CohortManager/src/Functions/ScreeningValidationService/StaticValidation/Breast_Screening_staticRules.json Minor formatting adjustments in static rules JSON.
application/CohortManager/src/Functions/ScreeningValidationService/LookupValidation/LookupValidation.cs Adds ReasonForAdding to RulesEngine types/parameters and adjusts manual-add workflow execution conditions.
application/CohortManager/src/Functions/ScreeningValidationService/LookupValidation/Breast_Screening_lookupRules.json Adds global param for dummy GP removal and introduces Rule 70 for invalid GP handling during dummy GP removal.
application/CohortManager/src/Functions/CohortDistributionServices/TransformDataService/transformRules.json Adds a new DummyGpRemoval workflow with rules 71–72 to set ReasonForRemoval to ORR and update effective dates.
application/CohortManager/src/Functions/CohortDistributionServices/TransformDataService/TransformDataService.cs Threads ReasonForAdding into participant transform execution and runs the new dummy GP removal workflow.
application/CohortManager/src/Functions/CohortDistributionServices/TransformDataService/TransformDataLookupFacade.cs Adds CheckIfPrimaryCareProviderExists used by new dummy GP removal logic.
application/CohortManager/src/Functions/CohortDistributionServices/TransformDataService/ITransformDataLookupFacade.cs Adds interface member for CheckIfPrimaryCareProviderExists.
application/CohortManager/src/Functions/CohortDistributionServices/DistributeParticipant/ValidationRecord.cs Adds ReasonForAdding to the validation orchestration record.
application/CohortManager/src/Functions/CohortDistributionServices/DistributeParticipant/ValidateParticipant.cs Propagates ReasonForAdding into static validation, lookup validation, and transform data request bodies.
application/CohortManager/src/Functions/CohortDistributionServices/DistributeParticipant/DistributeParticipant.cs Adds null-input guard and propagates ReasonForAdding into the validation record; adjusts AllocateServiceProvider call to use the updated participant.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

MWClayson-NHS and others added 3 commits March 31, 2026 15:12
…vice/LookupValidation/LookupValidation.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants