diff --git a/application/CohortManager/src/Functions/ScreeningValidationService/LookupValidation/Breast_Screening_lookupRules.json b/application/CohortManager/src/Functions/ScreeningValidationService/LookupValidation/Breast_Screening_lookupRules.json index 0060b164ae..62e4309823 100644 --- a/application/CohortManager/src/Functions/ScreeningValidationService/LookupValidation/Breast_Screening_lookupRules.json +++ b/application/CohortManager/src/Functions/ScreeningValidationService/LookupValidation/Breast_Screening_lookupRules.json @@ -62,7 +62,7 @@ "Expression": "!(reasonForRemoval AND postcode AND primaryCareProvider)" }, { - "RuleName": "17.AddressLinesNullAndPostcodeDoesNotMatchExisting.NBO.NonFatal", + "RuleName": "71.AddressLinesNullAndPostcodeDoesNotMatchExisting.NBO.NonFatal", "LocalParams": [ { "Name": "addressLines", diff --git a/application/CohortManager/src/Web/app/lib/ruleMapping.test.ts b/application/CohortManager/src/Web/app/lib/ruleMapping.test.ts index 2f775d16a2..46a97524a0 100644 --- a/application/CohortManager/src/Web/app/lib/ruleMapping.test.ts +++ b/application/CohortManager/src/Web/app/lib/ruleMapping.test.ts @@ -4,7 +4,7 @@ describe("ruleMapping", () => { describe("ruleIdMappings", () => { it("should contain all expected rule IDs", () => { const expectedRuleIds = [ - 3, 8, 10, 17, 18, 21, 22, 30, 35, 39, 40, 54, 66, 69, 71, + 3, 8, 17, 18, 30, 35, 39, 40, 54, 66, 71 ]; const actualRuleIds = Object.keys(ruleIdMappings).map(Number); @@ -153,15 +153,5 @@ describe("ruleMapping", () => { expect(mapping.ruleDescription.trim()).not.toBe(""); }); }); - - it("should handle rules with empty moreDetails", () => { - // Rule 21 has empty moreDetails in the mapping - const result = getRuleMapping(21); - expect(result.moreDetails).toBe(""); - expect(result.ruleDescription).toBe( - "The 'Superseded by NHS number' field has been populated with an NHS number by NBO." - ); - expect(result.reportingId).toBe("CMR33"); - }); }); }); diff --git a/application/CohortManager/src/Web/app/lib/ruleMapping.ts b/application/CohortManager/src/Web/app/lib/ruleMapping.ts index 88b85c62e2..1dedb5aca1 100644 --- a/application/CohortManager/src/Web/app/lib/ruleMapping.ts +++ b/application/CohortManager/src/Web/app/lib/ruleMapping.ts @@ -15,12 +15,6 @@ export const ruleIdMappings: Record = { reportingId: "CMR4", portalFormTitle: "Raise with Cohorting as a Service (CaaS)", }, - 10: { - ruleDescription: - "Update received for NHS number with reason for removal of ‘DEA’.", - moreDetails: "An update has been received for a record marked as deceased.", - reportingId: "CMR36", - }, 17: { ruleDescription: "Date of birth is either missing, in the wrong format, or is in the future.", @@ -35,20 +29,6 @@ export const ruleIdMappings: Record = { "Enter the date of death in the correct format. The date cannot be in the future.", reportingId: "CMR22", }, - 21: { - ruleDescription: - "The 'Superseded by NHS number' field has been populated with an NHS number by NBO.", - moreDetails: "", - reportingId: "CMR33", - }, - 22: { - ruleDescription: - "Amendment received for an NHS number that is not in this cohort.", - moreDetails: - "Raise with Cohorting as a Service (CaaS). An amendment cannot be applied as the record has not yet been added to the cohort. There may have been a delay in adding the new record to Cohort Manager. ", - reportingId: "CMR39", - portalFormTitle: "Raise with Cohorting as a Service (CaaS)", - }, 30: { ruleDescription: "Postcode is in the wrong format.", moreDetails: "Enter a valid UK postcode.", @@ -104,12 +84,6 @@ export const ruleIdMappings: Record = { reportingId: "CMR20", portalFormTitle: "Confused NHS numbers", }, - 69: { - ruleDescription: "NHS number’s invalid flag is set to true.", - moreDetails: - "An update has been received for the record with the NHS Number now flagged as invalid.", - reportingId: "CMR29", - }, 71: { ruleDescription: "Address is blank (postcode may be blank too).", moreDetails: "Enter the patient's full address and postcode.", diff --git a/tests/UnitTests/ScreeningValidationServiceTests/LookupValidation/LookupValidationTests.cs b/tests/UnitTests/ScreeningValidationServiceTests/LookupValidation/LookupValidationTests.cs index 88754f256d..74fa50507e 100644 --- a/tests/UnitTests/ScreeningValidationServiceTests/LookupValidation/LookupValidationTests.cs +++ b/tests/UnitTests/ScreeningValidationServiceTests/LookupValidation/LookupValidationTests.cs @@ -327,7 +327,7 @@ public async Task Run_AddressLinesNullAndPostcodeDoesNotMatchExisting_ReturnVali string body = await AssertionHelper.ReadResponseBodyAsync(response); // Assert - StringAssert.Contains(body, "17.AddressLinesNullAndPostcodeDoesNotMatchExisting.NBO.NonFatal"); + StringAssert.Contains(body, "71.AddressLinesNullAndPostcodeDoesNotMatchExisting.NBO.NonFatal"); } [DataRow(null, null, null, null, null, "RG2 5TX", "Existing Address 1", "Existing Address 2", "Existing Address 3", "Existing Address 4", "Existing Address 5", "RG2 5TX")] // All New Address Fields Blank, Postcode exists, Existing Address fields full