Files
voltsrage 24f45851e9
CI / frontend (push) Canceled after 0s
CI / backend (push) Canceled after 8m32s
feature: In-App Simulation Runner (Backend)
2026-08-06 01:52:53 +08:00

24 lines
779 B
C#

namespace VigilCare.Simulation;
public static class DepartmentMapper
{
private static readonly Dictionary<string, string> ScenarioToApi = new(StringComparer.OrdinalIgnoreCase)
{
["Icu"] = "ICU",
["GeneralMedicine"] = "GENERAL_MEDICINE",
["Emergency"] = "EMERGENCY",
["Cardiology"] = "CARDIOLOGY",
["Surgery"] = "SURGERY",
["Pediatrics"] = "PEDIATRICS",
};
public static string ToApiDepartment(string scenarioDepartment)
{
if (ScenarioToApi.TryGetValue(scenarioDepartment, out var apiValue))
return apiValue;
throw new InvalidOperationException(
$"Unknown scenario department '{scenarioDepartment}'. Expected one of: {string.Join(", ", ScenarioToApi.Keys)}.");
}
}