Skip to content

Commit 49b42bc

Browse files
Merge branch 'main' into Fix/retrieve-pds-demo-to-demographic-response
2 parents e24ebcf + b0cd9ee commit 49b42bc

6 files changed

Lines changed: 17 additions & 3 deletions

File tree

application/CohortManager/src/Functions/Shared/Common/Pagination/PaginationService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ namespace Common;
22

33
public class PaginationService<T> : IPaginationService<T>
44
{
5-
private const int pageSize = 20;
5+
private const int pageSize = 10;
66

77
public PaginationResult<T> GetPaginatedResult(
88
IQueryable<T> source,
@@ -19,7 +19,7 @@ public PaginationResult<T> GetPaginatedResult(
1919
var idList = source.Select(idSelector).OrderBy(id => id).ToList();
2020

2121
// Get the index of the lastId
22-
int lastIdIndex = lastId.HasValue? idList.IndexOf(lastId.Value) : -1;
22+
int lastIdIndex = lastId.HasValue ? idList.IndexOf(lastId.Value) : -1;
2323
int currentPage = lastIdIndex >= 0 ? (lastIdIndex / pageSize) + 2 : 1;
2424
var totalItems = source.Count();
2525
var totalPages = (int)Math.Ceiling((double)totalItems / pageSize);

application/CohortManager/src/Functions/Shared/Data/Database/ValidationExceptionData.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ public async Task<bool> UpdateExceptionServiceNowId(int exceptionId, string serv
125125
ParticipantPostCode = participantDemographic?.PostCode,
126126
TelephoneNumberHome = participantDemographic?.TelephoneNumberHome,
127127
EmailAddressHome = participantDemographic?.EmailAddressHome,
128-
PrimaryCareProvider = participantDemographic?.PrimaryCareProvider
128+
PrimaryCareProvider = participantDemographic?.PrimaryCareProvider,
129+
SupersededByNhsNumber = participantDemographic?.SupersededByNhsNumber,
129130
};
130131

131132
if (participantDemographic == null)

application/CohortManager/src/Functions/Shared/Model/ExceptionDetails.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,5 @@ public class ExceptionDetails
1717
public string? EmailAddressHome { get; set; }
1818
public string? PrimaryCareProvider { get; set; }
1919
public Gender? Gender { get; set; }
20+
public long? SupersededByNhsNumber { get; set; }
2021
}

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,16 @@ export default function ParticipantInformationPanel({
4040
{formatNhsNumber(exceptionDetails.nhsNumber ?? "")}
4141
</dd>
4242
</div>
43+
{exceptionDetails.supersededByNhsNumber && (
44+
<div className="nhsuk-summary-list__row">
45+
<dt className="nhsuk-summary-list__key">
46+
Superseded by NHS number
47+
</dt>
48+
<dd className="nhsuk-summary-list__value">
49+
{formatNhsNumber(exceptionDetails.supersededByNhsNumber)}
50+
</dd>
51+
</div>
52+
)}
4353
<div className="nhsuk-summary-list__row">
4454
<dt className="nhsuk-summary-list__key">Surname</dt>
4555
<dd className="nhsuk-summary-list__value">

application/CohortManager/src/Web/app/participant-information/[exceptionId]/page.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ export default async function Page(props: {
3434
const exceptionDetails: ExceptionDetails = {
3535
exceptionId: exceptionId,
3636
nhsNumber: exception.NhsNumber,
37+
supersededByNhsNumber: exception.ExceptionDetails.SupersededByNhsNumber,
3738
surname: exception.ExceptionDetails.FamilyName,
3839
forename: exception.ExceptionDetails.GivenName,
3940
dateCreated: exception.DateCreated,

application/CohortManager/src/Web/app/types/index.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ export interface ExceptionDetails {
33
dateCreated: string;
44
shortDescription: string;
55
nhsNumber?: string;
6+
supersededByNhsNumber?: string;
67
surname: string;
78
forename: string;
89
dateOfBirth?: string;

0 commit comments

Comments
 (0)