Skip to content

Commit

Permalink
Added notification CR logic fix
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 09903c1 commit 8e6407d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ private void Initialize()
_workflowName = Event.TaskPluginArguments[Keys.WorkflowName];
}

if (Boolean.TryParse(Event.TaskPluginArguments[Keys.Notifications], out bool result))
if (Event.TaskPluginArguments.ContainsKey(Keys.Notifications) && Boolean.TryParse(Event.TaskPluginArguments[Keys.Notifications], out var result))
{
_notifications = Boolean.Parse(Event.TaskPluginArguments[Keys.Notifications]);
_notifications = result;
}
else
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ 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"));

if (Boolean.TryParse(GetTaskPluginArguments(taskDispatchEvent, "notifications"), out bool result))
{
var notifications = Boolean.Parse(GetTaskPluginArguments(taskDispatchEvent, "notifications"));
clinicalReviewRequestEvent.Notifications.Should().Be(notifications);
clinicalReviewRequestEvent.Notifications.Should().Be(result);
}
else
{
Expand Down

0 comments on commit 8e6407d

Please sign in to comment.