File tree 2 files changed +10
-6
lines changed
src/TaskManager/Plug-ins/AideClinicalReview
tests/IntegrationTests/TaskManager.IntegrationTests/Support
2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change @@ -88,9 +88,13 @@ private void Initialize()
88
88
_workflowName = Event . TaskPluginArguments [ Keys . WorkflowName ] ;
89
89
}
90
90
91
- if ( Event . TaskPluginArguments . ContainsKey ( Keys . Notifications ) )
91
+ if ( Event . TaskPluginArguments . ContainsKey ( Keys . Notifications ) && Boolean . TryParse ( Event . TaskPluginArguments [ Keys . Notifications ] , out var result ) )
92
92
{
93
- _notifications = Boolean . TryParse ( Event . TaskPluginArguments [ Keys . Notifications ] , out bool result ) ;
93
+ _notifications = result ;
94
+ }
95
+ else
96
+ {
97
+ _notifications = true ;
94
98
}
95
99
96
100
if ( Event . TaskPluginArguments . ContainsKey ( Keys . ReviewedExecutionId ) )
Original file line number Diff line number Diff line change @@ -40,12 +40,12 @@ public void AssertClinicalReviewEvent(ClinicalReviewRequestEvent clinicalReviewR
40
40
clinicalReviewRequestEvent . PatientMetadata . PatientName . Should ( ) . Be ( GetTaskPluginArguments ( taskDispatchEvent , "patient_name" ) ) ;
41
41
clinicalReviewRequestEvent . PatientMetadata . PatientSex . Should ( ) . Be ( GetTaskPluginArguments ( taskDispatchEvent , "patient_sex" ) ) ;
42
42
clinicalReviewRequestEvent . PatientMetadata . PatientDob . Should ( ) . Be ( GetTaskPluginArguments ( taskDispatchEvent , "patient_dob" ) ) ;
43
- try
44
- {
45
- var notifications = GetTaskPluginArguments ( taskDispatchEvent , "notifications" ) ;
46
43
44
+ if ( Boolean . TryParse ( GetTaskPluginArguments ( taskDispatchEvent , "notifications" ) , out bool result ) )
45
+ {
46
+ clinicalReviewRequestEvent . Notifications . Should ( ) . Be ( result ) ;
47
47
}
48
- catch ( Exception ex )
48
+ else
49
49
{
50
50
clinicalReviewRequestEvent . Notifications . Should ( ) . Be ( true ) ;
51
51
}
You can’t perform that action at this time.
0 commit comments