|
@@ -1131,6 +1131,8 @@ namespace WingRemedicalModule.Service
|
|
|
var applicationInfo = ApplicationInfo.Create(applicationUnId, name, name, categoryName);
|
|
|
var measureApplication = _measureServiceImpl.GetMeasureApplicationbyInfo(applicationInfo, measureModes, chargeMeasureModuleDTO, orgInfo, chargeResourcePackageList, _isResearchEditionService);
|
|
|
var measureInfo = await _remedicalDBService.GetUserDefinedMeasureInfoAsync(userCode);
|
|
|
+ //读取系统配置
|
|
|
+ var userMeasureSystemSetting = await DoGetMeasureSystemSettingAsync(userCode);
|
|
|
if (measureInfo != null && measureInfo.MeasureApplications?.Count > 0)
|
|
|
{
|
|
|
//自定义
|
|
@@ -1176,8 +1178,7 @@ namespace WingRemedicalModule.Service
|
|
|
}
|
|
|
if (!string.IsNullOrEmpty(folder.ItemMetaJson))
|
|
|
{
|
|
|
- var userDefinedMeasureItems =
|
|
|
- JsonConvert.DeserializeObject<List<ItemMetaDTO>>(folder.ItemMetaJson);
|
|
|
+ var userDefinedMeasureItems = JsonConvert.DeserializeObject<List<ItemMetaDTO>>(folder.ItemMetaJson);
|
|
|
foreach (var item in userDefinedMeasureItems)
|
|
|
{
|
|
|
int index = existFolder.AvailableItems.FindIndex(v => v.Name == item.Name);
|
|
@@ -1219,6 +1220,17 @@ namespace WingRemedicalModule.Service
|
|
|
existFolder.AvailableItems = newAvailableItemList;
|
|
|
existFolder.WorkingItemStatusList = newWorkingItemStatusList;
|
|
|
}
|
|
|
+ // //true 显示简洁注释
|
|
|
+ // if (userMeasureSystemSetting.ShowBriefAnnotation)
|
|
|
+ // {
|
|
|
+ // if (existFolder.AvailableItems?.Count > 0)
|
|
|
+ // {
|
|
|
+ // foreach (var availableItemKey in existFolder.AvailableItems)
|
|
|
+ // {
|
|
|
+ // availableItemKey.BriefAnnotation = "";
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1275,6 +1287,11 @@ namespace WingRemedicalModule.Service
|
|
|
var tempItemList = modeConfigInfo.Folder.Items;
|
|
|
foreach (var availableItemKey in existFolder.AvailableItems)
|
|
|
{
|
|
|
+ // //true 显示简洁注释
|
|
|
+ // if (userMeasureSystemSetting.ShowBriefAnnotation)
|
|
|
+ // {
|
|
|
+ // availableItemKey.BriefAnnotation = "";
|
|
|
+ // }
|
|
|
if (tempItemList.Contains(availableItemKey.Name))
|
|
|
{
|
|
|
newAvailableItemList.Add(availableItemKey);
|
|
@@ -1296,6 +1313,17 @@ namespace WingRemedicalModule.Service
|
|
|
};
|
|
|
existFolder.WorkingItemStatusList.Add(statusItem);
|
|
|
}
|
|
|
+ // //true 显示简洁注释
|
|
|
+ // if (userMeasureSystemSetting.ShowBriefAnnotation)
|
|
|
+ // {
|
|
|
+ // if (existFolder.AvailableItems?.Count > 0)
|
|
|
+ // {
|
|
|
+ // foreach (var availableItemKey in existFolder.AvailableItems)
|
|
|
+ // {
|
|
|
+ // availableItemKey.BriefAnnotation = "";
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1305,94 +1333,130 @@ namespace WingRemedicalModule.Service
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (measureApplication?.AvailableModes?.Count > 0 && _isResearchEditionService)
|
|
|
+ if (measureApplication?.AvailableModes?.Count > 0 )
|
|
|
{
|
|
|
- Logger.WriteLineInfo($"DoGetMeasureApplicationAsync Auth Init, requset:{JsonConvert.SerializeObject(request)}");
|
|
|
- var licenseInfo = await _researchEditionService.GetLicenseInfoAsync(request);
|
|
|
- bool isContainURMAuth = false;
|
|
|
- bool isContainVETAuth = false;
|
|
|
- if (!string.IsNullOrEmpty(licenseInfo?.AuthorityInfos?.Trim()))
|
|
|
+ if (_isResearchEditionService)
|
|
|
{
|
|
|
- var dongleAuth = licenseInfo.AuthorityInfos.Split('丨')?.ToList();
|
|
|
- if (dongleAuth.Count > 0)
|
|
|
+ Logger.WriteLineInfo($"DoGetMeasureApplicationAsync Auth Init, requset:{JsonConvert.SerializeObject(request)}");
|
|
|
+ var licenseInfo = await _researchEditionService.GetLicenseInfoAsync(request);
|
|
|
+ bool isContainURMAuth = false;
|
|
|
+ bool isContainVETAuth = false;
|
|
|
+ if (!string.IsNullOrEmpty(licenseInfo?.AuthorityInfos?.Trim()))
|
|
|
{
|
|
|
- isContainURMAuth = dongleAuth.Exists(c => c == "URMAuthority");
|
|
|
- isContainVETAuth = dongleAuth.Exists(c => c == "VETAuthority");
|
|
|
- }
|
|
|
- }
|
|
|
- Logger.WriteLineInfo($"DoGetMeasureApplicationAsync Auth result, isContainURMAuth:{isContainURMAuth}, isContainVETAuth:{isContainVETAuth}");
|
|
|
- if (!isContainURMAuth)
|
|
|
- {
|
|
|
- //屏蔽URM相关测量
|
|
|
- measureApplication.AvailableModes = measureApplication.AvailableModes.FindAll(c => c.ModeName != "URM");
|
|
|
- }
|
|
|
- else
|
|
|
- {
|
|
|
- //读取展示配置
|
|
|
- var filterMeasureSettingJson = File.ReadAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resource", "Measure", "FilterMeasureSetting.json"));
|
|
|
- FilterMeasureItemDetailDTO filterMeasureItemDetailDTO = null;
|
|
|
- if (!string.IsNullOrEmpty(filterMeasureSettingJson))
|
|
|
- {
|
|
|
- var filterMeasureSettingDTO = JsonConvert.DeserializeObject<FilterMeasureSettingDTO>(filterMeasureSettingJson);
|
|
|
- if (filterMeasureSettingDTO?.DataList?.Count > 0)
|
|
|
+ var dongleAuth = licenseInfo.AuthorityInfos.Split('丨')?.ToList();
|
|
|
+ if (dongleAuth.Count > 0)
|
|
|
{
|
|
|
- filterMeasureItemDetailDTO = filterMeasureSettingDTO.DataList.FirstOrDefault(c => c.Mode == "URM");
|
|
|
+ isContainURMAuth = dongleAuth.Exists(c => c == "URMAuthority");
|
|
|
+ isContainVETAuth = dongleAuth.Exists(c => c == "VETAuthority");
|
|
|
}
|
|
|
}
|
|
|
- Logger.WriteLineInfo($"DoGetMeasureApplicationAsync Auth, filterMeasureItemDetailDTO:{JsonConvert.SerializeObject(filterMeasureItemDetailDTO)}");
|
|
|
- if (filterMeasureItemDetailDTO?.IsValid == true)
|
|
|
+ Logger.WriteLineInfo($"DoGetMeasureApplicationAsync Auth result, isContainURMAuth:{isContainURMAuth}, isContainVETAuth:{isContainVETAuth}");
|
|
|
+ if (!isContainURMAuth)
|
|
|
{
|
|
|
- //屏蔽Vet相关测量
|
|
|
- // var tempAvailableModes = measureApplication.AvailableModes.Copy
|
|
|
- foreach (var item in measureApplication.AvailableModes)
|
|
|
+ //屏蔽URM相关测量
|
|
|
+ measureApplication.AvailableModes = measureApplication.AvailableModes.FindAll(c => c.ModeName != "URM");
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ //读取展示配置
|
|
|
+ var filterMeasureSettingJson = File.ReadAllText(Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "Resource", "Measure", "FilterMeasureSetting.json"));
|
|
|
+ FilterMeasureItemDetailDTO filterMeasureItemDetailDTO = null;
|
|
|
+ if (!string.IsNullOrEmpty(filterMeasureSettingJson))
|
|
|
{
|
|
|
- if (item.AvailableGroups?.Count > 0)
|
|
|
+ var filterMeasureSettingDTO = JsonConvert.DeserializeObject<FilterMeasureSettingDTO>(filterMeasureSettingJson);
|
|
|
+ if (filterMeasureSettingDTO?.DataList?.Count > 0)
|
|
|
{
|
|
|
- foreach (var modeItem in item.AvailableGroups)
|
|
|
+ filterMeasureItemDetailDTO = filterMeasureSettingDTO.DataList.FirstOrDefault(c => c.Mode == "URM");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ Logger.WriteLineInfo($"DoGetMeasureApplicationAsync Auth, filterMeasureItemDetailDTO:{JsonConvert.SerializeObject(filterMeasureItemDetailDTO)}");
|
|
|
+ if (filterMeasureItemDetailDTO?.IsValid == true)
|
|
|
+ {
|
|
|
+ //屏蔽Vet相关测量
|
|
|
+ // var tempAvailableModes = measureApplication.AvailableModes.Copy
|
|
|
+ foreach (var item in measureApplication.AvailableModes)
|
|
|
+ {
|
|
|
+ if (item.AvailableGroups?.Count > 0)
|
|
|
{
|
|
|
- if (modeItem.AvailableFolders?.Count > 0)
|
|
|
+ foreach (var modeItem in item.AvailableGroups)
|
|
|
{
|
|
|
- foreach (var folderItem in modeItem.AvailableFolders)
|
|
|
+ if (modeItem.AvailableFolders?.Count > 0)
|
|
|
{
|
|
|
- var newWorkingItemNames = new List<string>();
|
|
|
- var newWorkingItemStatusList = new List<WorkingItemStatusDTO>();
|
|
|
- var newAvailableItems = new List<ItemMetaDTO>();
|
|
|
- if (folderItem.WorkingItemNames?.Count > 0)
|
|
|
+ foreach (var folderItem in modeItem.AvailableFolders)
|
|
|
{
|
|
|
- foreach (var workingItemName in folderItem.WorkingItemNames)
|
|
|
+ var newWorkingItemNames = new List<string>();
|
|
|
+ var newWorkingItemStatusList = new List<WorkingItemStatusDTO>();
|
|
|
+ var newAvailableItems = new List<ItemMetaDTO>();
|
|
|
+ if (folderItem.WorkingItemNames?.Count > 0)
|
|
|
{
|
|
|
- if (filterMeasureItemDetailDTO.WorkingItems.Contains(workingItemName))
|
|
|
+ foreach (var workingItemName in folderItem.WorkingItemNames)
|
|
|
{
|
|
|
- newWorkingItemNames.Add(workingItemName);
|
|
|
+ if (filterMeasureItemDetailDTO.WorkingItems.Contains(workingItemName))
|
|
|
+ {
|
|
|
+ newWorkingItemNames.Add(workingItemName);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- if (folderItem.WorkingItemStatusList?.Count > 0)
|
|
|
- {
|
|
|
- foreach (var workingItemStatusItem in folderItem.WorkingItemStatusList)
|
|
|
+ if (folderItem.WorkingItemStatusList?.Count > 0)
|
|
|
{
|
|
|
- if (filterMeasureItemDetailDTO.WorkingItems.Contains(workingItemStatusItem.WorkingItemName))
|
|
|
+ foreach (var workingItemStatusItem in folderItem.WorkingItemStatusList)
|
|
|
{
|
|
|
- newWorkingItemStatusList.Add(workingItemStatusItem);
|
|
|
+ if (filterMeasureItemDetailDTO.WorkingItems.Contains(workingItemStatusItem.WorkingItemName))
|
|
|
+ {
|
|
|
+ newWorkingItemStatusList.Add(workingItemStatusItem);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
- if (folderItem.AvailableItems?.Count > 0)
|
|
|
- {
|
|
|
- foreach (var availableItem in folderItem.AvailableItems)
|
|
|
+ if (folderItem.AvailableItems?.Count > 0)
|
|
|
{
|
|
|
- if (filterMeasureItemDetailDTO.MeasureItemName.Contains(availableItem.Name))
|
|
|
+ foreach (var availableItem in folderItem.AvailableItems)
|
|
|
{
|
|
|
- availableItem.BriefAnnotation = "";
|
|
|
- newAvailableItems.Add(availableItem);
|
|
|
+ if (filterMeasureItemDetailDTO.MeasureItemName.Contains(availableItem.Name))
|
|
|
+ {
|
|
|
+ newAvailableItems.Add(availableItem);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ folderItem.AvailableItems = newAvailableItems;
|
|
|
+ folderItem.WorkingItemStatusList = newWorkingItemStatusList;
|
|
|
+ folderItem.WorkingItemNames = newWorkingItemNames;
|
|
|
+
|
|
|
+ Logger.WriteLineInfo($"DoGetMeasureApplicationAsync Auth,urm folderItem:{JsonConvert.SerializeObject(folderItem)}");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if (!isContainVETAuth)
|
|
|
+ {
|
|
|
+ Logger.WriteLineInfo($"DoGetMeasureApplicationAsync Auth, isContainVETAuth:{isContainVETAuth}");
|
|
|
+ foreach (var item in measureApplication.AvailableModes)
|
|
|
+ {
|
|
|
+ if (item.AvailableGroups?.Count > 0)
|
|
|
+ {
|
|
|
+ foreach (var modeItem in item.AvailableGroups)
|
|
|
+ {
|
|
|
+ if (modeItem.AvailableFolders?.Count > 0)
|
|
|
+ {
|
|
|
+ foreach (var folderItem in modeItem.AvailableFolders)
|
|
|
+ {
|
|
|
+ var newWorkingItemNames = new List<string>();
|
|
|
+ var newWorkingItemStatusList = new List<WorkingItemStatusDTO>();
|
|
|
+ var newAvailableItems = new List<ItemMetaDTO>();
|
|
|
+ if (folderItem.AvailableItems?.Count > 0)
|
|
|
+ {
|
|
|
+ newAvailableItems = folderItem.AvailableItems.FindAll(c => !c.Categories.Contains("VET"));
|
|
|
+ var waitDeleteWorkingItemNames = folderItem.AvailableItems.FindAll(c => c.Categories.Contains("VET"))?.Select(c => c.Description).Distinct().ToList();
|
|
|
+ newWorkingItemNames = folderItem.WorkingItemNames.FindAll(c => !waitDeleteWorkingItemNames.Contains(c));
|
|
|
+ newWorkingItemStatusList = folderItem.WorkingItemStatusList.FindAll(c => !waitDeleteWorkingItemNames.Contains(c.WorkingItemName));
|
|
|
+
|
|
|
}
|
|
|
folderItem.AvailableItems = newAvailableItems;
|
|
|
folderItem.WorkingItemStatusList = newWorkingItemStatusList;
|
|
|
folderItem.WorkingItemNames = newWorkingItemNames;
|
|
|
-
|
|
|
- Logger.WriteLineInfo($"DoGetMeasureApplicationAsync Auth,urm folderItem:{JsonConvert.SerializeObject(folderItem)}");
|
|
|
+ Logger.WriteLineInfo($"DoGetMeasureApplicationAsync Auth, vet folderItem:{JsonConvert.SerializeObject(folderItem)}");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -1400,9 +1464,8 @@ namespace WingRemedicalModule.Service
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- if (!isContainVETAuth)
|
|
|
+ if (userMeasureSystemSetting.ShowBriefAnnotation)
|
|
|
{
|
|
|
- Logger.WriteLineInfo($"DoGetMeasureApplicationAsync Auth, isContainVETAuth:{isContainVETAuth}");
|
|
|
foreach (var item in measureApplication.AvailableModes)
|
|
|
{
|
|
|
if (item.AvailableGroups?.Count > 0)
|
|
@@ -1413,26 +1476,18 @@ namespace WingRemedicalModule.Service
|
|
|
{
|
|
|
foreach (var folderItem in modeItem.AvailableFolders)
|
|
|
{
|
|
|
- var newWorkingItemNames = new List<string>();
|
|
|
- var newWorkingItemStatusList = new List<WorkingItemStatusDTO>();
|
|
|
- var newAvailableItems = new List<ItemMetaDTO>();
|
|
|
if (folderItem.AvailableItems?.Count > 0)
|
|
|
{
|
|
|
- newAvailableItems = folderItem.AvailableItems.FindAll(c => !c.Categories.Contains("VET"));
|
|
|
- var waitDeleteWorkingItemNames = folderItem.AvailableItems.FindAll(c => c.Categories.Contains("VET"))?.Select(c => c.Description).Distinct().ToList();
|
|
|
- newWorkingItemNames = folderItem.WorkingItemNames.FindAll(c => !waitDeleteWorkingItemNames.Contains(c));
|
|
|
- newWorkingItemStatusList = folderItem.WorkingItemStatusList.FindAll(c => !waitDeleteWorkingItemNames.Contains(c.WorkingItemName));
|
|
|
-
|
|
|
+ foreach (var availableItemKey in folderItem.AvailableItems)
|
|
|
+ {
|
|
|
+ availableItemKey.BriefAnnotation = "";
|
|
|
+ }
|
|
|
}
|
|
|
- folderItem.AvailableItems = newAvailableItems;
|
|
|
- folderItem.WorkingItemStatusList = newWorkingItemStatusList;
|
|
|
- folderItem.WorkingItemNames = newWorkingItemNames;
|
|
|
- Logger.WriteLineInfo($"DoGetMeasureApplicationAsync Auth, vet folderItem:{JsonConvert.SerializeObject(folderItem)}");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
return measureApplication;
|