Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"Expression": "!(reasonForRemoval AND postcode AND primaryCareProvider)"
},
{
"RuleName": "17.AddressLinesNullAndPostcodeDoesNotMatchExisting.NBO.NonFatal",
"RuleName": "71.AddressLinesNullAndPostcodeDoesNotMatchExisting.NBO.NonFatal",
"LocalParams": [
{
"Name": "addressLines",
Expand Down
12 changes: 1 addition & 11 deletions application/CohortManager/src/Web/app/lib/ruleMapping.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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");
});
});
});
26 changes: 0 additions & 26 deletions application/CohortManager/src/Web/app/lib/ruleMapping.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,6 @@ export const ruleIdMappings: Record<number, RuleMapping> = {
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.",
Expand All @@ -35,20 +29,6 @@ export const ruleIdMappings: Record<number, RuleMapping> = {
"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.",
Expand Down Expand Up @@ -104,12 +84,6 @@ export const ruleIdMappings: Record<number, RuleMapping> = {
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.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading