public enum ReconciliationCheckType
{
    UnacknowledgedCriticalAlert,
    PendingOrderNoResult,
    ActiveInpatientNoObservation
}

public static class ReconciliationCheckTypeExtensions
{
    public static string ToDbString(this ReconciliationCheckType t) => t switch
    {
        ReconciliationCheckType.UnacknowledgedCriticalAlert  => "UNACKNOWLEDGED_CRITICAL_ALERT",
        ReconciliationCheckType.PendingOrderNoResult         => "PENDING_ORDER_NO_RESULT",
        ReconciliationCheckType.ActiveInpatientNoObservation => "ACTIVE_INPATIENT_NO_OBSERVATION",
        _ => throw new ArgumentOutOfRangeException(nameof(t))
    };

    public static ReconciliationCheckType FromDbString(string v) => v switch
    {
        "UNACKNOWLEDGED_CRITICAL_ALERT"  => ReconciliationCheckType.UnacknowledgedCriticalAlert,
        "PENDING_ORDER_NO_RESULT"         => ReconciliationCheckType.PendingOrderNoResult,
        "ACTIVE_INPATIENT_NO_OBSERVATION" => ReconciliationCheckType.ActiveInpatientNoObservation,
        _ => throw new ArgumentOutOfRangeException(nameof(v), $"Unknown reconciliation check type: '{v}'")
    };
}
