Skip to content

Commit

Permalink
Updated CR boolean logic
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Batt <[email protected]>
  • Loading branch information
JoeBatt1989 committed Apr 17, 2023
1 parent e972799 commit 09903c1
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,13 @@ private void Initialize()
_workflowName = Event.TaskPluginArguments[Keys.WorkflowName];
}

if (Event.TaskPluginArguments.ContainsKey(Keys.Notifications))
if (Boolean.TryParse(Event.TaskPluginArguments[Keys.Notifications], out bool result))
{
_notifications = Boolean.TryParse(Event.TaskPluginArguments[Keys.Notifications], out bool result);
_notifications = Boolean.Parse(Event.TaskPluginArguments[Keys.Notifications]);
}
else
{
_notifications = true;
}

if (Event.TaskPluginArguments.ContainsKey(Keys.ReviewedExecutionId))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ public void AssertClinicalReviewEvent(ClinicalReviewRequestEvent clinicalReviewR
clinicalReviewRequestEvent.PatientMetadata.PatientName.Should().Be(GetTaskPluginArguments(taskDispatchEvent, "patient_name"));
clinicalReviewRequestEvent.PatientMetadata.PatientSex.Should().Be(GetTaskPluginArguments(taskDispatchEvent, "patient_sex"));
clinicalReviewRequestEvent.PatientMetadata.PatientDob.Should().Be(GetTaskPluginArguments(taskDispatchEvent, "patient_dob"));
try
if (Boolean.TryParse(GetTaskPluginArguments(taskDispatchEvent, "notifications"), out bool result))
{
var notifications = GetTaskPluginArguments(taskDispatchEvent, "notifications");

var notifications = Boolean.Parse(GetTaskPluginArguments(taskDispatchEvent, "notifications"));
clinicalReviewRequestEvent.Notifications.Should().Be(notifications);
}
catch (Exception ex)
else
{
clinicalReviewRequestEvent.Notifications.Should().Be(true);
}
Expand Down

0 comments on commit 09903c1

Please sign in to comment.