Skip to content

Commit

Permalink
Set Gender to Not available for V3 TRN requests (#1688)
Browse files Browse the repository at this point in the history
  • Loading branch information
gunndabad authored Nov 19, 2024
1 parent 4b9fc29 commit 03f2a16
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@ await crmQueryDispatcher.ExecuteQueryAsync(new CreateContactQuery()
StatedMiddleName = command.MiddleName ?? "",
StatedLastName = command.LastName,
DateOfBirth = command.DateOfBirth,
Gender = Contact_GenderCode.Notavailable,
EmailAddress = emailAddress,
NationalInsuranceNumber = NationalInsuranceNumberHelper.Normalize(command.NationalInsuranceNumber),
PotentialDuplicates = potentialDuplicates.Select(d => (Duplicate: d, HasActiveAlert: resultsWithActiveAlerts.Contains(d.ContactId))).ToArray(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ public class CreateContactQuery : ICrmQuery<Guid>
public required string StatedMiddleName { get; init; }
public required string StatedLastName { get; init; }
public required DateOnly DateOfBirth { get; init; }
public required Contact_GenderCode Gender { get; init; }
public required string? EmailAddress { get; init; }
public required string? NationalInsuranceNumber { get; init; }
public required IReadOnlyCollection<(FindPotentialDuplicateContactsResult Duplicate, bool HasActiveAlert)> PotentialDuplicates { get; init; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ public async Task<Guid> ExecuteAsync(CreateContactQuery query, IOrganizationServ
dfeta_StatedMiddleName = query.StatedMiddleName,
dfeta_StatedLastName = query.StatedLastName,
BirthDate = query.DateOfBirth.ToDateTimeWithDqtBstFix(isLocalTime: false),
GenderCode = query.Gender,
dfeta_NINumber = query.NationalInsuranceNumber,
EMailAddress1 = query.EmailAddress,
dfeta_AllowPiiUpdatesFromRegister = false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public async Task QueryExecutesSuccessfully()
EmailAddress = email,
NationalInsuranceNumber = nino,
DateOfBirth = dateOfBirth,
Gender = Contact_GenderCode.Notavailable,
Trn = trn,
PotentialDuplicates = [],
ApplicationUserName = "Tests",
Expand Down Expand Up @@ -100,6 +101,7 @@ await _dataScope.OrganizationService.CreateAsync(new Contact()
EmailAddress = email,
NationalInsuranceNumber = nino,
DateOfBirth = dateOfBirth,
Gender = Contact_GenderCode.Notavailable,
Trn = null,
PotentialDuplicates =
[
Expand Down

0 comments on commit 03f2a16

Please sign in to comment.