修改稽查

Test.EIImageViewer
hang 2023-02-23 18:06:31 +08:00
parent d8d1eb3915
commit 073ab6b16b
2 changed files with 107 additions and 14 deletions

View File

@ -254,6 +254,13 @@
访视读片任务
</summary>
</member>
<member name="M:IRaCIS.Core.Application.Service.Allocation.VisitTaskService.SetTaskUrgent(IRaCIS.Application.Contracts.SetTaskUrgentInDto)">
<summary>
设置任务加急
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.Allocation.VisitTaskService.GetSubjectAssignAndTaskStatList(IRaCIS.Core.Application.ViewModel.SubjectAssignStatQuery)">
<summary>
Subject 任务类型 统计 +分配情况
@ -5962,6 +5969,11 @@
传了Id 就不查询这条数据
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.VisitTaskViewBasic.TaskUrgentType">
<summary>
加急类型
</summary>
</member>
<member name="P:IRaCIS.Core.Application.ViewModel.VisitTaskViewBasic.ReadingTool">
<summary>
阅片工具
@ -10444,6 +10456,16 @@
后台查询模型
</summary>
</member>
<member name="P:IRaCIS.Application.Contracts.SetTaskUrgentInDto.TaskUrgentType">
<summary>
加急类型
</summary>
</member>
<member name="P:IRaCIS.Application.Contracts.SetTaskUrgentInDto.TaskUrgentRemake">
<summary>
任务加急备注
</summary>
</member>
<member name="P:IRaCIS.Application.Contracts.CriterionFile.FileName">
<summary>
文件名称

View File

@ -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;
@ -139,12 +140,17 @@ namespace IRaCIS.Core.Infra.EFCore.Common
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<Trial>(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<string>();
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<ReadingTaskQuestionAnswer>(cloneEntity, type, x => new InspectionConvertDTO()
{
VisitTaskId = x.VisitTaskId,
@ -1915,7 +1975,14 @@ 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