feat: DTOSS-12464 & DTOSS-12468 dummy gp rules#1876
Open
MWClayson-NHS wants to merge 6 commits intomainfrom
Open
feat: DTOSS-12464 & DTOSS-12468 dummy gp rules#1876MWClayson-NHS wants to merge 6 commits intomainfrom
MWClayson-NHS wants to merge 6 commits intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
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
ReasonForAddingto 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
CheckIfPrimaryCareProviderExiststo 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.
.../CohortManager/src/Functions/ScreeningValidationService/LookupValidation/LookupValidation.cs
Outdated
Show resolved
Hide resolved
...r/src/Functions/CohortDistributionServices/TransformDataService/TransformDataLookupFacade.cs
Show resolved
Hide resolved
...ager/src/Functions/CohortDistributionServices/DistributeParticipant/DistributeParticipant.cs
Show resolved
Hide resolved
…vice/LookupValidation/LookupValidation.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
Context
DTOSS-12467
DTOSS-12468
Design Doc
Type of changes
Checklist
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.