瀏覽代碼

fix 0008243: 【自建-管理端机构】机构信息中点击更多下拉框中的“AI配置”,弹窗中缺少“颈动脉诊断”

Jeremy 2 年之前
父節點
當前提交
1792b2c611
共有 1 個文件被更改,包括 14 次插入1 次删除
  1. 14 1
      Service/AIDiagnosisService.cs

+ 14 - 1
Service/AIDiagnosisService.cs

@@ -51,6 +51,7 @@ namespace WingAIDiagnosisService.Service
         static HttpClient _httpClient = new HttpClient();
         private IAuthenticationService _authenticationService;
         private IStorageService _storageService;
+        private readonly string _carotidName = "CarotidPlaqueDetect";
 
         /// <summary>
         /// Init service
@@ -92,7 +93,19 @@ namespace WingAIDiagnosisService.Service
             {
                 var moduleNames = AIDiagSystem.GetValidModuleNamesForVclound() ?? new List<EnumAIModuleNames>();
                 var resultData = moduleNames.Select(x => x.ToString()).ToList();
-                return await Task.FromResult(resultData);
+                if (!resultData.Contains(_carotidName))
+                {
+                    var carotid = resultData.FirstOrDefault(x => x == "CarotidArtery");
+                    if (carotid == null)
+                    {
+                        resultData.Add(_carotidName);
+                    }
+                    else
+                    {
+                        carotid = _carotidName;
+                    }
+                }
+                return await Task.FromResult(resultData.Distinct().ToList());
             }
             catch (Exception)
             {