Skip to content

Commit 075e02f

Browse files
Merge branch 'main' into Fix/pds-participant-deserialisation-and-mock-mismatch-issue
2 parents 5b59a9e + 089a2b9 commit 075e02f

2 files changed

Lines changed: 0 additions & 63 deletions

File tree

application/CohortManager/src/Functions/ScreeningValidationService/StaticValidation/Breast_Screening_staticRules.json

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -26,18 +26,6 @@
2626
}
2727
}
2828
},
29-
{
30-
"RuleName": "47.NewParticipantWithRemovalOrDeath.NBO.NonFatal",
31-
"Expression": "participant.RecordType != Actions.New OR (string.IsNullOrEmpty(participant.ReasonForRemoval) AND string.IsNullOrEmpty(participant.ReasonForRemovalEffectiveFromDate) AND string.IsNullOrEmpty(participant.DateOfDeath))",
32-
"Actions": {
33-
"OnFailure": {
34-
"Name": "OutputExpression",
35-
"Context": {
36-
"Expression": "\"Removal fields incompatible with record type\""
37-
}
38-
}
39-
}
40-
},
4129
{
4230
"RuleName": "62.ValidateReasonForRemoval.NBO.NonFatal",
4331
"Expression": "!(participant.ReasonForRemoval == \"LDN\" AND string.IsNullOrEmpty(participant.SupersededByNhsNumber))",

tests/UnitTests/ScreeningValidationServiceTests/StaticValidation/StaticValidationTests.cs

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -565,57 +565,6 @@ public async Task Run_InvalidDateOfDeath_ReturnValidationException(string date)
565565
}
566566
#endregion
567567

568-
#region New Participant with Reason For Removal, Removal Date or Date Of Death (Rule 47)
569-
[TestMethod]
570-
[DataRow(Actions.New, null, null, null, "EA123AB", "1")]
571-
[DataRow(Actions.New, "", "", "", "EA123AB", "1")]
572-
[DataRow(Actions.Amended, "DEA", "20240101", "20240101", null, "1")]
573-
[DataRow(Actions.Removed, "DEA", "20240101", "20240101", null, "0")]
574-
public async Task Run_ValidRfrAndDeathDate_ReturnNoContent(
575-
string recordType, string reasonForRemoval, string removalDate, string dateOfDeath, string pcp, string eligibilityFlag)
576-
{
577-
// Arrange
578-
_participantCsvRecord.Participant.RecordType = recordType;
579-
_participantCsvRecord.Participant.ReasonForRemoval = reasonForRemoval;
580-
_participantCsvRecord.Participant.ReasonForRemovalEffectiveFromDate = removalDate;
581-
_participantCsvRecord.Participant.DateOfDeath = dateOfDeath;
582-
_participantCsvRecord.Participant.PrimaryCareProvider = pcp;
583-
_participantCsvRecord.Participant.EligibilityFlag = eligibilityFlag;
584-
585-
var json = JsonSerializer.Serialize(_participantCsvRecord);
586-
SetUpRequestBody(json);
587-
588-
// Act
589-
var response = await _function.RunAsync(_request.Object);
590-
591-
// Assert
592-
Assert.AreEqual(HttpStatusCode.NoContent, response.StatusCode);
593-
}
594-
595-
[TestMethod]
596-
[DataRow("ADD", "DEA", null, null)]
597-
[DataRow("ADD", null, "20240101", null)]
598-
[DataRow("ADD", null, null, "20240101")]
599-
public async Task Run_AddRecordWithRfrOrDateOfDeath_ReturnValidationException(
600-
string recordType, string reasonForRemoval, string removalDate, string dateOfDeath)
601-
{
602-
// Arrange
603-
_participantCsvRecord.Participant.RecordType = recordType;
604-
_participantCsvRecord.Participant.ReasonForRemoval = reasonForRemoval;
605-
_participantCsvRecord.Participant.ReasonForRemovalEffectiveFromDate = removalDate;
606-
_participantCsvRecord.Participant.DateOfDeath = dateOfDeath;
607-
var json = JsonSerializer.Serialize(_participantCsvRecord);
608-
SetUpRequestBody(json);
609-
610-
// Act
611-
var response = await _function.RunAsync(_request.Object);
612-
string body = await AssertionHelper.ReadResponseBodyAsync(response);
613-
614-
// Assert
615-
StringAssert.Contains(body, "47.NewParticipantWithRemovalOrDeath.NBO.NonFatal");
616-
}
617-
#endregion
618-
619568
#region IsInterpreterRequired (Rule 49)
620569
[TestMethod]
621570
[DataRow("1")]

0 commit comments

Comments
 (0)