Skip to content

Commit 87e10d1

Browse files
feat: added SupersededByNhsNumber to ExceptionDetails and changed pagination from 20 to 10 results per page (#1465)
1 parent 5936dc4 commit 87e10d1

3 files changed

Lines changed: 5 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
}

0 commit comments

Comments
 (0)