{
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft.AspNetCore": "Warning"
    }
  },
  "AllowedHosts": "*",
  "DatabaseSettings": {
    //"ConnectionString": "mongodb://adas:adas2025@168.119.160.124:27017/adas?authSource=admin",
    "ConnectionString": "mongodb://adas:adas2025@168.119.160.124:37017",
    //"ConnectionString": "mongodb://localhost:27017",
    //"ConnectionString": "mongodb://smacsuci:2(R*aQpu2r@127.0.0.1:27017/?authSource=admin",
    //develop
    //    "ConnectionString": "mongodb://smacsuci:2(R*aQpu2r@10.0.20.67:18888/?authSource=admin&maxPoolSize=200&connectTimeoutMS=10000&socketTimeoutMS=30000",
    //"ConnectionString": "mongodb://smacsuci:2(R*aQpu2r@julianrojas.xyz:27017/?authSource=admin",
    //"ConnectionString": "mongodb://smacsuci:2(R*aQpu2r@sumo.julianrojas.xyz:27017/?authSource=admin",
    //"ConnectionString": "mongodb://smartuci:!H12o2020@10.206.250.147:21103/?authSource=smartuci",
    //producción
    //"ConnectionString": "mongodb://smartuci:!H12o2020@localhost:27017/?authSource=smartuci",
    //"ConnectionString": "mongodb://admin:4q*pHca@10.0.20.78:22007",
    //"ConnectionString": "mongodb://smacsuci:2(R*aQpu2r@sumo.julianrojas.xyz:27017/?authSource=admin",
    "DatabaseName": "adasDevNewStandard"
  },
  "DatabaseConfigurationAudit": {
    "ConnectionString": "mongodb://smacsuci:2(R*aQpu2r@julianrojas.xyz:27017/?authSource=admin",
    "DatabaseName": "AuditMeddisPlanUciPanel"
  },
  "RabbitMQSettings": {
    "ConnectionString": "host=localhost;port=5672;username=adas;password=adas;publisherConfirms=true;timeout=30",
    //    "ConnectionString": "host=sumo.julianrojas.xyz;port=5672;username=adas_core;password=adas_core;publisherConfirms=true;timeout=30",
    //"ConnectionString": "host=sumo.julianrojas.xyz;port=5672;username=admin;password=R466itMq;publisherConfirms=true;timeout=30",
    //"ConnectionString": "host=10.0.20.241;port=8889;username=smacs;password=smacs!;publisherConfirms=true;timeout=10",amqp://admin:R466itMq@sumo.julianrojas.xyz:5672
    "PatientsQueue": "patients",
    "TreatmentsQueue": "treatments",
    "ObservationsQueue": "observations",
    "PumpsQueue": "pumps",
    "MaxRetries": 1
  },
  "Ldap": {
    "Enabled": true,

    // Servidor OpenLDAP
    "Server": "168.119.160.124",
    "Port": 389,

    // Si se usa LDAPS o StartTLS en el servidor
    "UseLdaps": false,
    "UseStartTls": false,

    // Patrón DN para autenticar usuarios
    // Resultado final: uid=USERNAME,ou=IT,dc=adas,dc=health
    "BindDnPattern": "uid={0},ou=IT,dc=adas,dc=health",

    // Sólo para AD
    "UserDomainName": null,

    //Bindear con Admin
    "BindAdminDn": "cn=admin,dc=adas,dc=health",
    "BindAdminPassword": "admin",

    // DN raíz desde donde buscar usuarios
    "SearchBase": "ou=IT,dc=adas,dc=health",

    // atributo principal del usuario OpenLDAP
    "UserNameProperty": "uid",

    "FirstNameProperty": "givenName",
    "LastNameProperty": "sn",

    // memberOf
    "GroupsProperty": "memberOf",

    // Mapeo automático de grupos LDAP → Authorities locales
    "AuthoritiesMap": [
      {
        "Group": "cn=admins",
        "AuthorityName": "Admin"
      },
      {
        "Group": "cn=isp",
        "AuthorityName": "Admin"
      }
    ],

    // Lista blanca: usuarios con permisos especiales
    "WhiteList": [
      {
        "Username": "admin",
        "AuthorityName": "Admin"
      }
    ]
  },
  "CacheSettings": {
    "IsEnabled": true,
    "Patients": "Redis",
    "ConfigDisplays": "Cache",
    "PumpObservations": "None",
    "Appointments": "Cache",
    "GroupedObservations": "Redis",

    "InMemory": {
      "Ttl": {
        "GlobalSeconds": 3600,
        "PatientsSeconds": 600,
        "ConfigDisplaysSeconds": 1200,
        "PumpObservationsSeconds": 300,
        "AppointmentsSeconds": 900,
        "GroupedObservationsSeconds": 300
      }
    },

    "Redis": {
      "ConnectionString": "localhost:6379",
      "EnableScalable": false,
      "Ssl": false,
      "Password": null,
      "ChannelPrefix": "AdasCore",
      "Endpoints": [
        {
          "Host": "localhost",
          "Port": 6379
        }
      ],
      "Ttl": {
        "GlobalSeconds": 3600,
        "PatientsSeconds": 600,
        "ConfigDisplaysSeconds": 1200,
        "PumpObservationsSeconds": 300,
        "AppointmentsSeconds": 900,
        "GroupedObservationsSeconds": 300
      }
    }
  },
  "AuthSettings": {
    "JwtConfig": {
      "Key": "534224WERW�$&/($$ghdTDDTHSSDFVADFTRGW%Y&%�B&CVW$&H&$HWETGWXZ%EGX$%c",
      "Issuer": "https://www.philips.es/healthcare",
      "Audience": "Madrid Salud",
      "TokenValidityInMinutes": 1440,
      "RefreshTokenValidityInMinutes": 10
    },
    "LoginMethods": [
      "Local",
      "Ldap"
    ]
  },
  "ApiSettings": {
    "HL7RestrictionByConfigAlwaysDisabled": true,
    "Customize": "NursePlan",
    "PointOfCareMapping": {
      "Key": "PV1",
      "Required": false,
      "Refresh": 600
    },
    "ConfigObservation": {
      "Key": "PV1",
      "IgnoreUnknownObservation": true,
      "IgnoreUnknownTreatment": false,
      "Refresh": 60
    },
    "ArchiveNurseData": {
      "Active": true,
      "IntervalMinutes": 1,
      "ArchiveTest": {
        //pruebas
        "Active": true,
        "EndDateAfterMinutes": 60
      },
      "ArchiveProcedure": {
        //intervenciones
        "Active": true,
        "EndDateAfterMinutes": 60
      },
      "ArchiveTreatment": {
        //terapias
        "Active": true,
        "EndDateAfterMinutes": 60
      }
    },
    "SmacsOrApiUrl": "http://localhost:5118",
    "RecordingQueue": "recordings",
    "RetentionPolicy": "NoDelete",
    "RetentionPolicyValue": 0,
    "CreatePatientWithORU": true,
    "CreatePatientWithSIU": true,
    "CreatePatientWithoutLocation": false,
    "UpdatePatientDataWithORU": true,
    "updatePatientDataWithAdt_A02": true,
    "UpdatePatientLocationWithORU": false,
    "ArchivePatientWithOru": false,
    "UpdatePatientNumberWithOru": false,
    "OnArchivePatientAction": "Archive",
    "ArchivePatientsWihtoutObservationsSinceDays": 10,
    "CheckInactivePatientSchedulerIntervalHours": 24,
    "CheckActiveTreatmentsSchedulerIntervalMinutes": 2,
    "SinceDischargeTimeToArchive": 48,
    "Shift": [
      "08:00",
      "15:00",
      "22:00"
    ],
    "FindPatientByLocationWithoutID": false,
    "PersistObservationCodes": true,
    "IccaFacility": "Philips.CIS.CVC",
    "SendingFacility": [
      "LABORATORIO"
    ],
    "AllergiesCode": [
      "473011001"
    ],
    "DrainageCode": [
      "56868008"
    ],
    "PositionCode": [
      "386053000"
    ],
    "IsolationCode": [
      "302147001"
    ],
    "HighFrequencyVentilation": [
      "PC-HFO",
      "Alto Flujo"
    ],
    "InvasiveVentilation": [
      "A/C  (S.I.P.P.V. )",
      "A/C  (S.I.P.P.V.) + V.G.",
      "PRVC",
      "PC-SIMV",
      "SIMV-PRVC",
      "PC-AC",
      "SIMV",
      "SIMV-PC",
      "S.I.M.V.",
      "PC-CMV",
      "SIPPV",
      "PC"
    ],
    "NonInvasiveVentilation": [
      "DUOPAP",
      "NCPAP",
      "CPAP",
      "V.N.I. Ciclada"
    ],
    "Surgery": [
      "138875005",
      "370896006",
      "370896006",
      "35631009",
      "420419008",
      "370897002",
      "115959002",
      "370896006"
    ],
    "SurgeryText": [
      "Cirugía láser of",
      "Cirugía",
      "Cirugía sentidos",
      "Cirugía respirat",
      "Cirugía locomoto",
      "Cirugía renal",
      "Cirugía digestiv",
      "Cirugía neuro"
    ],
    "Transcutaneous": [
      "151756",
      "151760"
    ],
    "RegionalBrainSaturation": [
      "194908",
      "194909"
    ],
    "MedicationBolus": [
      "000523",
      "001034",
      "21011000140105",
      "322440003",
      "322761006",
      "18851000140100",
      "333919005",
      "333920004",
      "333922007",
      "18791000140100",
      "18801000140104",
      "18811000140101"
    ],
    "IntravenousLinesCode": [
      "10546003"
    ],
    "Electroencephalogram": [
      "42803009",
      "408987002"
    ],
    "Ecmo": [
      "705923009"
    ],
    "NotesIndicatingMedication": [
      "SUEROS Y HEMODER,Perfusiones,Medicación,NPT"
    ],
    //Dejar siempre en ultima posicion el Ino code 84481000140102
    "Respiratory": [
      "361110005",
      "416362002",
      "84481000140102"
    ],
    "Oni": [
      "84481000140102",
      "416362002"
    ],
    "BalizaUrl": "http://10.0.10.35/info.html",
    "BalizaPassword": "password",
    "ConfigObservationRefresh": 120,
    "ConfigUnitsRequired": true,
    "ActivateSchedulerCheckExpiredObservation": false,
    "schedulerCheckExpiredObservationsIntervalMinutes": 5,
    "diagnosisSystem": "Snomed-CT",
    "DiagnosisCode": [
      "55607006"
    ],
    "PumpExpiresSeconds": 120,
    "SendPumpsZero": false,
    "PumPressureAlarm": [],
    "VolumetricAirOcclusionAlarm": [
      "Accumulated Air In Line",
      "Air In Line",
      "Occlusion",
      "Upstream Occlusion"
    ],
    "EndContinuousInfusionAlarm": [
      "End Of Infusion",
      "Near End Of Infusion"
    ],
    "InotropicEndInfusionAlarm": [
      "Near End Of Infusion",
      "Occlusion",
      "Air In Line"
    ],
    "inotropicMedicines": [
      "Dopamina",
      "Dobutamina",
      "Milrinona",
      "Noradrenalina",
      "Levosimendán"
    ],
    "ActivateCheckInactivePatients": false,
    "PathToDisplayAssets": [
      "D:",
      "Web",
      "smacs-uci-webdisplay",
      "src",
      "assets",
      "icon"
    ]
  }
}
