修改疗效评估
parent
ad78362f93
commit
528a8dbf6e
|
@ -8,40 +8,22 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
|
||||
|
||||
public class TumorAssessmentView: AddOrUpdateTumorAssessmentInDto
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public class AddOrUpdateTumorAssessmentInDto
|
||||
{
|
||||
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 靶病灶
|
||||
/// </summary>
|
||||
public string TargetLesion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 非靶病灶
|
||||
/// </summary>
|
||||
public string NonTargetLesions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 新病灶
|
||||
/// </summary>
|
||||
public string NewLesion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 整体疗效
|
||||
/// </summary>
|
||||
public string OverallEfficacy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标准ID
|
||||
/// </summary>
|
||||
public Guid CriterionId { get; set; }
|
||||
}
|
||||
|
||||
public class GetTumorAssessmentListInDto
|
||||
{
|
||||
public Guid CriterionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 靶病灶
|
||||
|
@ -62,6 +44,32 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// 整体疗效
|
||||
/// </summary>
|
||||
public OverallAssessment OverallEfficacy { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class GetTumorAssessmentListInDto
|
||||
{
|
||||
public Guid CriterionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 靶病灶
|
||||
/// </summary>
|
||||
public TargetAssessment? TargetLesion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 非靶病灶
|
||||
/// </summary>
|
||||
public NoTargetAssessment? NonTargetLesions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 新病灶
|
||||
/// </summary>
|
||||
public NewLesionAssessment? NewLesion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 整体疗效
|
||||
/// </summary>
|
||||
public OverallAssessment? OverallEfficacy { get; set; }
|
||||
}
|
||||
public class CopySystemCriterionDataInDto
|
||||
{
|
||||
|
|
|
@ -86,15 +86,15 @@ namespace IRaCIS.Application.Services
|
|||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<TumorAssessment>> GetTumorAssessmentList(GetTumorAssessmentListInDto inDto)
|
||||
public async Task<List<TumorAssessmentView>> GetTumorAssessmentList(GetTumorAssessmentListInDto inDto)
|
||||
{
|
||||
var result= await _tumorAssessmentRepository
|
||||
var result = await _tumorAssessmentRepository
|
||||
.Where(x => x.CriterionId == inDto.CriterionId)
|
||||
.WhereIf(!inDto.OverallEfficacy.IsNullOrEmpty(),x=>x.OverallEfficacy==inDto.OverallEfficacy)
|
||||
.WhereIf(!inDto.TargetLesion.IsNullOrEmpty(), x => x.TargetLesion == inDto.TargetLesion)
|
||||
.WhereIf(!inDto.NonTargetLesions.IsNullOrEmpty(), x => x.NonTargetLesions == inDto.NonTargetLesions)
|
||||
.WhereIf(!inDto.NewLesion.IsNullOrEmpty(), x => x.NewLesion == inDto.NewLesion)
|
||||
.ToListAsync();
|
||||
.WhereIf(inDto.OverallEfficacy != null, x => x.OverallEfficacy == inDto.OverallEfficacy)
|
||||
.WhereIf(inDto.TargetLesion != null, x => x.TargetLesion == inDto.TargetLesion)
|
||||
.WhereIf(inDto.NonTargetLesions != null, x => x.NonTargetLesions == inDto.NonTargetLesions)
|
||||
.WhereIf(inDto.NewLesion != null, x => x.NewLesion == inDto.NewLesion)
|
||||
.ProjectTo<TumorAssessmentView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,8 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
var organData = await _organInfoRepository.Where(x => x.SystemCriterionId == inDto.SourceSystemCriterionId).ToListAsync();
|
||||
|
||||
organData.ForEach(x => {
|
||||
organData.ForEach(x =>
|
||||
{
|
||||
x.Id = NewId.NextGuid();
|
||||
x.SystemCriterionId = inDto.NewSystemCriterionId;
|
||||
});
|
||||
|
@ -225,8 +226,8 @@ namespace IRaCIS.Application.Services
|
|||
List<GetSystemCriterionListOutDto> result = await _readingQuestionCriterionSystemRepository.Select(x => new GetSystemCriterionListOutDto()
|
||||
{
|
||||
|
||||
CriterionId=x.Id,
|
||||
CriterionName=x.CriterionName,
|
||||
CriterionId = x.Id,
|
||||
CriterionName = x.CriterionName,
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
|
@ -242,10 +243,10 @@ namespace IRaCIS.Application.Services
|
|||
public async Task<List<ReadingTableQuestionSystemView>> GetReadingTableQuestionSystemList(ReadingTableQuestionSystemQuery inDto)
|
||||
{
|
||||
var readingTableQuestionSystemQueryable = _readingTableQuestionSystemRepository
|
||||
.WhereIf(inDto.TableQuestionType!=null,x=>x.TableQuestionType ==inDto.TableQuestionType!)
|
||||
.Where(x=>x.ReadingQuestionId==inDto.ReadingQuestionId).ProjectTo<ReadingTableQuestionSystemView>(_mapper.ConfigurationProvider);
|
||||
.WhereIf(inDto.TableQuestionType != null, x => x.TableQuestionType == inDto.TableQuestionType!)
|
||||
.Where(x => x.ReadingQuestionId == inDto.ReadingQuestionId).ProjectTo<ReadingTableQuestionSystemView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var result=await readingTableQuestionSystemQueryable.OrderBy(x=>x.ShowOrder).ToListAsync();
|
||||
var result = await readingTableQuestionSystemQueryable.OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -264,7 +265,7 @@ namespace IRaCIS.Application.Services
|
|||
.WhereIf(inDto.TableQuestionType != null, x => x.TableQuestionType == inDto.TableQuestionType!)
|
||||
.Where(x => x.ReadingQuestionId == inDto.ReadingQuestionId).ProjectTo<ReadingTableQuestionTrialView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var result = await readingTableQuestionSystemQueryable.OrderBy(x=>x.ShowOrder).ToListAsync();
|
||||
var result = await readingTableQuestionSystemQueryable.OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -327,13 +328,13 @@ namespace IRaCIS.Application.Services
|
|||
[HttpDelete("{Id:guid}")]
|
||||
public async Task<IResponseOutput> DeleteReadingTableQuestionSystem(Guid Id)
|
||||
{
|
||||
if(await _readingTableQuestionSystemRepository.AnyAsync(x=>x.ParentId==Id||x.RelevanceId==Id))
|
||||
if (await _readingTableQuestionSystemRepository.AnyAsync(x => x.ParentId == Id || x.RelevanceId == Id))
|
||||
{
|
||||
return ResponseOutput.NotOk("当前问题存在子问题 删除失败");
|
||||
}
|
||||
|
||||
await _readingTableQuestionSystemRepository.DeleteFromQueryAsync(t => t.Id == Id);
|
||||
var success= await _readingTableQuestionSystemRepository.SaveChangesAsync();
|
||||
var success = await _readingTableQuestionSystemRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
|
||||
|
@ -405,7 +406,7 @@ namespace IRaCIS.Application.Services
|
|||
.WhereIf(trialCriterion.FormType == FormType.SinglePage, x => x.ReadingCriterionPageId == null)
|
||||
.WhereIf(trialCriterion.FormType == FormType.MultiplePage, x => x.ReadingCriterionPageId != null).CountAsync();
|
||||
|
||||
if (judgeCount == 0&&(inDto.ArbitrationRule== ArbitrationRule.Visit|| inDto.ArbitrationRule == ArbitrationRule.Reading))
|
||||
if (judgeCount == 0 && (inDto.ArbitrationRule == ArbitrationRule.Visit || inDto.ArbitrationRule == ArbitrationRule.Reading))
|
||||
{
|
||||
throw new BusinessValidationFailedException("无裁判问题却有仲裁对象,操作失败");
|
||||
}
|
||||
|
@ -428,7 +429,7 @@ namespace IRaCIS.Application.Services
|
|||
[HttpPost]
|
||||
public async Task<NeedSynchronize> VerifyeCriterionNeedSynchronize(VerifyeCriterionNeedSynchronizeInDto 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).FirstOrDefaultAsync();
|
||||
if (trialCriterion == null)
|
||||
{
|
||||
return NeedSynchronize.NotNeed;
|
||||
|
@ -449,7 +450,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
foreach (var item in trialQuestionList)
|
||||
{
|
||||
var systemQuestion= systemQuestionList.Where(x=>x.Id== (item.ReadingQuestionSystemId??default(Guid))).FirstOrDefault();
|
||||
var systemQuestion = systemQuestionList.Where(x => x.Id == (item.ReadingQuestionSystemId ?? default(Guid))).FirstOrDefault();
|
||||
if (systemQuestion == null)
|
||||
{
|
||||
return NeedSynchronize.JudgeNotEqual;
|
||||
|
@ -485,7 +486,7 @@ namespace IRaCIS.Application.Services
|
|||
/// <returns></returns>
|
||||
public async Task SynchronizeCriterion(SynchronizeCriterionInDto inDto)
|
||||
{
|
||||
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId&&x.IsConfirm).AsNoTracking().FirstOrDefaultAsync();
|
||||
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).AsNoTracking().FirstOrDefaultAsync();
|
||||
|
||||
if (trialCriterion != null)
|
||||
{
|
||||
|
@ -495,7 +496,8 @@ namespace IRaCIS.Application.Services
|
|||
// 将系统里面的问题转为项目问题
|
||||
var newTrialQuestionList = await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == trialCriterion.ReadingQuestionCriterionSystemId)
|
||||
.ProjectTo<ReadingQuestionTrial>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
newTrialQuestionList.ForEach(x => {
|
||||
newTrialQuestionList.ForEach(x =>
|
||||
{
|
||||
x.Id = NewId.NextGuid();
|
||||
x.ReadingQuestionCriterionTrialId = trialCriterion.Id;
|
||||
x.TrialId = trialCriterion.TrialId;
|
||||
|
@ -528,7 +530,7 @@ namespace IRaCIS.Application.Services
|
|||
question = newData.Clone();
|
||||
}
|
||||
// 最大问题数
|
||||
question.MaxQuestionCount= x.MaxQuestionCount;
|
||||
question.MaxQuestionCount = x.MaxQuestionCount;
|
||||
if (question.ParentId != null)
|
||||
{
|
||||
question.ParentId = copyNewQuestionList.Where(y => x.ParentId == y.ReadingQuestionSystemId).Select(y => y.Id).FirstOrDefault();
|
||||
|
@ -546,7 +548,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
await _readingQuestionTrialRepository.BatchDeleteNoTrackingAsync(x => x.ReadingQuestionCriterionTrialId == trialCriterion.Id);
|
||||
await _readingQuestionTrialRepository.AddRangeAsync(needAddDatas);
|
||||
await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x=>x.Id==trialCriterion.Id, x => new ReadingQuestionCriterionTrial()
|
||||
await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x => x.Id == trialCriterion.Id, x => new ReadingQuestionCriterionTrial()
|
||||
{
|
||||
SynchronizeTime = DateTime.Now
|
||||
});
|
||||
|
@ -559,7 +561,8 @@ namespace IRaCIS.Application.Services
|
|||
.ProjectTo<ReadingTrialTableQuestionData>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
|
||||
newTrialTableQuestionList.ForEach(x => {
|
||||
newTrialTableQuestionList.ForEach(x =>
|
||||
{
|
||||
x.Id = NewId.NextGuid();
|
||||
});
|
||||
|
||||
|
@ -618,7 +621,7 @@ namespace IRaCIS.Application.Services
|
|||
GetTrialJudgyInfoOutDto result = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => new GetTrialJudgyInfoOutDto
|
||||
{
|
||||
TrialId = x.Id,
|
||||
IsReadingTaskViewInOrder=x.IsReadingTaskViewInOrder,
|
||||
IsReadingTaskViewInOrder = x.IsReadingTaskViewInOrder,
|
||||
ArbitrationRule = x.ArbitrationRule,
|
||||
IsArbitrationReading = x.IsArbitrationReading
|
||||
|
||||
|
@ -691,7 +694,7 @@ namespace IRaCIS.Application.Services
|
|||
public async Task<List<GetSystemCriterionSelectDto>> GetSystemCriterionSelectList()
|
||||
{
|
||||
var criterionList = await _readingQuestionCriterionSystemRepository.AsQueryable()
|
||||
.OrderBy(x=>x.ShowOrder)
|
||||
.OrderBy(x => x.ShowOrder)
|
||||
.Select(x => new GetSystemCriterionSelectDto()
|
||||
{
|
||||
Id = x.Id,
|
||||
|
@ -738,7 +741,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
if (!inDto.IsCompleteConfig)
|
||||
{
|
||||
var trialCriterionIds =await _readingQuestionCriterionTrialRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.Id).Select(x => x.Id).ToListAsync();
|
||||
var trialCriterionIds = await _readingQuestionCriterionTrialRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.Id).Select(x => x.Id).ToListAsync();
|
||||
if (await _readingTaskQuestionAnswer.AnyAsync(x => trialCriterionIds.Contains(x.ReadingQuestionCriterionTrialId)))
|
||||
{
|
||||
return ResponseOutput.NotOk("此标准在项目里面已被使用,操作失败");
|
||||
|
@ -757,7 +760,7 @@ namespace IRaCIS.Application.Services
|
|||
await _readingQuestionCriterionSystemRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new ReadingQuestionCriterionSystem()
|
||||
{
|
||||
IsCompleteConfig = inDto.IsCompleteConfig,
|
||||
ConfirmTime= confirmTime,
|
||||
ConfirmTime = confirmTime,
|
||||
});
|
||||
|
||||
if (inDto.IsCompleteConfig)
|
||||
|
@ -766,7 +769,7 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
else
|
||||
{
|
||||
await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x=>x.ReadingQuestionCriterionSystemId== inDto.Id, x => new ReadingQuestionCriterionTrial()
|
||||
await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x => x.ReadingQuestionCriterionSystemId == inDto.Id, x => new ReadingQuestionCriterionTrial()
|
||||
{
|
||||
IsCompleteConfig = inDto.IsCompleteConfig
|
||||
});
|
||||
|
@ -788,7 +791,8 @@ namespace IRaCIS.Application.Services
|
|||
IsCompleteConfig = true,
|
||||
});
|
||||
var systemCriterionQuestionList = await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == systemCriterionId).ToListAsync();
|
||||
var trialCriterionList = await _readingQuestionCriterionTrialRepository.Where(x => x.ReadingQuestionCriterionSystemId == systemCriterionId).Select(x => new {
|
||||
var trialCriterionList = await _readingQuestionCriterionTrialRepository.Where(x => x.ReadingQuestionCriterionSystemId == systemCriterionId).Select(x => new
|
||||
{
|
||||
x.Id,
|
||||
x.TrialId,
|
||||
}).ToListAsync();
|
||||
|
@ -812,14 +816,15 @@ namespace IRaCIS.Application.Services
|
|||
/// <returns></returns>
|
||||
private async Task SynchronizeSystemCriterion(Guid systemCriterionId)
|
||||
{
|
||||
var systemCriterion = await _readingQuestionCriterionSystemRepository.FirstOrDefaultAsync(x=>x.Id== systemCriterionId);
|
||||
var systemCriterion = await _readingQuestionCriterionSystemRepository.FirstOrDefaultAsync(x => x.Id == systemCriterionId);
|
||||
|
||||
var trialCriterionList = await _readingQuestionCriterionTrialRepository.Where(x => x.ReadingQuestionCriterionSystemId == systemCriterionId).Select(x => new {
|
||||
var trialCriterionList = await _readingQuestionCriterionTrialRepository.Where(x => x.ReadingQuestionCriterionSystemId == systemCriterionId).Select(x => new
|
||||
{
|
||||
x.Id,
|
||||
x.TrialId,
|
||||
}).ToListAsync();
|
||||
|
||||
var trialCriterionIds= trialCriterionList.Select(x => x.Id).ToList();
|
||||
var trialCriterionIds = trialCriterionList.Select(x => x.Id).ToList();
|
||||
var systemQuestionList = await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == systemCriterionId).ToListAsync();
|
||||
var trialQuestions = await _readingQuestionTrialRepository.Where(x => trialCriterionIds.Contains(x.ReadingQuestionCriterionTrialId)).Select(x => new TrialQuestion
|
||||
{
|
||||
|
@ -828,9 +833,9 @@ namespace IRaCIS.Application.Services
|
|||
Id = x.Id,
|
||||
JudgeType = x.JudgeType,
|
||||
ReadingCriterionPageId = x.ReadingCriterionPageId,
|
||||
RelevanceId=x.RelevanceId,
|
||||
RelevanceValue=x.RelevanceValue,
|
||||
ImageCount=x.ImageCount,
|
||||
RelevanceId = x.RelevanceId,
|
||||
RelevanceValue = x.RelevanceValue,
|
||||
ImageCount = x.ImageCount,
|
||||
ParentId = x.ParentId,
|
||||
ReadingQuestionCriterionTrialId = x.ReadingQuestionCriterionTrialId,
|
||||
ReadingQuestionSystemId = x.ReadingQuestionSystemId,
|
||||
|
@ -849,40 +854,40 @@ namespace IRaCIS.Application.Services
|
|||
trialQuestion = b
|
||||
}).SelectMany(a => a.trialQuestion, (m, n) => new ReadingQuestionTrial
|
||||
{
|
||||
Id=n.Id,
|
||||
Id = n.Id,
|
||||
|
||||
});
|
||||
var needAddQuestionList = systemQuestionList.GroupJoin(thisTrialQuestions, a => a.Id, b => b.ReadingQuestionSystemId, (x, y) => new { system = x, trial = y })
|
||||
.SelectMany(
|
||||
a => a.trial.DefaultIfEmpty(),
|
||||
(c,d) => new ReadingQuestionTrial
|
||||
(c, d) => new ReadingQuestionTrial
|
||||
{
|
||||
Id=(c.trial.FirstOrDefault()?.Id)??NewId.NextGuid(),
|
||||
ShowOrder=c.system.ShowOrder,
|
||||
SystemParentId=c.system.ParentId,
|
||||
ReadingQuestionSystemId=c.system.Id,
|
||||
AnswerCombination = (c.trial.FirstOrDefault()?.AnswerCombination)??string.Empty,
|
||||
AnswerGroup= (c.trial.FirstOrDefault()?.AnswerGroup) ?? string.Empty,
|
||||
GroupName=c.system.GroupName,
|
||||
IsEnable=c.system.IsEnable,
|
||||
Id = (c.trial.FirstOrDefault()?.Id) ?? NewId.NextGuid(),
|
||||
ShowOrder = c.system.ShowOrder,
|
||||
SystemParentId = c.system.ParentId,
|
||||
ReadingQuestionSystemId = c.system.Id,
|
||||
AnswerCombination = (c.trial.FirstOrDefault()?.AnswerCombination) ?? string.Empty,
|
||||
AnswerGroup = (c.trial.FirstOrDefault()?.AnswerGroup) ?? string.Empty,
|
||||
GroupName = c.system.GroupName,
|
||||
IsEnable = c.system.IsEnable,
|
||||
|
||||
ShowQuestion= c.system.ShowQuestion,
|
||||
IsJudgeQuestion =c.system.IsJudgeQuestion,
|
||||
IsRequired=c.system.IsRequired,
|
||||
JudgeType = (c.trial.FirstOrDefault()?.JudgeType)??JudgeTypeEnum.None,
|
||||
ShowQuestion = c.system.ShowQuestion,
|
||||
IsJudgeQuestion = c.system.IsJudgeQuestion,
|
||||
IsRequired = c.system.IsRequired,
|
||||
JudgeType = (c.trial.FirstOrDefault()?.JudgeType) ?? JudgeTypeEnum.None,
|
||||
ParentId = c.trial.FirstOrDefault()?.ParentId,
|
||||
ParentTriggerValue=c.system.ParentTriggerValue,
|
||||
QuestionName=c.system.QuestionName,
|
||||
ReadingCriterionPageId=c.trial.FirstOrDefault()?.ReadingCriterionPageId,
|
||||
ParentTriggerValue = c.system.ParentTriggerValue,
|
||||
QuestionName = c.system.QuestionName,
|
||||
ReadingCriterionPageId = c.trial.FirstOrDefault()?.ReadingCriterionPageId,
|
||||
RelevanceId = c.trial.FirstOrDefault()?.RelevanceId,
|
||||
ImageCount = c.trial.FirstOrDefault()?.ImageCount??0,
|
||||
ImageCount = c.trial.FirstOrDefault()?.ImageCount ?? 0,
|
||||
RelevanceValue = c.trial.FirstOrDefault()?.RelevanceValue,
|
||||
ReadingQuestionCriterionTrialId = item.Id,
|
||||
Remark=c.system.Remark,
|
||||
TrialId=item.TrialId,
|
||||
Type=c.system.Type,
|
||||
Remark = c.system.Remark,
|
||||
TrialId = item.TrialId,
|
||||
Type = c.system.Type,
|
||||
|
||||
TypeValue=c.system.TypeValue,
|
||||
TypeValue = c.system.TypeValue,
|
||||
}).ToList();
|
||||
var copydata = needAddQuestionList.Clone();
|
||||
needAddQuestionList.ForEach(x =>
|
||||
|
@ -926,8 +931,9 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
if (indto.Id != null)
|
||||
{
|
||||
await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x => x.ReadingQuestionCriterionSystemId == indto.Id, x => new ReadingQuestionCriterionTrial() {
|
||||
CriterionName=indto.CriterionName
|
||||
await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x => x.ReadingQuestionCriterionSystemId == indto.Id, x => new ReadingQuestionCriterionTrial()
|
||||
{
|
||||
CriterionName = indto.CriterionName
|
||||
|
||||
});
|
||||
}
|
||||
|
@ -1010,7 +1016,7 @@ namespace IRaCIS.Application.Services
|
|||
//}
|
||||
}
|
||||
|
||||
if (await _readingQuestionSystemRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder&&x.ReadingQuestionCriterionSystemId==indto.ReadingQuestionCriterionSystemId))
|
||||
if (await _readingQuestionSystemRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder && x.ReadingQuestionCriterionSystemId == indto.ReadingQuestionCriterionSystemId))
|
||||
{
|
||||
throw new BusinessValidationFailedException("问题编号重复");
|
||||
}
|
||||
|
@ -1026,7 +1032,7 @@ namespace IRaCIS.Application.Services
|
|||
public async Task<PageOutput<ReadingQuestionSystemView>> GetReadingQuestionSystemList(ReadingQuestionSystemViewInDto inDto)
|
||||
{
|
||||
var query = _readingQuestionSystemRepository.AsQueryable()
|
||||
.Where(x=>x.ReadingQuestionCriterionSystemId==inDto.ReadingQuestionCriterionSystemId)
|
||||
.Where(x => x.ReadingQuestionCriterionSystemId == inDto.ReadingQuestionCriterionSystemId)
|
||||
.WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName))
|
||||
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type.Contains(inDto.Type))
|
||||
.ProjectTo<ReadingQuestionSystemView>(_mapper.ConfigurationProvider);
|
||||
|
@ -1046,14 +1052,14 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
"select","radio"
|
||||
};
|
||||
var questionList =await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.ReadingQuestionCriterionSystemId)
|
||||
.Where(x=> types.Contains(x.Type))
|
||||
.WhereIf(inDto.Id != null, x => x.Id != inDto.Id&&x.ParentId!= inDto.Id)
|
||||
var questionList = await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.ReadingQuestionCriterionSystemId)
|
||||
.Where(x => types.Contains(x.Type))
|
||||
.WhereIf(inDto.Id != null, x => x.Id != inDto.Id && x.ParentId != inDto.Id)
|
||||
.Select(x => new CriterionOtherQuestionOutDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
QuestionName = x.QuestionName,
|
||||
TypeValue=x.TypeValue,
|
||||
TypeValue = x.TypeValue,
|
||||
GroupName = x.GroupName,
|
||||
}).ToListAsync();
|
||||
|
||||
|
@ -1086,9 +1092,9 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
var trialUsrSystemIds = _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == trialId && x.ReadingQuestionCriterionSystemId != null)
|
||||
.Select(x => x.ReadingQuestionCriterionSystemId);
|
||||
var trialCriterionNames= _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == trialId)
|
||||
var trialCriterionNames = _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == trialId)
|
||||
.Select(x => x.CriterionName);
|
||||
List<ReadingQuestionCriterionTrial> needAddCriterionList = await _readingQuestionCriterionSystemRepository.Where(x => !trialUsrSystemIds.Contains(x.Id)&&x.IsEnable&& !trialCriterionNames.Contains(x.CriterionName)).ProjectTo<ReadingQuestionCriterionTrial>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
List<ReadingQuestionCriterionTrial> needAddCriterionList = await _readingQuestionCriterionSystemRepository.Where(x => !trialUsrSystemIds.Contains(x.Id) && x.IsEnable && !trialCriterionNames.Contains(x.CriterionName)).ProjectTo<ReadingQuestionCriterionTrial>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
List<ReadingQuestionTrial> needAddQuestionList = new List<ReadingQuestionTrial>();
|
||||
needAddCriterionList.ForEach(x =>
|
||||
|
@ -1114,7 +1120,7 @@ namespace IRaCIS.Application.Services
|
|||
/// <param name="trialId">项目Id</param>
|
||||
/// <param name="systemQuesitonList">系统问题</param>
|
||||
/// <param name="needQuestionList">需要添加list</param>
|
||||
private void SetChildParentQuestion(Guid ReadingQuestionCriterionTrialId, Guid trialId, List<ReadingQuestionSystem> systemQuesitonList,List<ReadingQuestionTrial> needQuestionList)
|
||||
private void SetChildParentQuestion(Guid ReadingQuestionCriterionTrialId, Guid trialId, List<ReadingQuestionSystem> systemQuesitonList, List<ReadingQuestionTrial> needQuestionList)
|
||||
{
|
||||
var parentIdIsNullList = systemQuesitonList.Where(x => x.ParentId == null).ToList();
|
||||
parentIdIsNullList.ForEach(x =>
|
||||
|
@ -1131,14 +1137,14 @@ namespace IRaCIS.Application.Services
|
|||
ParentTriggerValue = quesiton.ParentTriggerValue,
|
||||
QuestionName = quesiton.QuestionName,
|
||||
ReadingQuestionCriterionTrialId = ReadingQuestionCriterionTrialId,
|
||||
ReadingQuestionSystemId= quesiton.Id,
|
||||
SystemParentId=quesiton.ParentId,
|
||||
ReadingQuestionSystemId = quesiton.Id,
|
||||
SystemParentId = quesiton.ParentId,
|
||||
TrialId = trialId,
|
||||
AnswerGroup = string.Empty,
|
||||
Type = quesiton.Type,
|
||||
GroupName=quesiton.GroupName,
|
||||
IsJudgeQuestion =quesiton.IsJudgeQuestion,
|
||||
Remark=quesiton.Remark,
|
||||
GroupName = quesiton.GroupName,
|
||||
IsJudgeQuestion = quesiton.IsJudgeQuestion,
|
||||
Remark = quesiton.Remark,
|
||||
TypeValue = quesiton.TypeValue,
|
||||
});
|
||||
|
||||
|
@ -1155,7 +1161,7 @@ namespace IRaCIS.Application.Services
|
|||
/// <param name="newParentId"></param>
|
||||
/// <param name="systemQuesitonList"></param>
|
||||
/// <param name="needQuestionList"></param>
|
||||
private void CreateQuestionRelation(Guid ReadingQuestionCriterionTrialId, Guid trialId,Guid oldParentId,Guid newParentId, List<ReadingQuestionSystem> systemQuesitonList, List<ReadingQuestionTrial> needQuestionList)
|
||||
private void CreateQuestionRelation(Guid ReadingQuestionCriterionTrialId, Guid trialId, Guid oldParentId, Guid newParentId, List<ReadingQuestionSystem> systemQuesitonList, List<ReadingQuestionTrial> needQuestionList)
|
||||
{
|
||||
var childList = systemQuesitonList.Where(x => x.ParentId == oldParentId).ToList();
|
||||
childList.ForEach(x =>
|
||||
|
@ -1182,7 +1188,7 @@ namespace IRaCIS.Application.Services
|
|||
IsJudgeQuestion = quesiton.IsJudgeQuestion,
|
||||
Remark = quesiton.Remark,
|
||||
TypeValue = quesiton.TypeValue,
|
||||
}) ;
|
||||
});
|
||||
|
||||
CreateQuestionRelation(ReadingQuestionCriterionTrialId, trialId, oldId, newId, systemQuesitonList, needQuestionList);
|
||||
});
|
||||
|
@ -1279,7 +1285,7 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
await AddSystemDataToTrila(inDto.TrialId);
|
||||
var query = _readingQuestionCriterionTrialRepository.AsQueryable()
|
||||
.Where(x=>x.TrialId==inDto.TrialId)
|
||||
.Where(x => x.TrialId == inDto.TrialId)
|
||||
.WhereIf(!inDto.CriterionName.IsNullOrEmpty(), x => x.CriterionName.Contains(inDto.CriterionName))
|
||||
|
||||
.ProjectTo<ReadingQuestionCriterionTrialView>(_mapper.ConfigurationProvider);
|
||||
|
@ -1322,7 +1328,7 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
|
||||
|
||||
if (await _readingQuestionTrialRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder&&x.TrialId==indto.TrialId&&x.ReadingQuestionCriterionTrialId==indto.ReadingQuestionCriterionTrialId&&x.ReadingCriterionPageId==indto.ReadingCriterionPageId))
|
||||
if (await _readingQuestionTrialRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder && x.TrialId == indto.TrialId && x.ReadingQuestionCriterionTrialId == indto.ReadingQuestionCriterionTrialId && x.ReadingCriterionPageId == indto.ReadingCriterionPageId))
|
||||
{
|
||||
throw new BusinessValidationFailedException("问题编号重复");
|
||||
}
|
||||
|
@ -1341,8 +1347,8 @@ namespace IRaCIS.Application.Services
|
|||
.Where(x => x.ReadingQuestionCriterionTrialId == inDto.ReadingQuestionCriterionTrialId)
|
||||
.WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName))
|
||||
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type.Contains(inDto.Type))
|
||||
.Where(x => x.ReadingCriterionPageId==inDto.ReadingCriterionPageId)
|
||||
.ProjectTo<ReadingQuestionTrialView>(_mapper.ConfigurationProvider).OrderBy(x=>x.ShowOrder);
|
||||
.Where(x => x.ReadingCriterionPageId == inDto.ReadingCriterionPageId)
|
||||
.ProjectTo<ReadingQuestionTrialView>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder);
|
||||
return await query.ToListAsync();
|
||||
}
|
||||
|
||||
|
@ -1368,7 +1374,7 @@ namespace IRaCIS.Application.Services
|
|||
QuestionId = x.Id,
|
||||
QuestionName = x.QuestionName,
|
||||
TypeValue = x.TypeValue,
|
||||
GroupName=x.GroupName,
|
||||
GroupName = x.GroupName,
|
||||
}).ToListAsync();
|
||||
|
||||
return questionList;
|
||||
|
@ -1400,7 +1406,7 @@ namespace IRaCIS.Application.Services
|
|||
public async Task<List<string>> GetTrialGroupNameList(GetTrialGroupNameListInDto inDto)
|
||||
{
|
||||
var result = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.CriterionId && x.Type == ReadingQestionType.Group)
|
||||
.Where(x=>x.ReadingCriterionPageId==inDto.ReadingCriterionPageId)
|
||||
.Where(x => x.ReadingCriterionPageId == inDto.ReadingCriterionPageId)
|
||||
.Select(x => x.GroupName).ToListAsync();
|
||||
|
||||
return result;
|
||||
|
|
|
@ -50,6 +50,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
CreateMap<ReadModuleAddOrEdit, ReadModule>();
|
||||
|
||||
CreateMap<TumorAssessment, TumorAssessmentView>();
|
||||
|
||||
#region 阅片问题
|
||||
|
||||
// 忽略列
|
||||
|
|
|
@ -16,160 +16,6 @@ namespace IRaCIS.Core.Domain.Share
|
|||
public static readonly string Group = "group";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 整体肿瘤评估
|
||||
/// </summary>
|
||||
public enum OverallAssessment
|
||||
{
|
||||
/// <summary>
|
||||
/// CR
|
||||
/// </summary>
|
||||
CR = 0,
|
||||
|
||||
/// <summary>
|
||||
/// ND
|
||||
/// </summary>
|
||||
ND = 1,
|
||||
|
||||
/// <summary>
|
||||
/// NE
|
||||
/// </summary>
|
||||
NE = 2,
|
||||
|
||||
/// <summary>
|
||||
/// NN
|
||||
/// </summary>
|
||||
NN = 3,
|
||||
|
||||
/// <summary>
|
||||
/// PD
|
||||
/// </summary>
|
||||
PD = 4,
|
||||
|
||||
/// <summary>
|
||||
/// PR
|
||||
/// </summary>
|
||||
PR = 5,
|
||||
|
||||
/// <summary>
|
||||
/// SD
|
||||
/// </summary>
|
||||
SD = 6,
|
||||
|
||||
/// <summary>
|
||||
/// NA
|
||||
/// </summary>
|
||||
NA = 6
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新病灶评估
|
||||
/// </summary>
|
||||
public enum NewLesionAssessment
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 是
|
||||
/// </summary>
|
||||
Yes = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 疑似
|
||||
/// </summary>
|
||||
Suspected = 1,
|
||||
|
||||
/// <summary>
|
||||
/// NE
|
||||
/// </summary>
|
||||
NE = 2,
|
||||
|
||||
/// <summary>
|
||||
/// 否
|
||||
/// </summary>
|
||||
No = 3,
|
||||
|
||||
/// <summary>
|
||||
/// NA
|
||||
/// </summary>
|
||||
NA = 4
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 非靶病灶评估
|
||||
/// </summary>
|
||||
public enum NoTargetAssessment
|
||||
{
|
||||
/// <summary>
|
||||
/// PD
|
||||
/// </summary>
|
||||
PD = 0,
|
||||
|
||||
/// <summary>
|
||||
/// CR
|
||||
/// </summary>
|
||||
CR = 1,
|
||||
|
||||
/// <summary>
|
||||
/// NE
|
||||
/// </summary>
|
||||
NE = 2,
|
||||
|
||||
/// <summary>
|
||||
/// ND
|
||||
/// </summary>
|
||||
ND = 3,
|
||||
|
||||
/// <summary>
|
||||
/// NN
|
||||
/// </summary>
|
||||
NN = 4,
|
||||
|
||||
/// <summary>
|
||||
/// NA
|
||||
/// </summary>
|
||||
NA = 5
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 靶病灶评估
|
||||
/// </summary>
|
||||
public enum TargetAssessment
|
||||
{
|
||||
/// <summary>
|
||||
/// CR
|
||||
/// </summary>
|
||||
CR = 0,
|
||||
|
||||
/// <summary>
|
||||
/// PR
|
||||
/// </summary>
|
||||
PR = 1,
|
||||
|
||||
/// <summary>
|
||||
/// SD
|
||||
/// </summary>
|
||||
SD = 2,
|
||||
|
||||
/// <summary>
|
||||
/// PD
|
||||
/// </summary>
|
||||
PD = 3,
|
||||
|
||||
/// <summary>
|
||||
/// NE
|
||||
/// </summary>
|
||||
NE = 4,
|
||||
|
||||
/// <summary>
|
||||
/// ND
|
||||
/// </summary>
|
||||
ND = 5,
|
||||
|
||||
/// <summary>
|
||||
/// NA
|
||||
/// </summary>
|
||||
NA = 6
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue