public static class MimicCareUnitMap
{
    public static string ToVigilCareDepartment(string mimicCareUnit)
    {
        // All MIMIC ICU stays map to ICU in VigilCare
        return "Icu";
    }

    public static string ToVigilCareEncounterType(string admissionType)
    {
        if (admissionType.Contains("EMER", StringComparison.OrdinalIgnoreCase))
            return "Emergency";
        return "Inpatient";
    }

    public static List<string> GetTags(string mimicCareUnit, int hospitalExpireFlag)
    {
        var tags = new List<string> { "mimic-iv", "real-data", "icu" };

        var unit = mimicCareUnit.ToUpperInvariant();
        if (unit.Contains("CARDIAC") || unit.Contains("CVICU") || unit.Contains("CCU") || unit.Contains("CORONARY"))
            tags.Add("cardiac");
        if (unit.Contains("NEURO"))
            tags.Add("neuro");
        if (unit.Contains("SURG") || unit.Contains("TSICU"))
            tags.Add("surgical");
        if (unit.Contains("TRAUMA"))
            tags.Add("trauma");
        if (unit.Contains("MICU") || unit.Contains("MEDICAL"))
            tags.Add("medical");

        if (hospitalExpireFlag == 1)
            tags.Add("expired");

        return tags;
    }
}
