diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 744bf86e..16c5b260 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -254,6 +254,13 @@
访视读片任务
+
+
+ 设置任务加急
+
+
+
+
Subject 任务类型 统计 +分配情况
@@ -5962,6 +5969,11 @@
传了Id 就不查询这条数据
+
+
+ 加急类型
+
+
阅片工具
@@ -10444,6 +10456,16 @@
后台查询模型
+
+
+ 加急类型
+
+
+
+
+ 任务加急备注
+
+
文件名称
diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
index 7b1a2767..047af8fc 100644
--- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
+++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs
@@ -8,6 +8,7 @@ using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.ChangeTracking;
using Microsoft.EntityFrameworkCore.ChangeTracking.Internal;
using Newtonsoft.Json;
+using SharpCompress.Common;
using System;
using System.Collections.Generic;
using System.Linq;
@@ -137,14 +138,19 @@ namespace IRaCIS.Core.Infra.EFCore.Common
//trialDics = await this._dbContext.Dictionary.Where(x => dictionaryIds.Contains(x.Id)).Select(x => x.ValueCN).ToListAsync();
-
+
Guid id = entity.Id;
- var oldentity = await _dbContext.Trial.Where(x => x.Id == id).Select(t => new { t.IsTrialBasicLogicConfirmed, t.IsTrialProcessConfirmed,
- t.IsTrialUrgentConfirmed ,t.IsConfigureEmail}).FirstOrDefaultAsync();
+ var oldentity = await _dbContext.Trial.Where(x => x.Id == id).Select(t => new
+ {
+ t.IsTrialBasicLogicConfirmed,
+ t.IsTrialProcessConfirmed,
+ t.IsTrialUrgentConfirmed,
+ t.IsConfigureEmail
+ }).FirstOrDefaultAsync();
switch (_userInfo.RequestUrl)
{
case "configTrialBasicInfo/ConfigTrialBasicInfoConfirm":
- extraIdentification= $"/{oldentity.IsTrialBasicLogicConfirmed.ToString()}";
+ extraIdentification = $"/{oldentity.IsTrialBasicLogicConfirmed.ToString()}";
break;
case "configTrialBasicInfo/ConfigTrialUrgentInfoConfirm":
@@ -153,7 +159,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
case "TrialEmailNoticeConfig/setTrialEmail":
- extraIdentification = oldentity.IsConfigureEmail? "/EmailUpdate" : "/EmailSave";
+ extraIdentification = oldentity.IsConfigureEmail ? "/EmailUpdate" : "/EmailSave";
break;
}
@@ -161,7 +167,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
await InsertInspection(item.Entity as Trial, type, x => new InspectionConvertDTO()
{
TrialId = x.Id,
- ExtraIndentification= extraIdentification,
+ ExtraIndentification = extraIdentification,
}, new
{
//TrialDicList = string.Join(",", trialDics)
@@ -248,7 +254,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
//保存肿瘤学配置哪里 强行要将 评估结果(中间字典表的多条数据)存到标准稽查上
- var dicIdList = entitys.Where(x => x.Entity.GetType() == typeof(ReadingCriterionDictionary)).Select(t => t.Entity as ReadingCriterionDictionary).Where(t=>t.CriterionId==entity.Id).Select(t=>t.DictionaryId).ToList();
+ var dicIdList = entitys.Where(x => x.Entity.GetType() == typeof(ReadingCriterionDictionary)).Select(t => t.Entity as ReadingCriterionDictionary).Where(t => t.CriterionId == entity.Id).Select(t => t.DictionaryId).ToList();
var dicValueList = new List();
if (dicIdList.Count() == 0)
@@ -257,7 +263,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
}
else
{
- dicValueList = await _dbContext.Dictionary.Where(t => dicIdList.Contains(t.Id) ).Select(t => t.Value).ToListAsync();
+ dicValueList = await _dbContext.Dictionary.Where(t => dicIdList.Contains(t.Id)).Select(t => t.Value).ToListAsync();
}
@@ -274,7 +280,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
}, new
{
EvaluationResultTypes = dicValueList.Count > 0 ? string.Join(",", dicValueList) : string.Empty
- }) ;
+ });
}
//系统标准问题
@@ -844,6 +850,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
+ #region QC 质疑 一致性核查
+
// Qc 问题答案
@@ -1038,6 +1046,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
});
}
+ #endregion
// 中心调研表
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialSiteSurvey)))
@@ -1883,10 +1892,13 @@ namespace IRaCIS.Core.Infra.EFCore.Common
// 保存影像质量 、 修改整体肿瘤评估结果 、 非dicom 保存访视阅片结果
if (_userInfo.RequestUrl == "ReadingImageTask/changeDicomReadingQuestionAnswer"
|| _userInfo.RequestUrl == "ReadingImageTask/saveImageQuality"
- || _userInfo.RequestUrl == "ReadingImageTask/saveVisitTaskQuestions")
+ || _userInfo.RequestUrl == "ReadingImageTask/saveVisitTaskQuestions"
+ || _userInfo.RequestUrl == "ReadingImageTask/changeCalculationAnswer")
{
var type = AuditOpt.Add;
+ var extraIdentification = string.Empty;
+
//具体的答案
var taskQuestionAnswerList = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTaskQuestionAnswer)).Select(t => t.Entity as ReadingTaskQuestionAnswer).ToList();
@@ -1896,7 +1908,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
t.QuestionName,
QuestionId = t.Id,
t.DictionaryCode,
- t.ShowOrder
+ t.ShowOrder,
+ AnswerType = t.Type,
}).OrderBy(t => t.ShowOrder).ToListAsync();
@@ -1904,9 +1917,56 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var cloneEntity = firstEntity.Clone();
+
+
+
//保证Id 唯一
cloneEntity.Id = IdentifierHelper.CreateGuid(firstEntity.ReadingQuestionCriterionTrialId.ToString(), firstEntity.ReadingQuestionTrialId.ToString(), firstEntity.VisitTaskId.ToString());
+
+ dynamic tableQuesionAndAnswerList = null;
+ //自定义特有标识
+ if (await _dbContext.ReadingQuestionCriterionTrial.AnyAsync(t => t.Id == firstEntity.ReadingQuestionCriterionTrialId && t.CriterionType == CriterionType.SelfDefine))
+ {
+ extraIdentification = "/Self";
+
+ //还会把病灶问题答案更新
+
+ var tableQuestionAnswerList = entitys.Where(x => x.Entity.GetType() == typeof(ReadingTableQuestionAnswer)).Select(t => t.Entity as ReadingTableQuestionAnswer).ToList();
+
+
+ //获取表格问题名称 组合成数组
+ var tableQuesionList = await _dbContext.ReadingTableQuestionTrial.Where(t => tableQuestionAnswerList.Select(k => k.TableQuestionId).Contains(t.Id)).Select(t =>
+ new
+ {
+ TrialReadingCriterionId = t.ReadingQuestionTrial.ReadingQuestionCriterionTrialId, //标准Id
+ Type = t.ReadingQuestionTrial.QuestionName, //病灶类型
+ t.ReadingQuestionTrial.Unit,
+ t.ReadingQuestionTrial.CustomUnit,
+ t.DictionaryCode,
+ t.QuestionName,
+ QuestionId = t.Id,
+ t.ShowOrder,
+ AnswerType= t.Type,
+ })
+ .OrderBy(t => t.ShowOrder).ToListAsync();
+
+ tableQuesionAndAnswerList = tableQuestionAnswerList.Join(tableQuesionList, t => t.TableQuestionId, u => u.QuestionId, (t, u) =>
+ new
+ {
+ //如果问题类型是附件 特殊处理 方便前端解析
+ Answer= u.AnswerType== "upload"? "❄❅❆❇❈❉❊" +t.Answer:t.Answer,
+ u.QuestionName,
+ u.DictionaryCode,
+ u.ShowOrder,
+ t.RowId
+ }
+ ).OrderBy(t => t.RowId).ThenBy(t=>t.ShowOrder).ToList();
+
+
+
+ }
+
await InsertInspection(cloneEntity, type, x => new InspectionConvertDTO()
{
VisitTaskId = x.VisitTaskId,
@@ -1915,9 +1975,16 @@ namespace IRaCIS.Core.Infra.EFCore.Common
TrialReadingCriterionId = x.ReadingQuestionCriterionTrialId,
- }, new { QuestionAnswerList = taskQuestionAnswerList.Join(quesionList, t => t.ReadingQuestionTrialId, u => u.QuestionId, (t, u) => new { t.Answer, u.DictionaryCode, u.QuestionName, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList() });
+ ExtraIndentification = extraIdentification,
+ }, new { QuestionAnswerList = taskQuestionAnswerList.Join(quesionList, t => t.ReadingQuestionTrialId, u => u.QuestionId, (t, u) =>
+ new { Answer = u.AnswerType == "upload" ? "❄❅❆❇❈❉❊" + t.Answer : t.Answer, u.DictionaryCode, u.QuestionName, u.ShowOrder }).OrderBy(t => t.ShowOrder).ToList()
+ ,
+ TableQuestionAndAnswerList = tableQuesionAndAnswerList
+ }
+ );
+
}
@@ -1946,7 +2013,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
t.DictionaryCode,
t.QuestionName,
QuestionId = t.Id,
- t.ShowOrder
+ t.ShowOrder,
+ AnswerType = t.Type,
+
})
.OrderBy(t => t.ShowOrder).ToListAsync();
@@ -1991,7 +2060,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
tableQuestionAnswerList.Join(tableQuesionList, t => t.TableQuestionId, u => u.QuestionId, (t, u) =>
new
{
- t.Answer /*u.Unit==ValueUnit.Custom? t.Answer+u.CustomUnit:(u.Unit != ValueUnit.None|| u.Unit != null)*/,
+ //如果问题类型是附件 特殊处理 方便前端解析
+ Answer = u.AnswerType == "upload" ? "❄❅❆❇❈❉❊" + t.Answer : t.Answer,
+ //t.Answer /*u.Unit==ValueUnit.Custom? t.Answer+u.CustomUnit:(u.Unit != ValueUnit.None|| u.Unit != null)*/,
u.QuestionName,
u.DictionaryCode,
u.ShowOrder