From ab179bdcfaa5032b57237da2496bb56532aaae41 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 3 Sep 2025 10:07:36 +0100 Subject: [PATCH 1/3] fix: add the new rules to the ruleMappings to match spreadsheet --- .../src/Web/app/lib/ruleMapping.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/application/CohortManager/src/Web/app/lib/ruleMapping.ts b/application/CohortManager/src/Web/app/lib/ruleMapping.ts index a557394efd..0e85ba3b99 100644 --- a/application/CohortManager/src/Web/app/lib/ruleMapping.ts +++ b/application/CohortManager/src/Web/app/lib/ruleMapping.ts @@ -77,6 +77,24 @@ export const ruleIdMappings: Record = { moreDetails: "Enter the patient's forename.", reportingId: "CMR16", }, + 45: { + ruleDescription: "GP practice code does not exist", + moreDetails: "Raise with Breast Screening Select (BSS)", + reportingId: "CMR45", + portalFormTitle: "Raise with Breast Screening Select (BSS)", + }, + 49: { + ruleDescription: "Interpreter required information is not valid", + moreDetails: + "The interpreter required details must be entered as numbers 0 or 1. Check if an interpreter is needed for the participant: enter 0 if an interpreter is not required. Enter 1 if an interpreter is required", + reportingId: "CMR49", + }, + 53: { + ruleDescription: "Current posting awaiting update", + moreDetails: + "The patient’s GP practice code has been updated, but the current posting is yet to be updated", + reportingId: "CMR53", + }, 54: { ruleDescription: "A dummy GP practice code could not be generated. An English postcode must be entered.", From 0e426ca94562fb5a4987838a3793864e7372fe93 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 3 Sep 2025 10:17:24 +0100 Subject: [PATCH 2/3] fix: add exceptions for the new rules --- .../src/Web/app/data/mockExceptions.json | 66 ++++++++++++++++++- .../src/Web/app/lib/ruleMapping.ts | 6 -- 2 files changed, 65 insertions(+), 7 deletions(-) diff --git a/application/CohortManager/src/Web/app/data/mockExceptions.json b/application/CohortManager/src/Web/app/data/mockExceptions.json index e92323af9f..b2fa429b6d 100644 --- a/application/CohortManager/src/Web/app/data/mockExceptions.json +++ b/application/CohortManager/src/Web/app/data/mockExceptions.json @@ -613,7 +613,7 @@ "NhsNumber": "2847593061", "DateCreated": "2025-05-14T12:35:16.73", "DateResolved": "9999-12-31T00:00:00", - "RuleId": 36, + "RuleId": 45, "RuleDescription": "GP practice code does not exist in the BSS cohort organisation table", "Category": 5, "ScreeningName": "Breast Screening", @@ -640,6 +640,70 @@ "ServiceNowCreatedDate": "", "RecordUpdatedDate": "2025-05-16T09:18:54.41" }, + "2035": { + "ExceptionId": 2035, + "NhsNumber": "2847593072", + "DateCreated": "2025-05-14T12:35:16.73", + "DateResolved": "9999-12-31T00:00:00", + "RuleId": 49, + "RuleDescription": "Interpreter Required information is not valid", + "Category": 5, + "ScreeningName": "Breast Screening", + "ExceptionDate": "2025-05-12T00:00:00", + "CohortName": "", + "Fatal": 1, + "ExceptionDetails": { + "GivenName": "Maya", + "FamilyName": "Patel", + "DateOfBirth": "19921103", + "ParticipantAddressLine1": "74 Riverbank Close", + "ParticipantAddressLine2": "Flat 12", + "ParticipantAddressLine3": "Kings Heath", + "ParticipantAddressLine4": "Birmingham", + "ParticipantAddressLine5": "UK", + "ParticipantPostCode": "B14 7QP", + "TelephoneNumberHome": "07412345678", + "EmailAddressHome": "maya.patel@example.com", + "PrimaryCareProvider": "E50231", + "Gender": 2, + "SupersededByNhsNumber": "" + }, + "ServiceNowId": "", + "ServiceNowCreatedDate": "", + "RecordUpdatedDate": "2025-05-16T09:18:54.41" + }, + "2036": { + "ExceptionId": 2036, + "NhsNumber": "2847599972", + "DateCreated": "2025-05-14T12:35:16.73", + "DateResolved": "9999-12-31T00:00:00", + "RuleId": 53, + "RuleDescription": "Participant has re-registered and PDS has been updated with new GP practice code but has not yet received a new current posting.", + "Category": 5, + "ScreeningName": "Breast Screening", + "ExceptionDate": "2025-05-12T00:00:00", + "CohortName": "", + "Fatal": 1, + "ExceptionDetails": { + "GivenName": "Noah", + "FamilyName": "Ahmed", + "DateOfBirth": "19890921", + "ParticipantAddressLine1": "29 Hawthorn Close", + "ParticipantAddressLine2": "House 3", + "ParticipantAddressLine3": "Didsbury", + "ParticipantAddressLine4": "Manchester", + "ParticipantAddressLine5": "UK", + "ParticipantPostCode": "M20 4BQ", + "TelephoneNumberHome": "07987654321", + "EmailAddressHome": "noah.ahmed@example.com", + "PrimaryCareProvider": "E74120", + "Gender": 1, + "SupersededByNhsNumber": "" + }, + "ServiceNowId": "", + "ServiceNowCreatedDate": "", + "RecordUpdatedDate": "2025-05-16T09:18:54.41" + }, "4001": { "ExceptionId": 4001, "NhsNumber": "3333333333", diff --git a/application/CohortManager/src/Web/app/lib/ruleMapping.ts b/application/CohortManager/src/Web/app/lib/ruleMapping.ts index 0e85ba3b99..f500661abd 100644 --- a/application/CohortManager/src/Web/app/lib/ruleMapping.ts +++ b/application/CohortManager/src/Web/app/lib/ruleMapping.ts @@ -61,12 +61,6 @@ export const ruleIdMappings: Record = { "Verify that the changes are correct, and that the NHS number is not involved in a confusion case.", reportingId: "CMR38", }, - 36: { - ruleDescription: "GP practice code does not exist.", - moreDetails: "Raise with Breast Screening Select (BSS).", - reportingId: "CMR45", - portalFormTitle: "Raise with Breast Screening Select (BSS)", - }, 39: { ruleDescription: "Missing surname.", moreDetails: "Enter the patient's surname.", From 5c175028c4cb6b95029f4e8a621b1c06ff2ef403 Mon Sep 17 00:00:00 2001 From: Adam Date: Wed, 3 Sep 2025 10:56:08 +0100 Subject: [PATCH 3/3] fix: fix broken test by removing old id --- application/CohortManager/src/Web/app/lib/ruleMapping.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/application/CohortManager/src/Web/app/lib/ruleMapping.test.ts b/application/CohortManager/src/Web/app/lib/ruleMapping.test.ts index fcf3d8a32a..2f775d16a2 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, 36, 39, 40, 54, 66, 69, 71, + 3, 8, 10, 17, 18, 21, 22, 30, 35, 39, 40, 54, 66, 69, 71, ]; const actualRuleIds = Object.keys(ruleIdMappings).map(Number);