Skip to content

Commit f82db4a

Browse files
committed
chore: made variable names clearer
1 parent 82a081d commit f82db4a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public ExtractCohortDistributionRecords(IDataServiceClient<CohortDistribution> c
2626
private async Task<List<CohortDistribution>?> GetRegularUnextractedParticipants(int rowCount)
2727
{
2828
var unextractedParticipants = await _cohortDistributionDataServiceClient.GetByFilter(
29-
x => x.IsExtracted.Equals(0) && x.RequestId == Guid.Empty && x.SupersededNHSNumber == null);
29+
participant => participant.IsExtracted.Equals(0) && participant.RequestId == Guid.Empty && participant.SupersededNHSNumber == null);
3030

3131
return unextractedParticipants.Any()
3232
? OrderAndTakeParticipants(unextractedParticipants, rowCount)
@@ -36,7 +36,7 @@ public ExtractCohortDistributionRecords(IDataServiceClient<CohortDistribution> c
3636
private async Task<List<CohortDistribution>> GetSupersededParticipants(int rowCount)
3737
{
3838
var supersededParticipants = await _cohortDistributionDataServiceClient.GetByFilter(
39-
x => x.IsExtracted.Equals(0) && x.RequestId == Guid.Empty && x.SupersededNHSNumber != null);
39+
participant => participant.IsExtracted.Equals(0) && participant.RequestId == Guid.Empty && participant.SupersededNHSNumber != null);
4040

4141
// Get distinct non-null superseded NHS numbers
4242
var supersededNhsNumbers = supersededParticipants
@@ -49,7 +49,7 @@ private async Task<List<CohortDistribution>> GetSupersededParticipants(int rowCo
4949
foreach (var nhsNumber in supersededNhsNumbers)
5050
{
5151
var matches = await _cohortDistributionDataServiceClient.GetByFilter(
52-
x => x.NHSNumber == nhsNumber && x.IsExtracted.Equals(1));
52+
participant => participant.NHSNumber == nhsNumber && participant.IsExtracted.Equals(1));
5353
matchingParticipants.AddRange(matches);
5454
}
5555

@@ -64,7 +64,7 @@ private async Task<List<CohortDistribution>> GetSupersededParticipants(int rowCo
6464
private static List<CohortDistribution> OrderAndTakeParticipants(IEnumerable<CohortDistribution> participants, int rowCount)
6565
{
6666
return participants
67-
.OrderBy(x => (x.RecordUpdateDateTime ?? x.RecordInsertDateTime) ?? DateTime.MinValue)
67+
.OrderBy(participant => (participant.RecordUpdateDateTime ?? participant.RecordInsertDateTime) ?? DateTime.MinValue)
6868
.Take(rowCount)
6969
.ToList();
7070
}

0 commit comments

Comments
 (0)