修改一版
parent
a9936c2da1
commit
4c476af352
|
@ -65,6 +65,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public Guid VisitTaskId { get; set; }
|
public Guid VisitTaskId { get; set; }
|
||||||
|
|
||||||
|
public decimal VisitNum { get; set; }
|
||||||
|
|
||||||
public List<GlobalQuestionInfo> BeforeQuestionList { get; set; }
|
public List<GlobalQuestionInfo> BeforeQuestionList { get; set; }
|
||||||
|
|
||||||
public List<GlobalQuestionInfo> AfterQuestionList { get; set; }
|
public List<GlobalQuestionInfo> AfterQuestionList { get; set; }
|
||||||
|
|
|
@ -110,6 +110,15 @@ namespace IRaCIS.Application.Services
|
||||||
public async Task<IResponseOutput> SaveGlobalReadingInfo(SaveGlobalReadingInfoInDto inDto)
|
public async Task<IResponseOutput> SaveGlobalReadingInfo(SaveGlobalReadingInfoInDto inDto)
|
||||||
{
|
{
|
||||||
await _readingGlobalTaskInfoRepository.BatchDeleteNoTrackingAsync(x => x.GlobalTaskId == inDto.GlobalTaskId);
|
await _readingGlobalTaskInfoRepository.BatchDeleteNoTrackingAsync(x => x.GlobalTaskId == inDto.GlobalTaskId);
|
||||||
|
|
||||||
|
foreach(var item in inDto.QuestionList)
|
||||||
|
{
|
||||||
|
await _readingTaskQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == item.VisitTaskId && x.ReadingQuestionTrialId == item.QuestionId, x => new ReadingTaskQuestionAnswer()
|
||||||
|
{
|
||||||
|
GlobalChangeAnswer = item.Answer
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
await _readingGlobalTaskInfoRepository.AddRangeAsync(inDto.QuestionList.Select(x => new ReadingGlobalTaskInfo()
|
await _readingGlobalTaskInfoRepository.AddRangeAsync(inDto.QuestionList.Select(x => new ReadingGlobalTaskInfo()
|
||||||
{
|
{
|
||||||
Answer = x.Answer,
|
Answer = x.Answer,
|
||||||
|
@ -145,11 +154,12 @@ namespace IRaCIS.Application.Services
|
||||||
};
|
};
|
||||||
|
|
||||||
result.TaskList = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit &&
|
result.TaskList = await _visitTaskRepository.Where(x => x.ReadingCategory == ReadingCategory.Visit &&
|
||||||
x.SubjectId == taskInfo.SubjectId && x.ArmEnum == taskInfo.ArmEnum && x.VisitTaskNum < taskInfo.VisitTaskNum)
|
x.SubjectId == taskInfo.SubjectId && x.ArmEnum == taskInfo.ArmEnum&&x.IsAnalysisCreate== taskInfo.IsAnalysisCreate&&x.TaskState== TaskState.Effect && x.VisitTaskNum < taskInfo.VisitTaskNum)
|
||||||
.OrderBy(x => x.VisitTaskNum).Select(x => new GlobalVisitInfo()
|
.OrderBy(x => x.VisitTaskNum).Select(x => new GlobalVisitInfo()
|
||||||
{
|
{
|
||||||
VisitName = x.SourceSubjectVisit.VisitName,
|
VisitName = x.SourceSubjectVisit.VisitName,
|
||||||
VisitTaskId = x.Id,
|
VisitTaskId = x.Id,
|
||||||
|
VisitNum=x.SourceSubjectVisit.VisitNum,
|
||||||
VisitId = x.SourceSubjectVisitId.Value,
|
VisitId = x.SourceSubjectVisitId.Value,
|
||||||
BeforeQuestionList = x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.IsJudgeQuestion).OrderBy(y => y.ReadingQuestionTrial.ShowOrder)
|
BeforeQuestionList = x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.IsJudgeQuestion).OrderBy(y => y.ReadingQuestionTrial.ShowOrder)
|
||||||
.Select(y => new GlobalQuestionInfo()
|
.Select(y => new GlobalQuestionInfo()
|
||||||
|
@ -390,7 +400,7 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<(List<GetTrialCriterionJudgeQuestionListOutDto>, object)> GetTrialCriterionJudgeQuestionList(GetTrialCriterionJudgeQuestionListInDto inDto)
|
public async Task<(List<GetTrialCriterionJudgeQuestionListOutDto>, object)> GetTrialCriterionJudgeQuestionList(GetTrialCriterionJudgeQuestionListInDto inDto)
|
||||||
{
|
{
|
||||||
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).FirstOrDefaultAsync();
|
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).FirstNotNullAsync();
|
||||||
|
|
||||||
var result = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.ReadingQuestionCriterionTrialId && x.IsJudgeQuestion)
|
var result = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.ReadingQuestionCriterionTrialId && x.IsJudgeQuestion)
|
||||||
.WhereIf(trialCriterion.FormType == FormType.SinglePage, x => x.ReadingCriterionPageId == null)
|
.WhereIf(trialCriterion.FormType == FormType.SinglePage, x => x.ReadingCriterionPageId == null)
|
||||||
|
@ -810,7 +820,7 @@ namespace IRaCIS.Application.Services
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private async Task FinishReadUpdateState(Guid visitTaskId)
|
private async Task FinishReadUpdateState(Guid visitTaskId)
|
||||||
{
|
{
|
||||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).FirstOrDefaultAsync();
|
var taskInfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).FirstNotNullAsync();
|
||||||
if (!await _visitTaskRepository.AnyAsync(x => x.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && x.SouceReadModuleId == taskInfo.SouceReadModuleId && x.ReadingTaskState != ReadingTaskState.HaveSigned))
|
if (!await _visitTaskRepository.AnyAsync(x => x.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId && x.SouceReadModuleId == taskInfo.SouceReadModuleId && x.ReadingTaskState != ReadingTaskState.HaveSigned))
|
||||||
{
|
{
|
||||||
if (taskInfo.SouceReadModuleId != null)
|
if (taskInfo.SouceReadModuleId != null)
|
||||||
|
@ -921,6 +931,7 @@ namespace IRaCIS.Application.Services
|
||||||
//x.ReReadingApplyState!=ReReadingApplyState.Agree 排除重阅的
|
//x.ReReadingApplyState!=ReReadingApplyState.Agree 排除重阅的
|
||||||
var visitTask = await _visitTaskRepository.Where(x => x.Id == visitTaskId).AsNoTracking().FirstNotNullAsync();
|
var visitTask = await _visitTaskRepository.Where(x => x.Id == visitTaskId).AsNoTracking().FirstNotNullAsync();
|
||||||
|
|
||||||
|
// 判断是否是一致性核查产生
|
||||||
if (visitTask.IsAnalysisCreate&& visitTask.ConsistentAnalysisOriginalTaskId!=null)
|
if (visitTask.IsAnalysisCreate&& visitTask.ConsistentAnalysisOriginalTaskId!=null)
|
||||||
{
|
{
|
||||||
visitTaskids.Add(visitTask.Id);
|
visitTaskids.Add(visitTask.Id);
|
||||||
|
@ -939,7 +950,8 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
visitTaskids = await _visitTaskRepository.Where(x => x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ReadingCategory != ReadingCategory.Judge && x.ReReadingApplyState != ReReadingApplyState.Agree && x.SourceSubjectVisitId == visitTask.SourceSubjectVisitId && x.SouceReadModuleId == visitTask.SouceReadModuleId).Select(x => x.Id).ToListAsync();
|
visitTaskids = await _visitTaskRepository.Where(x => x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ReadingCategory != ReadingCategory.Judge
|
||||||
|
&& x.ReReadingApplyState != ReReadingApplyState.Agree && x.SourceSubjectVisitId == visitTask.SourceSubjectVisitId && x.SouceReadModuleId == visitTask.SouceReadModuleId).Select(x => x.Id).ToListAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
var trialInfo = await _trialRepository.Where(x => x.Id == visitTask.TrialId).Select(x=> new {
|
var trialInfo = await _trialRepository.Where(x => x.Id == visitTask.TrialId).Select(x=> new {
|
||||||
|
|
|
@ -70,6 +70,9 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public TaskState TaskState { get; set; }
|
public TaskState TaskState { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 重阅状态
|
||||||
|
/// </summary>
|
||||||
public ReReadingApplyState ReReadingApplyState { get; set; }
|
public ReReadingApplyState ReReadingApplyState { get; set; }
|
||||||
|
|
||||||
public Guid? DoctorUserId { get; set; }
|
public Guid? DoctorUserId { get; set; }
|
||||||
|
|
|
@ -49,6 +49,11 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 全局阅片修改的答案
|
||||||
|
/// </summary>
|
||||||
|
public string GlobalChangeAnswer { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 创建人
|
/// 创建人
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue