From 2e84fb8063f9d1371e749bd97a5fd1a550f731c0 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Mon, 31 Jul 2023 11:44:54 +0800 Subject: [PATCH] =?UTF-8?q?S-101=20=E8=87=AA=E5=AE=9A=E4=B9=89=E6=A0=87?= =?UTF-8?q?=E8=AE=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/Dto/ReadingImageTaskViewModel.cs | 48 ++++++++++++++++ .../ReadingImageTaskService.cs | 40 +++++++++++++ .../Service/Reading/_MapConfig.cs | 5 +- .../ReadingFormAnswer/ReadingCustomTag.cs | 56 +++++++++++++++++++ .../Context/IRaCISDBContext.cs | 1 + 5 files changed, 149 insertions(+), 1 deletion(-) create mode 100644 IRaCIS.Core.Domain/Reading/ReadingFormAnswer/ReadingCustomTag.cs diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs index 74b2d2297..60cc90cc6 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs @@ -332,6 +332,54 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public List AnswerList { get; set; } = new List(); } + public class GetCustomTagInDto + { + /// + /// 任务Id + /// + public Guid VisitTaskId { get; set; } + } + + public class ReadingCustomTagDto + { + public Guid? Id { get; set; } + + /// + /// 任务Id + /// + public Guid VisitTaskId { get; set; } + + /// + /// StudyId + /// + public Guid? StudyId { get; set; } + + /// + /// SeriesId + /// + public Guid? SeriesId { get; set; } + + /// + /// InstanceId + /// + public Guid? InstanceId { get; set; } + + /// + /// MeasureData + /// + public string MeasureData { get; set; } + + /// + /// CreateTime + /// + public DateTime CreateTime { get; set; } + + /// + /// CreateUserId + /// + public Guid CreateUserId { get; set; } + } + public class GetManualListInDto { public Guid TrialId { get; set; } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index ca805601f..e005c4d1e 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -47,6 +47,7 @@ namespace IRaCIS.Application.Services private readonly IRepository _organInfoRepository; private readonly IRepository _trialDocumentRepository; private readonly IRepository _userRepository; + private readonly IRepository _readingCustomTagRepository; private readonly IRepository _readingCriterionDictionaryRepository; private readonly IRepository _readingTrialCriterionDictionaryRepository; private readonly IRepository _tumorAssessmentRepository; @@ -86,6 +87,7 @@ namespace IRaCIS.Application.Services IRepository organInfoRepository, IRepository trialDocumentRepository, IRepository userRepository, + IRepository readingCustomTagRepository, IMemoryCache cache, IRepository readingCriterionDictionaryRepository, IRepository readingTrialCriterionDictionaryRepository, @@ -125,6 +127,7 @@ namespace IRaCIS.Application.Services this._organInfoRepository = organInfoRepository; this._trialDocumentRepository = trialDocumentRepository; this._userRepository = userRepository; + this._readingCustomTagRepository = readingCustomTagRepository; this._readingCriterionDictionaryRepository = readingCriterionDictionaryRepository; this._tumorAssessmentRepository = tumorAssessmentRepository; this._readingTableAnswerRowInfoRepository = readingTableAnswerRowInfoRepository; @@ -142,6 +145,43 @@ namespace IRaCIS.Application.Services this._trialEmailNoticeConfigService = trialEmailNoticeConfigService; } + /// + /// 提交自定义标记 + /// + /// + /// + [HttpPost] + public async Task SubmitCustomTag(ReadingCustomTagDto inDto) + { + var entity = await _readingCustomTagRepository.InsertOrUpdateAsync(inDto, true); + return ResponseOutput.Ok(entity.Id.ToString()); + } + + /// + /// 删除自定义标记 + /// + /// + /// + [HttpPost("{id:guid}")] + public async Task DeleteCustomTag(Guid id) + { + var success = await _readingCustomTagRepository.DeleteFromQueryAsync(t => t.Id == id, true); + return ResponseOutput.Ok(); + } + + + /// + /// 获取项目临床问题 + /// + /// + /// + [HttpPost] + public async Task> GetCustomTag(GetCustomTagInDto inQuery) + { + var result= await _readingCustomTagRepository.Where(x => x.VisitTaskId == inQuery.VisitTaskId).ProjectTo(_mapper.ConfigurationProvider).ToListAsync(); + return result; + } + /// /// 获取手册 /// diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs index dca2943b3..1cc0def3a 100644 --- a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs @@ -59,7 +59,10 @@ namespace IRaCIS.Core.Application.Service CreateMap(); - CreateMap(); + CreateMap(); + CreateMap(); + + CreateMap(); CreateMap().ReverseMap(); CreateMap(); diff --git a/IRaCIS.Core.Domain/Reading/ReadingFormAnswer/ReadingCustomTag.cs b/IRaCIS.Core.Domain/Reading/ReadingFormAnswer/ReadingCustomTag.cs new file mode 100644 index 000000000..1409e8f3f --- /dev/null +++ b/IRaCIS.Core.Domain/Reading/ReadingFormAnswer/ReadingCustomTag.cs @@ -0,0 +1,56 @@ + +//-------------------------------------------------------------------- +// 此代码由T4模板自动生成 byzhouhang 20210918 +// 生成时间 2023-07-31 11:12:15 +// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。 +using System; +using IRaCIS.Core.Domain.Share; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +namespace IRaCIS.Core.Domain.Models +{ + /// + ///ReadingCustomTag + /// + [Table("ReadingCustomTag")] + public class ReadingCustomTag : Entity, IAuditAdd + { + /// + /// 任务Id + /// + public Guid VisitTaskId { get; set; } + + /// + /// StudyId + /// + public Guid? StudyId { get; set; } + + /// + /// SeriesId + /// + public Guid? SeriesId { get; set; } + + /// + /// InstanceId + /// + public Guid? InstanceId { get; set; } + + /// + /// MeasureData + /// + public string MeasureData { get; set; } + + /// + /// CreateTime + /// + public DateTime CreateTime { get; set; } + + /// + /// CreateUserId + /// + public Guid CreateUserId { get; set; } + + } + + +} diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs index 48b04a03b..f80297fd3 100644 --- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs +++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs @@ -196,6 +196,7 @@ namespace IRaCIS.Core.Infra.EFCore #region Reading public virtual DbSet TrialCriterionDictionaryCode { get; set; } + public virtual DbSet ReadingCustomTag { get; set; } public virtual DbSet SystemCriterionDictionaryCode { get; set; } public virtual DbSet ReadingTaskRelation { get; set; } public virtual DbSet OrganInfo { get; set; }