Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
commit
656e9cc9d7
|
@ -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();
|
var taskInfo = await _visitTaskRepository.Where(x => x.Id == taskId).IgnoreAutoIncludes().AsNoTracking().FirstNotNullAsync();
|
||||||
taskInfo.ReadingTaskState = ReadingTaskState.WaitReading;
|
taskInfo.ReadingTaskState = ReadingTaskState.WaitReading;
|
||||||
taskInfo.IsConvertedTask = true;
|
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();
|
||||||
}
|
}
|
||||||
|
|
||||||
//基于标准签名 产生任务 (或者手动选择某些访视生成该标准的任务)
|
//基于标准签名 产生任务 (或者手动选择某些访视生成该标准的任务)
|
||||||
|
|
|
@ -141,7 +141,9 @@ namespace IRaCIS.Application.Contracts
|
||||||
|
|
||||||
public DicDataTypeEnum DataTypeEnum { get; set; }
|
public DicDataTypeEnum DataTypeEnum { get; set; }
|
||||||
|
|
||||||
public bool IsEnumInt => System.Text.RegularExpressions.Regex.IsMatch(Code, @"^[-+]?\d*$") && DataTypeEnum== DicDataTypeEnum.Enum;
|
public CrterionDictionaryGroup CrterionDictionaryGroup { get; set; } = IRaCIS.Core.Domain.Share.CrterionDictionaryGroup.General;
|
||||||
|
|
||||||
|
public bool IsEnumInt => System.Text.RegularExpressions.Regex.IsMatch(Code, @"^[-+]?\d*$") && DataTypeEnum== DicDataTypeEnum.Enum;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -359,6 +359,7 @@ namespace IRaCIS.Application.Services
|
||||||
ParentChildCodeEnum = x.Dictionary.Parent.ChildCodeEnum,
|
ParentChildCodeEnum = x.Dictionary.Parent.ChildCodeEnum,
|
||||||
ShowOrder = x.Dictionary.ShowOrder,
|
ShowOrder = x.Dictionary.ShowOrder,
|
||||||
ParentCode = x.ParentCode,
|
ParentCode = x.ParentCode,
|
||||||
|
CrterionDictionaryGroup=x.CrterionDictionaryGroup,
|
||||||
Id = x.DictionaryId,
|
Id = x.DictionaryId,
|
||||||
ParentId = x.Dictionary.ParentId,
|
ParentId = x.Dictionary.ParentId,
|
||||||
Value = x.Dictionary.Value,
|
Value = x.Dictionary.Value,
|
||||||
|
@ -430,6 +431,7 @@ namespace IRaCIS.Application.Services
|
||||||
ShowOrder = x.Dictionary.ShowOrder,
|
ShowOrder = x.Dictionary.ShowOrder,
|
||||||
ParentCode = x.ParentCode,
|
ParentCode = x.ParentCode,
|
||||||
Id = x.DictionaryId,
|
Id = x.DictionaryId,
|
||||||
|
CrterionDictionaryGroup=x.CrterionDictionaryGroup,
|
||||||
ParentId = x.Dictionary.ParentId,
|
ParentId = x.Dictionary.ParentId,
|
||||||
Value = x.Dictionary.Value,
|
Value = x.Dictionary.Value,
|
||||||
ValueCN = x.Dictionary.ValueCN
|
ValueCN = x.Dictionary.ValueCN
|
||||||
|
|
|
@ -165,6 +165,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string GlobalChangeAnswer { get; set; } = string.Empty;
|
public string GlobalChangeAnswer { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public List<CrterionDictionaryGroup> CrterionDictionaryGroup { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -271,6 +273,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public decimal VisitTaskNum { get; set; }
|
public decimal VisitTaskNum { get; set; }
|
||||||
|
|
||||||
public bool IsCurrentTask { get; set; }
|
public bool IsCurrentTask { get; set; }
|
||||||
|
|
||||||
|
public List<CrterionDictionaryGroup> CrterionDictionaryGroup { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class MergeLesionInDto
|
public class MergeLesionInDto
|
||||||
|
@ -383,6 +387,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
{
|
{
|
||||||
public string Answer { get; set; }
|
public string Answer { get; set; }
|
||||||
|
|
||||||
|
public List<CrterionDictionaryGroup> CrterionDictionaryGroup { get; set; }
|
||||||
|
|
||||||
public List<DicomReadingQuestionAnswer> Childrens = new List<DicomReadingQuestionAnswer>();
|
public List<DicomReadingQuestionAnswer> Childrens = new List<DicomReadingQuestionAnswer>();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -624,6 +630,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public class TrialReadQuestionData : ReadingQuestionTrial
|
public class TrialReadQuestionData : ReadingQuestionTrial
|
||||||
{
|
{
|
||||||
|
|
||||||
|
public List<CrterionDictionaryGroup> CrterionDictionaryGroup { get; set; }
|
||||||
|
|
||||||
public bool IsPage { get; set; } = false;
|
public bool IsPage { get; set; } = false;
|
||||||
|
|
||||||
public string Answer { get; set; }
|
public string Answer { get; set; }
|
||||||
|
|
|
@ -633,7 +633,21 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
if (visitTaskId != null)
|
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,9 +837,27 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
}).OrderBy(x => x.ShowOrder).ToListAsync();
|
}).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
|
|
||||||
|
if (inDto.TaskId != null)
|
||||||
//是否是预览
|
{
|
||||||
if (inDto.IsGetPreview == false)
|
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)
|
||||||
{
|
{
|
||||||
// 是否获取所有问题
|
// 是否获取所有问题
|
||||||
if (inDto.IsGetallQuestion)
|
if (inDto.IsGetallQuestion)
|
||||||
|
|
|
@ -175,7 +175,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
BlindName = x.TaskBlindName,
|
BlindName = x.TaskBlindName,
|
||||||
IsBaseLine = x.SourceSubjectVisit.IsBaseLine,
|
IsBaseLine = x.SourceSubjectVisit.IsBaseLine,
|
||||||
VisitTaskId = x.Id,
|
VisitTaskId = x.Id,
|
||||||
|
CrterionDictionaryGroup= x.CrterionDictionaryGroup,
|
||||||
TaskName = x.TaskName,
|
TaskName = x.TaskName,
|
||||||
LatestScanDate= x.SourceSubjectVisit!=null?x.SourceSubjectVisit.LatestScanDate : null,
|
LatestScanDate= x.SourceSubjectVisit!=null?x.SourceSubjectVisit.LatestScanDate : null,
|
||||||
VisitTaskNum = x.VisitTaskNum,
|
VisitTaskNum = x.VisitTaskNum,
|
||||||
|
|
|
@ -200,7 +200,29 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
return await service.GetReadingReportEvaluation(inDto);
|
var result = await service.GetReadingReportEvaluation(inDto);
|
||||||
|
|
||||||
|
|
||||||
|
// 这里统一处理字典
|
||||||
|
|
||||||
|
var dictionaryGroup = result.VisitTaskList.ToDictionary(x => x.VisitTaskId, x => x.CrterionDictionaryGroup);
|
||||||
|
|
||||||
|
result.TaskQuestions.ForEach(y =>
|
||||||
|
{
|
||||||
|
|
||||||
|
y.Answer.ForEach(z =>
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
z.CrterionDictionaryGroup = dictionaryGroup[z.VisitTaskId];
|
||||||
|
}
|
||||||
|
catch (Exception)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -294,7 +294,31 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsConvertedTask { get; set; } = false;
|
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