23 lines
719 B
C#
23 lines
719 B
C#
public enum SepsisBundleElementStatus
|
|
{
|
|
Pending,
|
|
Completed
|
|
}
|
|
|
|
public static class SepsisBundleElementStatusExtensions
|
|
{
|
|
public static string ToDbString(this SepsisBundleElementStatus s) => s switch
|
|
{
|
|
SepsisBundleElementStatus.Pending => "PENDING",
|
|
SepsisBundleElementStatus.Completed => "COMPLETED",
|
|
_ => throw new ArgumentOutOfRangeException(nameof(s))
|
|
};
|
|
|
|
public static SepsisBundleElementStatus FromDbString(string v) => v switch
|
|
{
|
|
"PENDING" => SepsisBundleElementStatus.Pending,
|
|
"COMPLETED" => SepsisBundleElementStatus.Completed,
|
|
_ => throw new ArgumentOutOfRangeException(nameof(v), $"Unknown bundle element status: '{v}'")
|
|
};
|
|
}
|