Run initial test for Climate Resilience Verification Suite
Add first part of Alert Quality Analytics
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
public enum AlertFeedbackType
|
||||
{
|
||||
Useful,
|
||||
TooEarly,
|
||||
TooLate,
|
||||
FalsePositive,
|
||||
MissingContext,
|
||||
WouldAct
|
||||
}
|
||||
|
||||
public static class AlertFeedbackTypeExtensions
|
||||
{
|
||||
public static string ToDbString(this AlertFeedbackType t) => t switch
|
||||
{
|
||||
AlertFeedbackType.Useful => "USEFUL",
|
||||
AlertFeedbackType.TooEarly => "TOO_EARLY",
|
||||
AlertFeedbackType.TooLate => "TOO_LATE",
|
||||
AlertFeedbackType.FalsePositive => "FALSE_POSITIVE",
|
||||
AlertFeedbackType.MissingContext => "MISSING_CONTEXT",
|
||||
AlertFeedbackType.WouldAct => "WOULD_ACT",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(t))
|
||||
};
|
||||
|
||||
public static AlertFeedbackType FromDbString(string v) => v switch
|
||||
{
|
||||
"USEFUL" => AlertFeedbackType.Useful,
|
||||
"TOO_EARLY" => AlertFeedbackType.TooEarly,
|
||||
"TOO_LATE" => AlertFeedbackType.TooLate,
|
||||
"FALSE_POSITIVE" => AlertFeedbackType.FalsePositive,
|
||||
"MISSING_CONTEXT" => AlertFeedbackType.MissingContext,
|
||||
"WOULD_ACT" => AlertFeedbackType.WouldAct,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(v))
|
||||
};
|
||||
}
|
||||
@@ -10,7 +10,8 @@ public enum AuditAction
|
||||
PatientUpdated,
|
||||
SuppressionWindowSet,
|
||||
UserLogin,
|
||||
AuthorizationDenied
|
||||
AuthorizationDenied,
|
||||
AlertFeedbackSubmitted,
|
||||
}
|
||||
|
||||
public static class AuditActionExtensions
|
||||
@@ -28,6 +29,7 @@ public static class AuditActionExtensions
|
||||
AuditAction.SuppressionWindowSet => "SUPPRESSION_WINDOW_SET",
|
||||
AuditAction.UserLogin => "USER_LOGIN",
|
||||
AuditAction.AuthorizationDenied => "AUTHORIZATION_DENIED",
|
||||
AuditAction.AlertFeedbackSubmitted => "ALERT_FEEDBACK_SUBMITTED",
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(a))
|
||||
};
|
||||
|
||||
@@ -44,6 +46,7 @@ public static class AuditActionExtensions
|
||||
"SUPPRESSION_WINDOW_SET" => AuditAction.SuppressionWindowSet,
|
||||
"USER_LOGIN" => AuditAction.UserLogin,
|
||||
"AUTHORIZATION_DENIED" => AuditAction.AuthorizationDenied,
|
||||
"ALERT_FEEDBACK_SUBMITTED" => AuditAction.AlertFeedbackSubmitted,
|
||||
_ => throw new ArgumentOutOfRangeException(nameof(v))
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user