Skip to content

Commit a47662b

Browse files
Merge branch 'DTOSS-7817-SonarCloud-Coverage-Refinements' of github.com:NHSDigital/dtos-cohort-manager into DTOSS-7817-SonarCloud-Coverage-Refinements
2 parents 5c07983 + 6f686c4 commit a47662b

File tree

21 files changed

+1279
-227
lines changed

21 files changed

+1279
-227
lines changed

.azuredevops/pipelines/cd-infrastructure-dev-core.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ resources:
1313
- repository: dtos-devops-templates
1414
type: github
1515
name: NHSDigital/dtos-devops-templates
16-
ref: c00889236a258a52a2f3131272427ce81d4da951
16+
ref: 63363f075e3cd89a35d79325a25c7f7b3d2ccff6
1717
endpoint: NHSDigital
1818

1919
variables:

application/CohortManager/src/Functions/ScreeningValidationService/LookupValidation/Breast_Screening_lookupRules.json

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@
55
{
66
"Name": "ValidCurrentPosting",
77
"Expression": "string.IsNullOrEmpty(newParticipant.CurrentPosting) OR dbLookup.CheckIfCurrentPostingExists(newParticipant.CurrentPosting)"
8+
},
9+
{
10+
"Name": "ValidPrimaryCareProvider",
11+
"Expression": "string.IsNullOrEmpty(newParticipant.PrimaryCareProvider) || dbLookup.CheckIfPrimaryCareProviderExists(newParticipant.PrimaryCareProvider)"
812
}
913
],
1014
"Rules": [
@@ -21,8 +25,8 @@
2125
}
2226
},
2327
{
24-
"RuleName": "36.ValidatePrimaryCareProvider.BSSelect.NonFatal",
25-
"Expression": "string.IsNullOrEmpty(newParticipant.PrimaryCareProvider) || dbLookup.CheckIfPrimaryCareProviderExists(newParticipant.primaryCareProvider)",
28+
"RuleName": "3601.ValidatePrimaryCareProvider.BSSelect.NonFatal",
29+
"Expression": "ValidPrimaryCareProvider",
2630
"Actions": {
2731
"OnFailure": {
2832
"Name": "OutputExpression",
@@ -33,18 +37,22 @@
3337
}
3438
},
3539
{
36-
"RuleName": "3645.CurrentPostingAndPrimaryProvider.BSSelect.NonFatal",
40+
"RuleName": "3602.CurrentPostingAndPrimaryProvider.BSSelect.NonFatal",
3741
"LocalParams": [
3842
{
39-
"Name": "ValidPostingCategory",
40-
"Expression": "dbLookup.ValidatePostingCategories(newParticipant.CurrentPosting)"
41-
},
42-
{
43-
"Name": "InvalidPrimaryCareProvider",
44-
"Expression": "!string.IsNullOrEmpty(newParticipant.PrimaryCareProvider) AND !dbLookup.CheckIfPrimaryCareProviderExists(newParticipant.PrimaryCareProvider)"
43+
"Name": "EnglishPostingCategory",
44+
"Expression": "dbLookup.RetrievePostingCategory(newParticipant.CurrentPosting) == \"ENGLAND\""
4545
}
4646
],
47-
"Expression": "!(ValidPostingCategory AND InvalidPrimaryCareProvider)"
47+
"Expression": "!((EnglishPostingCategory || new[] {\"ENG\", \"DMS\", \"IM\"}.Contains(newParticipant.CurrentPosting)) && !string.IsNullOrEmpty(newParticipant.PrimaryCareProvider) && !dbLookup.CheckIfPrimaryCareProviderExists(newParticipant.PrimaryCareProvider))",
48+
"Actions": {
49+
"OnFailure": {
50+
"Name": "OutputExpression",
51+
"Context": {
52+
"Expression": "\"Invalid primary care provider GP practice code\""
53+
}
54+
}
55+
}
4856
},
4957
{
5058
"RuleName": "58.CurrentPosting.NBO.NonFatal",

application/CohortManager/src/Web/app/accessibility-statement/page.tsx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,41 +56,45 @@ export default async function Page() {
5656
</p>
5757
<h2>Reporting accessibility problems with this website</h2>
5858
<p>
59-
We're always looking to improve the accessibility of this website.
60-
If you find any problems not listed on this page or think we're not
61-
meeting accessibility requirements, please contact{" "}
59+
We&apos;re always looking to improve the accessibility of this
60+
website. If you find any problems not listed on this page or think
61+
we&apos;re not meeting accessibility requirements, please contact{" "}
6262
<a href="mailto:[email protected]">
6363
64-
</a>. This helps us improve.
64+
</a>
65+
. This helps us improve.
6566
</p>
6667
<h2>Enforcement procedure</h2>
6768
<p>
6869
If you contact us with a complaint and you are not happy with our
6970
response,{" "}
7071
<a href="https://www.equalityadvisoryservice.com/">
7172
contact the Equality Advisory and Support Service (EASS)
72-
</a>.
73+
</a>
74+
.
7375
</p>
7476
<p>
7577
The Equality and Human Rights Commission (EHRC) is responsible for
7678
enforcing the{" "}
7779
<a href="https://www.legislation.gov.uk/uksi/2018/952/contents/made">
7880
Public Sector Bodies (Websites and Mobile Applications) (No. 2)
7981
Accessibility Regulations 2018 on legislation.gov.uk
80-
</a> (the "accessibility regulations").
82+
</a>{" "}
83+
(the &quot;accessibility regulations&quot;).
8184
</p>
8285
<h2>Technical information about this website&apos;s accessibility</h2>
8386
<p>
8487
This service is compliant with the{" "}
8588
<a href="http://www.w3.org/TR/WCAG21/">
8689
Web Content Accessibility Guidelines (WCAG) version 2.1 AA
8790
standard
88-
</a>.
91+
</a>
92+
.
8993
</p>
9094
<h2>Preparation of this accessibility statement</h2>
9195
<p>This statement was prepared on 2 December 2024.</p>
9296
<p>
93-
This website's accessibility will be reviewed on a regular and
97+
This website&apos;s accessibility will be reviewed on a regular and
9498
continuous basis.
9599
</p>
96100
</div>

application/CohortManager/src/Web/app/components/exceptionsTable.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { ExceptionDetails } from "@/app/types";
21
import Link from "next/link";
2+
import { ExceptionDetails } from "@/app/types";
33
import { formatNhsNumber, formatDate } from "@/app/lib/utils";
44

55
interface ExceptionsTableProps {
@@ -16,7 +16,7 @@ export default function ExceptionsTable({
1616
<caption className="nhsuk-table__caption">
1717
{caption ? `${caption}` : "Total breast screening exceptions"}
1818
</caption>
19-
<thead role="rowgroup" className="nhsuk-table__head">
19+
<thead className="nhsuk-table__head">
2020
<tr role="row">
2121
<th role="columnheader" scope="col">
2222
Exception ID
@@ -39,7 +39,7 @@ export default function ExceptionsTable({
3939
className="nhsuk-table__row"
4040
key={exception.exceptionId}
4141
>
42-
<td role="cell" className="nhsuk-table__cell">
42+
<td className="nhsuk-table__cell">
4343
<span
4444
className="nhsuk-table-responsive__heading"
4545
aria-hidden="true"
@@ -50,7 +50,7 @@ export default function ExceptionsTable({
5050
{exception.exceptionId}
5151
</Link>
5252
</td>
53-
<td role="cell" className="nhsuk-table__cell app-u-no-wrap">
53+
<td className="nhsuk-table__cell app-u-no-wrap">
5454
<span
5555
className="nhsuk-table-responsive__heading"
5656
aria-hidden="true"
@@ -59,7 +59,7 @@ export default function ExceptionsTable({
5959
</span>
6060
{formatNhsNumber(exception.nhsNumber ?? "")}
6161
</td>
62-
<td role="cell" className="nhsuk-table__cell app-u-no-wrap">
62+
<td className="nhsuk-table__cell app-u-no-wrap">
6363
<span
6464
className="nhsuk-table-responsive__heading"
6565
aria-hidden="true"
@@ -68,7 +68,7 @@ export default function ExceptionsTable({
6868
</span>
6969
{formatDate(exception.dateCreated)}
7070
</td>
71-
<td role="cell" className="nhsuk-table__cell">
71+
<td className="nhsuk-table__cell">
7272
<span
7373
className="nhsuk-table-responsive__heading"
7474
aria-hidden="true"

application/CohortManager/src/Web/app/components/signIn.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import styles from "@/app/styles/components/signIn.module.scss";
22
import { signIn } from "@/app/lib/auth";
33

4+
import type { JSX } from "react";
5+
46
interface SignInProps {
57
serviceName?: string;
68
headingLevel?: 1 | 2 | 3 | 4;
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
/** @type {import('next').NextConfig} */
22
const nextConfig = {
33
output: "standalone",
4+
sassOptions: {
5+
quietDeps: true,
6+
includePaths: ["./node_modules/nhsuk-frontend"],
7+
},
48
};
59

610
export default nextConfig;

0 commit comments

Comments
 (0)