@@ -289,7 +289,7 @@ public async Task Run_WhenServiceNowParticipantIsValidAndDoesNotExistInTheDataSt
289289 x . Participant . ReferralFlag == "1" &&
290290 x . Participant . PrimaryCareProvider == _serviceNowParticipant . RequiredGpCode &&
291291 x . Participant . ScreeningAcronym == "BSS" &&
292- x . ReasonForAdding == ServiceNowReasonsForAdding . RequiresCeasing ) ,
292+ x . ReasonForAdding == ReasonForAdding . RequiresCeasing ) ,
293293 _configMock . Object . Value . CohortDistributionTopic ) )
294294 . ReturnsAsync ( true ) . Verifiable ( ) ;
295295
@@ -338,7 +338,7 @@ public async Task Run_WhenServiceNowParticipantIsValidAndExistsInTheDataStoreBut
338338 x . Participant . ReferralFlag == "1" &&
339339 x . Participant . PrimaryCareProvider == _serviceNowParticipant . RequiredGpCode &&
340340 x . Participant . ScreeningAcronym == "BSS" &&
341- x . ReasonForAdding == ServiceNowReasonsForAdding . RequiresCeasing ) ,
341+ x . ReasonForAdding == ReasonForAdding . RequiresCeasing ) ,
342342 _configMock . Object . Value . CohortDistributionTopic ) )
343343 . ReturnsAsync ( true ) . Verifiable ( ) ;
344344
@@ -405,7 +405,7 @@ public async Task Run_WhenServiceNowParticipantIsValidAndExistsInTheDataStoreAnd
405405 x . Participant . ReferralFlag == "1" &&
406406 x . Participant . PrimaryCareProvider == _serviceNowParticipant . RequiredGpCode &&
407407 x . Participant . ScreeningAcronym == "BSS" &&
408- x . ReasonForAdding == ServiceNowReasonsForAdding . RequiresCeasing ) ,
408+ x . ReasonForAdding == ReasonForAdding . RequiresCeasing ) ,
409409 _configMock . Object . Value . CohortDistributionTopic ) )
410410 . ReturnsAsync ( true ) . Verifiable ( ) ;
411411
@@ -470,7 +470,7 @@ public async Task Run_WhenSubscribesToNEMSFails_LogsErrorMessageButContinues(Htt
470470 x . Participant . ReferralFlag == "1" &&
471471 x . Participant . PrimaryCareProvider == _serviceNowParticipant . RequiredGpCode &&
472472 x . Participant . ScreeningAcronym == "BSS" &&
473- x . ReasonForAdding == ServiceNowReasonsForAdding . RequiresCeasing ) ,
473+ x . ReasonForAdding == ReasonForAdding . RequiresCeasing ) ,
474474 _configMock . Object . Value . CohortDistributionTopic ) )
475475 . ReturnsAsync ( true ) . Verifiable ( ) ;
476476
@@ -548,7 +548,7 @@ public async Task Run_WhenServiceNowParticipantIsVhrAndDoesNotExistInDataStore_A
548548 x . Participant . ReferralFlag == "1" &&
549549 x . Participant . PrimaryCareProvider == vhrParticipant . RequiredGpCode &&
550550 x . Participant . ScreeningAcronym == "BSS" &&
551- x . ReasonForAdding == ServiceNowReasonsForAdding . VeryHighRisk ) ,
551+ x . ReasonForAdding == ReasonForAdding . VeryHighRisk ) ,
552552 _configMock . Object . Value . CohortDistributionTopic ) )
553553 . ReturnsAsync ( true ) . Verifiable ( ) ;
554554
@@ -615,7 +615,7 @@ public async Task Run_WhenServiceNowParticipantIsNotVhrAndDoesNotExistInDataStor
615615 x . Participant . ReferralFlag == "1" &&
616616 x . Participant . PrimaryCareProvider == _serviceNowParticipant . RequiredGpCode &&
617617 x . Participant . ScreeningAcronym == "BSS" &&
618- x . ReasonForAdding == ServiceNowReasonsForAdding . RequiresCeasing ) ,
618+ x . ReasonForAdding == ReasonForAdding . RequiresCeasing ) ,
619619 _configMock . Object . Value . CohortDistributionTopic ) )
620620 . ReturnsAsync ( true ) . Verifiable ( ) ;
621621
@@ -703,7 +703,7 @@ public async Task Run_WhenVhrParticipantExistsWithNullVhrFlag_SetsVhrFlagToTrue(
703703 x . Participant . ReferralFlag == "1" &&
704704 x . Participant . PrimaryCareProvider == vhrParticipant . RequiredGpCode &&
705705 x . Participant . ScreeningAcronym == "BSS" &&
706- x . ReasonForAdding == ServiceNowReasonsForAdding . VeryHighRisk ) ,
706+ x . ReasonForAdding == ReasonForAdding . VeryHighRisk ) ,
707707 _configMock . Object . Value . CohortDistributionTopic ) )
708708 . ReturnsAsync ( true ) . Verifiable ( ) ;
709709
@@ -780,7 +780,7 @@ public async Task Run_WhenParticipantExistsWithVhrFlagAlreadySet_MaintainsVhrFla
780780 x . Participant . ReferralFlag == "1" &&
781781 x . Participant . PrimaryCareProvider == _serviceNowParticipant . RequiredGpCode &&
782782 x . Participant . ScreeningAcronym == "BSS" &&
783- x . ReasonForAdding == ServiceNowReasonsForAdding . RequiresCeasing ) ,
783+ x . ReasonForAdding == ReasonForAdding . RequiresCeasing ) ,
784784 _configMock . Object . Value . CohortDistributionTopic ) )
785785 . ReturnsAsync ( true ) . Verifiable ( ) ;
786786
@@ -856,7 +856,7 @@ public async Task Run_WhenNonVhrParticipantExistsWithNullVhrFlag_LeavesVhrFlagAs
856856 x . Participant . ReferralFlag == "1" &&
857857 x . Participant . PrimaryCareProvider == _serviceNowParticipant . RequiredGpCode &&
858858 x . Participant . ScreeningAcronym == "BSS" &&
859- x . ReasonForAdding == ServiceNowReasonsForAdding . RequiresCeasing ) ,
859+ x . ReasonForAdding == ReasonForAdding . RequiresCeasing ) ,
860860 _configMock . Object . Value . CohortDistributionTopic ) )
861861 . ReturnsAsync ( true ) . Verifiable ( ) ;
862862 _handleExceptionMock . Setup ( x => x . CreateTransformExecutedExceptions ( It . IsAny < CohortDistributionParticipant > ( ) , "98.UpdateServiceNowData.ReferralWithPrimaryCareProvider" , 98 , null ) )
@@ -893,14 +893,12 @@ public async Task Run_WhenNonVhrParticipantExistsWithNullVhrFlag_LeavesVhrFlagAs
893893 [ DataRow ( "Mary-Anne" , "Smith-Jones" , "MaryAnne" , "SmithJones" , "1970-01-01" ) ] // Hyphens in ServiceNow, none in PDS
894894 [ DataRow ( "MaryAnne" , "SmithJones" , "Mary Anne" , "Smith Jones" , "1970-01-01" ) ] // No hyphens in ServiceNow, spaces in PDS
895895 [ DataRow ( "Mary-Anne" , "Smith-Jones" , "Mary Anne" , "Smith Jones" , "1970-01-01" ) ] // Hyphens in ServiceNow, spaces in PDS
896- [ DataRow ( "José" , "Bloggs" , "José " , "Bloggs" , "1970-01-01" ) ] // Accented character with trailing space
897- [ DataRow ( "François" , "Müller" , "François " , "Müller " , "1970-01-01" ) ] // Multiple accented characters with trailing spaces
898- [ DataRow ( "Siobhán" , "OBrien" , "Siobhán" , "O'Brien" , "1970-01-01" ) ] // Accented character, apostrophe removed
896+ [ DataRow ( "José" , "Bloggs" , "José " , "Bloggs" , "1970-01-01" ) ] // Accented character with trailing space
897+ [ DataRow ( "François" , "Müller" , "François " , "Müller " , "1970-01-01" ) ] // Multiple accented characters with trailing spaces
898+ [ DataRow ( "Siobhán" , "OBrien" , "Siobhán" , "O'Brien" , "1970-01-01" ) ] // Accented character, apostrophe removed
899899 [ DataRow ( "Samantha" , "OBrien" , "Samantha" , "O'Brien" , "1970-01-01" ) ] // ServiceNow without apostrophe, PDS with apostrophe
900900 [ DataRow ( "Samantha" , "dArcy" , "Samantha" , "d'Arcy" , "1970-01-01" ) ] // Lowercase name with apostrophe in PDS
901901 [ DataRow ( "samantha" , "bloggs" , "SAMANTHA" , "BLOGGS" , "1970-01-01" ) ] // Case insensitive matching
902- [ DataRow ( " Sámañtha " , " Blóggs " , "SÂMÁNTHÅ" , "BLÓGG?" , "1970-01-01" ) ] // Realistic accents with spaces
903- [ DataRow ( " SÁm'añ. t,h ã " , " Bló,g'g s¨. " , "SÂMANTHÅ" , "BLÓGG?" , "1970-01-01" ) ] // Multiple special chars and accents
904902 public async Task Run_WhenServiceNowParticipantNameHasTrailingSpacesOrHyphensOrSpecialChars_MatchesWithPdsAndAddsParticipant (
905903 string serviceNowFirstName , string serviceNowFamilyName , string pdsFirstName , string pdsFamilyName , string dateOfBirth )
906904 {
@@ -965,8 +963,8 @@ public async Task Run_WhenServiceNowParticipantNameHasTrailingSpacesOrHyphensOrS
965963 [ DataRow ( "Samantha" , "Williams" , "1970-01-01" ) ] // Completely different family name
966964 [ DataRow ( "Sam" , "Bloggs" , "1970-01-01" ) ] // Shortened first name (not just formatting)
967965 [ DataRow ( "Samantha-Jane" , "Bloggs" , "1970-01-01" ) ] // Additional name part
968- [ DataRow ( "François" , "Bloggs" , "1970-01-01" ) ] // ServiceNow without accent, PDS with accent - should NOT match
969- [ DataRow ( "Siobhán" , "Bloggs" , "1970-01-01" ) ] // ServiceNow without accent, PDS with accent - should NOT match
966+ [ DataRow ( "François" , "Bloggs" , "1970-01-01" ) ] // ServiceNow without accent, PDS with accent - should NOT match
967+ [ DataRow ( "Siobhán" , "Bloggs" , "1970-01-01" ) ] // ServiceNow without accent, PDS with accent - should NOT match
970968 public async Task Run_WhenServiceNowParticipantNamesDontMatchPdsAfterNormalization_ParticipantDataDoesNotMatchExceptionRaised ( string pdsFirstName , string pdsFamilyName , string dateOfBirth )
971969 {
972970 // Arrange
0 commit comments