diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
index 746c650d1..1fcc9580d 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
@@ -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; }
- ///
- /// 靶病灶
- ///
- public string TargetLesion { get; set; }
-
- ///
- /// 非靶病灶
- ///
- public string NonTargetLesions { get; set; }
-
- ///
- /// 新病灶
- ///
- public string NewLesion { get; set; }
-
- ///
- /// 整体疗效
- ///
- public string OverallEfficacy { get; set; }
-
///
/// 标准ID
///
public Guid CriterionId { get; set; }
- }
-
- public class GetTumorAssessmentListInDto
- {
- public Guid CriterionId { get; set; }
///
/// 靶病灶
@@ -62,6 +44,32 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 整体疗效
///
public OverallAssessment OverallEfficacy { get; set; }
+
+ }
+
+ public class GetTumorAssessmentListInDto
+ {
+ public Guid CriterionId { get; set; }
+
+ ///
+ /// 靶病灶
+ ///
+ public TargetAssessment? TargetLesion { get; set; }
+
+ ///
+ /// 非靶病灶
+ ///
+ public NoTargetAssessment? NonTargetLesions { get; set; }
+
+ ///
+ /// 新病灶
+ ///
+ public NewLesionAssessment? NewLesion { get; set; }
+
+ ///
+ /// 整体疗效
+ ///
+ public OverallAssessment? OverallEfficacy { get; set; }
}
public class CopySystemCriterionDataInDto
{
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
index 21e2ba99b..abd2d588b 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
@@ -86,15 +86,15 @@ namespace IRaCIS.Application.Services
///
///
[HttpPost]
- public async Task> GetTumorAssessmentList(GetTumorAssessmentListInDto inDto)
+ public async Task> 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(_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;
});
@@ -209,7 +210,7 @@ namespace IRaCIS.Application.Services
}
-
+
await _readingTableQuestionSystemRepository.SaveChangesAsync();
return ResponseOutput.Ok();
@@ -225,8 +226,8 @@ namespace IRaCIS.Application.Services
List 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> GetReadingTableQuestionSystemList(ReadingTableQuestionSystemQuery inDto)
{
var readingTableQuestionSystemQueryable = _readingTableQuestionSystemRepository
- .WhereIf(inDto.TableQuestionType!=null,x=>x.TableQuestionType ==inDto.TableQuestionType!)
- .Where(x=>x.ReadingQuestionId==inDto.ReadingQuestionId).ProjectTo(_mapper.ConfigurationProvider);
+ .WhereIf(inDto.TableQuestionType != null, x => x.TableQuestionType == inDto.TableQuestionType!)
+ .Where(x => x.ReadingQuestionId == inDto.ReadingQuestionId).ProjectTo(_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(_mapper.ConfigurationProvider);
- var result = await readingTableQuestionSystemQueryable.OrderBy(x=>x.ShowOrder).ToListAsync();
+ var result = await readingTableQuestionSystemQueryable.OrderBy(x => x.ShowOrder).ToListAsync();
return result;
}
@@ -277,9 +278,9 @@ namespace IRaCIS.Application.Services
[HttpPost]
public async Task AddOrUpdateReadingTableQuestionSystem(ReadingTableQuestionSystemAddOrEdit addOrEditReadingTableQuestionSystem)
{
-
+
var entity = await _readingTableQuestionSystemRepository.InsertOrUpdateAsync(addOrEditReadingTableQuestionSystem, true);
-
+
return ResponseOutput.Ok(entity.Id.ToString());
}
@@ -327,13 +328,13 @@ namespace IRaCIS.Application.Services
[HttpDelete("{Id:guid}")]
public async Task 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 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;
@@ -470,7 +471,7 @@ namespace IRaCIS.Application.Services
{
return NeedSynchronize.NotNeed;
}
-
+
}
else
{
@@ -485,7 +486,7 @@ namespace IRaCIS.Application.Services
///
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(_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();
@@ -538,7 +540,7 @@ namespace IRaCIS.Application.Services
question.RelevanceId = copyNewQuestionList.Where(y => x.RelevanceId == y.ReadingQuestionSystemId).Select(y => y.Id).FirstOrDefault();
}
-
+
needAddDatas.Add(question);
@@ -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(_mapper.ConfigurationProvider).ToListAsync();
- newTrialTableQuestionList.ForEach(x => {
+ newTrialTableQuestionList.ForEach(x =>
+ {
x.Id = NewId.NextGuid();
});
@@ -603,7 +606,7 @@ namespace IRaCIS.Application.Services
await _readingQuestionTrialRepository.SaveChangesAsync();
}
}
-
+
}
@@ -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
@@ -677,7 +680,7 @@ namespace IRaCIS.Application.Services
var query = _readingQuestionCriterionSystemRepository.AsQueryable()
.WhereIf(!inDto.CriterionName.IsNullOrEmpty(), x => x.CriterionName.Contains(inDto.CriterionName))
.ProjectTo(_mapper.ConfigurationProvider);
-
+
return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField.IsNullOrEmpty() ? nameof(ReadingQuestionCriterionSystemView.ShowOrder) : inDto.SortField,
inDto.Asc);
}
@@ -691,12 +694,12 @@ namespace IRaCIS.Application.Services
public async Task> GetSystemCriterionSelectList()
{
var criterionList = await _readingQuestionCriterionSystemRepository.AsQueryable()
- .OrderBy(x=>x.ShowOrder)
+ .OrderBy(x => x.ShowOrder)
.Select(x => new GetSystemCriterionSelectDto()
{
Id = x.Id,
CriterionName = x.CriterionName,
-
+
}).ToListAsync();
return criterionList;
}
@@ -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,16 +760,16 @@ namespace IRaCIS.Application.Services
await _readingQuestionCriterionSystemRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new ReadingQuestionCriterionSystem()
{
IsCompleteConfig = inDto.IsCompleteConfig,
- ConfirmTime= confirmTime,
+ ConfirmTime = confirmTime,
});
if (inDto.IsCompleteConfig)
{
- //await SynchronizeSystemCriterion(inDto.Id);
+ //await SynchronizeSystemCriterion(inDto.Id);
}
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,9 +791,10 @@ 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 {
- x.Id,
- x.TrialId,
+ var trialCriterionList = await _readingQuestionCriterionTrialRepository.Where(x => x.ReadingQuestionCriterionSystemId == systemCriterionId).Select(x => new
+ {
+ x.Id,
+ x.TrialId,
}).ToListAsync();
var trialCriterionIdList = trialCriterionList.Select(x => x.Id).ToList();
List needAddQuestionList = new List();
@@ -812,14 +816,15 @@ namespace IRaCIS.Application.Services
///
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,
@@ -845,46 +850,46 @@ namespace IRaCIS.Application.Services
var query = systemQuestionList.GroupJoin(thisTrialQuestions, a => a.Id, b => b.ReadingQuestionSystemId, (a, b) => new
{
- a,
- trialQuestion = b
+ a,
+ 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
- {
- 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,
- ParentId = c.trial.FirstOrDefault()?.ParentId,
- ParentTriggerValue=c.system.ParentTriggerValue,
- QuestionName=c.system.QuestionName,
- ReadingCriterionPageId=c.trial.FirstOrDefault()?.ReadingCriterionPageId,
- RelevanceId = c.trial.FirstOrDefault()?.RelevanceId,
- 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,
-
- TypeValue=c.system.TypeValue,
- }).ToList();
- var copydata = needAddQuestionList.Clone();
+ 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
+ {
+ 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,
+ ParentId = c.trial.FirstOrDefault()?.ParentId,
+ ParentTriggerValue = c.system.ParentTriggerValue,
+ QuestionName = c.system.QuestionName,
+ ReadingCriterionPageId = c.trial.FirstOrDefault()?.ReadingCriterionPageId,
+ RelevanceId = c.trial.FirstOrDefault()?.RelevanceId,
+ 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,
+
+ TypeValue = c.system.TypeValue,
+ }).ToList();
+ var copydata = needAddQuestionList.Clone();
needAddQuestionList.ForEach(x =>
{
if (x.SystemParentId == null)
@@ -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> 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(_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,10 +1092,10 @@ 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 needAddCriterionList = await _readingQuestionCriterionSystemRepository.Where(x => !trialUsrSystemIds.Contains(x.Id)&&x.IsEnable&& !trialCriterionNames.Contains(x.CriterionName)).ProjectTo(_mapper.ConfigurationProvider).ToListAsync();
-
+ List needAddCriterionList = await _readingQuestionCriterionSystemRepository.Where(x => !trialUsrSystemIds.Contains(x.Id) && x.IsEnable && !trialCriterionNames.Contains(x.CriterionName)).ProjectTo(_mapper.ConfigurationProvider).ToListAsync();
+
List needAddQuestionList = new List();
needAddCriterionList.ForEach(x =>
{
@@ -1114,7 +1120,7 @@ namespace IRaCIS.Application.Services
/// 项目Id
/// 系统问题
/// 需要添加list
- private void SetChildParentQuestion(Guid ReadingQuestionCriterionTrialId, Guid trialId, List systemQuesitonList,List needQuestionList)
+ private void SetChildParentQuestion(Guid ReadingQuestionCriterionTrialId, Guid trialId, List systemQuesitonList, List 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
///
///
///
- private void CreateQuestionRelation(Guid ReadingQuestionCriterionTrialId, Guid trialId,Guid oldParentId,Guid newParentId, List systemQuesitonList, List needQuestionList)
+ private void CreateQuestionRelation(Guid ReadingQuestionCriterionTrialId, Guid trialId, Guid oldParentId, Guid newParentId, List systemQuesitonList, List 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,9 +1285,9 @@ 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(_mapper.ConfigurationProvider);
return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField.IsNullOrEmpty() ? nameof(ReadingQuestionCriterionTrialView.ShowOrder) : inDto.SortField,
inDto.Asc);
@@ -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(_mapper.ConfigurationProvider).OrderBy(x=>x.ShowOrder);
+ .Where(x => x.ReadingCriterionPageId == inDto.ReadingCriterionPageId)
+ .ProjectTo(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder);
return await query.ToListAsync();
}
@@ -1362,13 +1368,13 @@ namespace IRaCIS.Application.Services
.Where(x => types.Contains(x.Type))
.WhereIf(inDto.Id != null, x => x.Id != inDto.Id && x.ParentId != inDto.Id)
.Where(x => x.ReadingCriterionPageId == inDto.ReadingCriterionPageId)
-
+
.Select(x => new CriterionOtherQuestionOutDto()
{
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> 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;
diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
index d36fb4ef5..45fd6ee5e 100644
--- a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
+++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
@@ -50,6 +50,8 @@ namespace IRaCIS.Core.Application.Service
CreateMap();
+ CreateMap();
+
#region 阅片问题
// 忽略列
diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
index 45f5b6717..d4bb36ea0 100644
--- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
+++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
@@ -16,160 +16,6 @@ namespace IRaCIS.Core.Domain.Share
public static readonly string Group = "group";
}
- ///
- /// 整体肿瘤评估
- ///
- public enum OverallAssessment
- {
- ///
- /// CR
- ///
- CR = 0,
-
- ///
- /// ND
- ///
- ND = 1,
-
- ///
- /// NE
- ///
- NE = 2,
-
- ///
- /// NN
- ///
- NN = 3,
-
- ///
- /// PD
- ///
- PD = 4,
-
- ///
- /// PR
- ///
- PR = 5,
-
- ///
- /// SD
- ///
- SD = 6,
-
- ///
- /// NA
- ///
- NA = 6
- }
-
- ///
- /// 新病灶评估
- ///
- public enum NewLesionAssessment
- {
-
- ///
- /// 是
- ///
- Yes = 0,
-
- ///
- /// 疑似
- ///
- Suspected = 1,
-
- ///
- /// NE
- ///
- NE = 2,
-
- ///
- /// 否
- ///
- No = 3,
-
- ///
- /// NA
- ///
- NA = 4
- }
-
- ///
- /// 非靶病灶评估
- ///
- public enum NoTargetAssessment
- {
- ///
- /// PD
- ///
- PD = 0,
-
- ///
- /// CR
- ///
- CR = 1,
-
- ///
- /// NE
- ///
- NE = 2,
-
- ///
- /// ND
- ///
- ND = 3,
-
- ///
- /// NN
- ///
- NN = 4,
-
- ///
- /// NA
- ///
- NA = 5
- }
-
- ///
- /// 靶病灶评估
- ///
- public enum TargetAssessment
- {
- ///
- /// CR
- ///
- CR = 0,
-
- ///
- /// PR
- ///
- PR = 1,
-
- ///
- /// SD
- ///
- SD = 2,
-
- ///
- /// PD
- ///
- PD = 3,
-
- ///
- /// NE
- ///
- NE = 4,
-
- ///
- /// ND
- ///
- ND = 5,
-
- ///
- /// NA
- ///
- NA = 6
- }
///