diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs index 1ace82f10..b03219547 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs @@ -8,6 +8,41 @@ using System.Threading.Tasks; namespace IRaCIS.Core.Application.Service.Reading.Dto { + 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; } + } public class CopySystemCriterionDataInDto { public Guid SourceSystemCriterionId { get; set; } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs index 2545df75a..fbd584c7e 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTaskService.cs @@ -110,19 +110,6 @@ namespace IRaCIS.Application.Services } - #region 疗效对照表 - - /// - /// 获取疗效对照 - /// - /// - [HttpPost] - public async Task> GetTumorAssessmentList() - { - return await _tumorAssessmentRepository.AsQueryable().ToListAsync(); - } - - #endregion #region 表格问题相关 diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs index 88cb60258..c6f8b494b 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs @@ -34,6 +34,7 @@ namespace IRaCIS.Application.Services private readonly IRepository _readingTableQuestionTrialRepository; private readonly IRepository _readingCriterionPageRepository; private readonly IRepository _trialRepository; + private readonly IRepository _tumorAssessmentRepository; private readonly IRepository _organInfoRepository; private readonly IRepository _readingTableQuestionSystemRepository; private readonly IRepository _readingTaskQuestionAnswer; @@ -51,6 +52,7 @@ namespace IRaCIS.Application.Services IRepository readingTableQuestionTrialRepository, IRepository readingCriterionPageRepository, IRepository trialRepository, + IRepository tumorAssessmentRepository, IRepository organInfoRepository, IRepository readingTableQuestionSystemRepository, IRepository readingTaskQuestionAnswer, @@ -68,6 +70,7 @@ namespace IRaCIS.Application.Services this._readingTableQuestionTrialRepository = readingTableQuestionTrialRepository; this._readingCriterionPageRepository = readingCriterionPageRepository; this._trialRepository = trialRepository; + this._tumorAssessmentRepository = tumorAssessmentRepository; this._organInfoRepository = organInfoRepository; this._readingTableQuestionSystemRepository = readingTableQuestionSystemRepository; this._readingTaskQuestionAnswer = readingTaskQuestionAnswer; @@ -76,6 +79,49 @@ namespace IRaCIS.Application.Services + #region 疗效对照表 + + /// + /// 获取疗效对照 + /// + /// + [HttpPost] + public async Task> GetTumorAssessmentList(GetTumorAssessmentListInDto inDto) + { + return await _tumorAssessmentRepository.Where(x=>x.CriterionId==inDto.CriterionId).ToListAsync(); + } + + + /// + /// 新增修改疗效对照 + /// + /// + /// + [HttpPost] + public async Task AddOrUpdateTumorAssessment(AddOrUpdateTumorAssessmentInDto indto) + { + + var entity = await _tumorAssessmentRepository.InsertOrUpdateAsync(indto, true); + + return ResponseOutput.Ok(entity.Id.ToString()); + + } + + /// + /// 删除疗效对照 + /// + /// + /// + [HttpDelete("{Id:guid}")] + public async Task DeleteTumorAssessment(Guid Id) + { + await _tumorAssessmentRepository.DeleteFromQueryAsync(t => t.Id == Id); + var success = await _tumorAssessmentRepository.SaveChangesAsync(); + return ResponseOutput.Result(success); + } + + #endregion + /// /// 复制一个系统标准到另一系统标准 diff --git a/IRaCIS.Core.Domain/Reading/TumorAssessment.cs b/IRaCIS.Core.Domain/Reading/TumorAssessment.cs index 8b7f86b39..67e85dc0f 100644 --- a/IRaCIS.Core.Domain/Reading/TumorAssessment.cs +++ b/IRaCIS.Core.Domain/Reading/TumorAssessment.cs @@ -16,8 +16,6 @@ namespace IRaCIS.Core.Domain.Models public class TumorAssessment : Entity { - - /// /// 靶病灶 /// @@ -37,7 +35,12 @@ namespace IRaCIS.Core.Domain.Models /// 整体疗效 /// public string OverallEfficacy { get; set; } - - } + + /// + /// 标准ID + /// + public Guid CriterionId { get; set; } + + } }