26 lines
1.1 KiB
C#
26 lines
1.1 KiB
C#
/// <summary>
|
|
/// Site-level configuration controlling workflow routing per batch type.
|
|
/// ClinicalApprovalRequired maps BatchType DB strings to whether a clinical
|
|
/// approver must sign off after verification before the batch can be approved.
|
|
/// </summary>
|
|
public class SiteConfigOptions
|
|
{
|
|
public const string Section = "SiteConfig";
|
|
|
|
/// <summary>
|
|
/// Maps batch type DB string (e.g. "LAB_RESULTS") to whether clinical
|
|
/// approval is required after verification. If a batch type is not listed,
|
|
/// clinical approval is NOT required (defaults to false).
|
|
/// </summary>
|
|
public Dictionary<string, bool> ClinicalApprovalRequired { get; set; } = new();
|
|
|
|
/// <summary>
|
|
/// Returns true if the given batch type requires clinical approval after
|
|
/// verification. Batch types not present in the dictionary default to false.
|
|
/// </summary>
|
|
public bool RequiresClinicalApproval(BatchType batchType)
|
|
{
|
|
var key = batchType.ToDbString();
|
|
return ClinicalApprovalRequired.TryGetValue(key, out var required) && required;
|
|
}
|
|
} |