Uat_Study
parent
31a902605d
commit
0b1d2b0da9
|
@ -89,13 +89,39 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
}
|
||||
|
||||
public async Task AddIsPDChangeTask(Guid taskId)
|
||||
/// <summary>
|
||||
/// 添加转变任务
|
||||
/// </summary>
|
||||
/// <param name="taskId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task AddConvertedTask(Guid taskId)
|
||||
{
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == taskId).IgnoreAutoIncludes().AsNoTracking().FirstNotNullAsync();
|
||||
taskInfo.ReadingTaskState = ReadingTaskState.WaitReading;
|
||||
taskInfo.IsConvertedTask = true;
|
||||
taskInfo.Id = NewId.NextGuid();
|
||||
|
||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x =>
|
||||
x.IsAnalysisCreate == taskInfo.IsAnalysisCreate
|
||||
&& x.IsSelfAnalysis == taskInfo.IsSelfAnalysis
|
||||
&& x.VisitTaskNum > taskInfo.VisitTaskNum
|
||||
&& x.DoctorUserId == taskInfo.DoctorUserId
|
||||
&& x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId
|
||||
&& x.SubjectId == taskInfo.SubjectId
|
||||
&& x.ArmEnum == taskInfo.ArmEnum &&
|
||||
x.TaskState == TaskState.Effect, x => new VisitTask()
|
||||
{
|
||||
IsConvertedTask = true
|
||||
});
|
||||
|
||||
await _visitTaskRepository.AddAsync(taskInfo);
|
||||
|
||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x=>x.Id==taskId, x => new VisitTask()
|
||||
{
|
||||
TaskState = TaskState.Freeze
|
||||
});
|
||||
|
||||
await _visitTaskRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
//基于标准签名 产生任务 (或者手动选择某些访视生成该标准的任务)
|
||||
|
|
|
@ -271,6 +271,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public decimal VisitTaskNum { get; set; }
|
||||
|
||||
public bool IsCurrentTask { get; set; }
|
||||
|
||||
public List<CrterionDictionaryGroup> CrterionDictionaryGroup { get; set; }
|
||||
}
|
||||
|
||||
public class MergeLesionInDto
|
||||
|
@ -383,6 +385,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
{
|
||||
public string Answer { get; set; }
|
||||
|
||||
public List<CrterionDictionaryGroup> CrterionDictionaryGroup { get; set; }
|
||||
|
||||
public List<DicomReadingQuestionAnswer> Childrens = new List<DicomReadingQuestionAnswer>();
|
||||
}
|
||||
|
||||
|
@ -624,6 +628,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public class TrialReadQuestionData : ReadingQuestionTrial
|
||||
{
|
||||
|
||||
public List<CrterionDictionaryGroup> CrterionDictionaryGroup { get; set; }
|
||||
|
||||
public bool IsPage { get; set; } = false;
|
||||
|
||||
public string Answer { get; set; }
|
||||
|
|
|
@ -633,7 +633,21 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
if (visitTaskId != null)
|
||||
{
|
||||
answers = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == visitTaskId).ToListAsync(); ;
|
||||
answers = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == visitTaskId).ToListAsync();
|
||||
|
||||
var taskinfo = await _visitTaskRepository.Where(x => x.Id == visitTaskId).FirstNotNullAsync();
|
||||
questions.ForEach(x =>
|
||||
{
|
||||
x.CrterionDictionaryGroup = taskinfo.CrterionDictionaryGroup;
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
var crterionDictionaryGroup= new List<CrterionDictionaryGroup>() { CrterionDictionaryGroup.General, CrterionDictionaryGroup.BeforeConvert };
|
||||
questions.ForEach(x =>
|
||||
{
|
||||
x.CrterionDictionaryGroup = crterionDictionaryGroup;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
@ -823,6 +837,24 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
}).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
|
||||
if (inDto.TaskId != null)
|
||||
{
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.TaskId).FirstNotNullAsync();
|
||||
|
||||
qusetionList.ForEach(x =>
|
||||
{
|
||||
|
||||
x.CrterionDictionaryGroup = taskInfo.CrterionDictionaryGroup;
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
qusetionList.ForEach(x =>
|
||||
{
|
||||
|
||||
x.CrterionDictionaryGroup = new List<CrterionDictionaryGroup>() { CrterionDictionaryGroup.General, CrterionDictionaryGroup.BeforeConvert };
|
||||
});
|
||||
}
|
||||
|
||||
//是否是预览
|
||||
if (inDto.IsGetPreview == false)
|
||||
|
|
|
@ -175,7 +175,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
BlindName = x.TaskBlindName,
|
||||
IsBaseLine = x.SourceSubjectVisit.IsBaseLine,
|
||||
VisitTaskId = x.Id,
|
||||
|
||||
CrterionDictionaryGroup= x.CrterionDictionaryGroup,
|
||||
TaskName = x.TaskName,
|
||||
LatestScanDate= x.SourceSubjectVisit!=null?x.SourceSubjectVisit.LatestScanDate : null,
|
||||
VisitTaskNum = x.VisitTaskNum,
|
||||
|
|
|
@ -294,7 +294,31 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// </summary>
|
||||
public bool IsConvertedTask { get; set; } = false;
|
||||
|
||||
[NotMapped]
|
||||
public List<CrterionDictionaryGroup> CrterionDictionaryGroup
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
if (this.IsConvertedTask)
|
||||
{
|
||||
return new List<CrterionDictionaryGroup>() { Share.CrterionDictionaryGroup.General, Share.CrterionDictionaryGroup.Converted };
|
||||
}
|
||||
else
|
||||
{
|
||||
return new List<CrterionDictionaryGroup>() { Share.CrterionDictionaryGroup.General, Share.CrterionDictionaryGroup.BeforeConvert };
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
return new List<CrterionDictionaryGroup>();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue