diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/OrganInfoViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/OrganInfoViewModel.cs
index a7ffc86dc..540bfa910 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/OrganInfoViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/OrganInfoViewModel.cs
@@ -19,6 +19,14 @@ namespace IRaCIS.Core.Application.ViewModel
public Guid CreateUserId { get; set; }
}
+
+ public class GetCriterionLesionTypeInDto
+ {
+ public Guid CriterionId { get; set; }
+
+ public bool IsSystem { get; set; }
+ }
+
///CriterionNidusQuery 列表查询参数模型
public class CriterionNidusQuery
{
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
index f19155a4e..810f36e63 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs
@@ -443,6 +443,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 最大问题数
///
public int? MaxQuestionCount { get; set; }
+
+ ///
+ /// 病灶类型
+ ///
+ public LesionType? LesionType { get; set; }
}
public class ReadingQuestionSystemView
@@ -542,6 +547,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 最大问题数
///
public int? MaxQuestionCount { get; set; }
+
+
+ ///
+ /// 病灶类型
+ ///
+ public LesionType? LesionType { get; set; }
}
@@ -819,6 +830,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 最大问题数
///
public int? MaxQuestionCount { get; set; }
+
+ ///
+ /// 病灶类型
+ ///
+ public LesionType? LesionType { get; set; }
}
@@ -928,6 +944,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 最大问题数
///
public int? MaxQuestionCount { get; set; }
+
+ ///
+ /// 病灶类型
+ ///
+ public LesionType? LesionType { get; set; }
}
diff --git a/IRaCIS.Core.Application/Service/Reading/OrganInfoService.cs b/IRaCIS.Core.Application/Service/Reading/OrganInfoService.cs
index e64f81b9b..2581aed3b 100644
--- a/IRaCIS.Core.Application/Service/Reading/OrganInfoService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/OrganInfoService.cs
@@ -21,23 +21,51 @@ namespace IRaCIS.Core.Application.Service
{
private readonly IRepository _organInfoRepository;
+ private readonly IRepository _dictionaryRepository;
private readonly IRepository _organTrialInfoRepository;
private readonly IRepository _readingQuestionCriterionTrial;
private readonly IRepository _criterionNidusRepository;
public OrganInfoService(
IRepository organInfoRepository,
+ IRepository dictionaryRepository,
IRepository organTrialInfoRepository,
IRepository readingQuestionCriterionTrial,
IRepository criterionNidusRepository
)
{
_organInfoRepository = organInfoRepository;
+ this._dictionaryRepository = dictionaryRepository;
this._organTrialInfoRepository = organTrialInfoRepository;
this._readingQuestionCriterionTrial = readingQuestionCriterionTrial;
this._criterionNidusRepository = criterionNidusRepository;
}
+ ///
+ /// 获取标准病灶类型
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task> GetCriterionLesionType(GetCriterionLesionTypeInDto inDto)
+ {
+ var dicNums = new List();
+ if (inDto.IsSystem)
+ {
+ dicNums = await _organInfoRepository.Where(x => x.SystemCriterionId == inDto.CriterionId).Select(x => (int)x.LesionType).Distinct().ToListAsync();
+ }
+ else
+ {
+ dicNums = await _organTrialInfoRepository.Where(x => x.TrialCriterionId == inDto.CriterionId).Select(x => (int)x.LesionType).Distinct().ToListAsync();
+ }
+
+ var dictionaryId = await _dictionaryRepository.Where(x => x.Code == "LesionType").Select(x => x.Id).FirstOrDefaultAsync();
+
+ var result = await _dictionaryRepository.Where(x => x.ParentId == dictionaryId && dicNums.Contains(int.Parse(x.Code))).ToListAsync();
+
+ return result;
+ }
+
///
/// 获取标准病灶列表
///
@@ -137,6 +165,7 @@ namespace IRaCIS.Core.Application.Service
{
OrganInfoId=x,
TrialId=inDto.TrialId,
+
//OrganType=inDto.OrganType,
}).ToList();
@@ -252,6 +281,7 @@ namespace IRaCIS.Core.Application.Service
CriterionId = trialCriterionId,
LesionType = x.LesionType,
OriginalId = x.Id,
+
}).ToListAsync();
criterionNidusList.ForEach(x => x.Id = NewId.NextGuid());
@@ -264,16 +294,12 @@ namespace IRaCIS.Core.Application.Service
LesionType=x.LesionType,
Id = x.Id,
IsEnable = true,
+ TrialCriterionId= readingQuestionCriterionTrial.Id,
OrganInfoId = x.Id,
TrialId = inDto.TrialId,
}).ToListAsync();
criterionNidusList.ForEach(x => x.Id = NewId.NextGuid());
-
-
-
-
-
await _organTrialInfoRepository.AddRangeAsync(organTrialInfoList);
await _readingQuestionCriterionTrial.UpdatePartialFromQueryAsync(trialCriterionId,x=> new ReadingQuestionCriterionTrial() {
SynchronizeOriginalTime=DateTime.Now
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
index 737c2da4f..5a2c043bd 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs
@@ -51,7 +51,7 @@ namespace IRaCIS.Application.Services
IRepository readingTableQuestionTrialRepository,
IRepository readingCriterionPageRepository,
IRepository trialRepository,
- IRepository organInfoRepository,
+ IRepository organInfoRepository,
IRepository readingTableQuestionSystemRepository,
IRepository readingTaskQuestionAnswer,
IRepository previousPDFRepository
@@ -74,8 +74,11 @@ namespace IRaCIS.Application.Services
this._previousPDFRepository = previousPDFRepository;
}
+
+
+
///
- /// 赋值一个系统标准到另一系统标准
+ /// 复制一个系统标准到另一系统标准
///
///
///
diff --git a/IRaCIS.Core.Domain/Reading/OrganTrialInfo.cs b/IRaCIS.Core.Domain/Reading/OrganTrialInfo.cs
index 5bdae8412..ec26b74c9 100644
--- a/IRaCIS.Core.Domain/Reading/OrganTrialInfo.cs
+++ b/IRaCIS.Core.Domain/Reading/OrganTrialInfo.cs
@@ -44,6 +44,14 @@ namespace IRaCIS.Core.Domain.Models
///
public LesionType LesionType { get; set; }
+ ///
+ /// 标准Id
+ ///
+ public Guid TrialCriterionId { get; set; }
+
+ [ForeignKey("OrganInfoId")]
+ public OrganInfo OrganInfo { get; set; }
+
}
diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs
index 75458f9fa..ffb7032aa 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionSystem.cs
@@ -104,6 +104,11 @@ namespace IRaCIS.Core.Domain.Models
///
public int? MaxQuestionCount { get; set; }
+ ///
+ /// 病灶类型
+ ///
+ public LesionType? LesionType { get; set; }
+
///
/// 创建人
///
diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs
index 5046cb364..6f6f64a05 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs
@@ -67,6 +67,11 @@ namespace IRaCIS.Core.Domain.Models
///
public bool IsJudgeQuestion { get; set; }
+ ///
+ /// 病灶类型
+ ///
+ public LesionType? LesionType { get; set; }
+
///
/// 备注
///