Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Dont update Effective date if no gp code
  • Loading branch information
MWClayson-NHS committed Feb 3, 2026
commit 2b08a452ea6c3c007cd00c62203cca9846e14439
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ public async Task Run([ServiceBusTrigger(topicName: "%ServiceNowParticipantManag
{
_logger.LogError("Failed to subscribe participant for updates. Case Number: {CaseNumber}", serviceNowParticipant.ServiceNowCaseNumber);
}
await _exceptionHandler.CreateTransformExecutedExceptions(new CohortDistributionParticipant{NhsNumber = serviceNowParticipant.NhsNumber.ToString()},"98.UpdateServiceNowData.ReferralWithPrimaryCareProvider",98);
if(serviceNowParticipant.RequiredGpCode != null)
{
await _exceptionHandler.CreateTransformExecutedExceptions(new CohortDistributionParticipant{NhsNumber = serviceNowParticipant.NhsNumber.ToString()},"98.UpdateServiceNowData.ReferralWithPrimaryCareProvider",98);
}
var participantForDistribution = new BasicParticipantCsvRecord(serviceNowParticipant, participantManagement);

var sendToQueueSuccess = await _queueClient.AddAsync(participantForDistribution, _config.CohortDistributionTopic);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public BasicParticipantCsvRecord(ServiceNowParticipant serviceNowParticipant, Pa
{
ReferralFlag = "1",
PrimaryCareProvider = serviceNowParticipant.RequiredGpCode,
PrimaryCareProviderEffectiveFromDate = DateTime.UtcNow.ToString("yyyy-MM-dd"),
PrimaryCareProviderEffectiveFromDate = string.IsNullOrEmpty(serviceNowParticipant.RequiredGpCode) ? null : DateTime.UtcNow.ToString("yyyy-MM-dd"),
ScreeningAcronym = "BSS" // TODO: Remove hardcoding when adding support for additional screening programs
};
}
Expand Down
Loading