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<AdditionalQuestionAnswer> AnswerList { get; set; } = new List<AdditionalQuestionAnswer>(); } + public class GetCustomTagInDto + { + /// <summary> + /// 任务Id + /// </summary> + public Guid VisitTaskId { get; set; } + } + + public class ReadingCustomTagDto + { + public Guid? Id { get; set; } + + /// <summary> + /// 任务Id + /// </summary> + public Guid VisitTaskId { get; set; } + + /// <summary> + /// StudyId + /// </summary> + public Guid? StudyId { get; set; } + + /// <summary> + /// SeriesId + /// </summary> + public Guid? SeriesId { get; set; } + + /// <summary> + /// InstanceId + /// </summary> + public Guid? InstanceId { get; set; } + + /// <summary> + /// MeasureData + /// </summary> + public string MeasureData { get; set; } + + /// <summary> + /// CreateTime + /// </summary> + public DateTime CreateTime { get; set; } + + /// <summary> + /// CreateUserId + /// </summary> + 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<OrganInfo> _organInfoRepository; private readonly IRepository<TrialDocument> _trialDocumentRepository; private readonly IRepository<User> _userRepository; + private readonly IRepository<ReadingCustomTag> _readingCustomTagRepository; private readonly IRepository<ReadingSystemCriterionDictionary> _readingCriterionDictionaryRepository; private readonly IRepository<ReadingTrialCriterionDictionary> _readingTrialCriterionDictionaryRepository; private readonly IRepository<TumorAssessment_RECIST1Point1> _tumorAssessmentRepository; @@ -86,6 +87,7 @@ namespace IRaCIS.Application.Services IRepository<OrganInfo> organInfoRepository, IRepository<TrialDocument> trialDocumentRepository, IRepository<User> userRepository, + IRepository<ReadingCustomTag> readingCustomTagRepository, IMemoryCache cache, IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository, IRepository<ReadingTrialCriterionDictionary> 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; } + /// <summary> + /// 提交自定义标记 + /// </summary> + /// <param name="inDto"></param> + /// <returns></returns> + [HttpPost] + public async Task<IResponseOutput> SubmitCustomTag(ReadingCustomTagDto inDto) + { + var entity = await _readingCustomTagRepository.InsertOrUpdateAsync(inDto, true); + return ResponseOutput.Ok(entity.Id.ToString()); + } + + /// <summary> + /// 删除自定义标记 + /// </summary> + /// <param name="id"></param> + /// <returns></returns> + [HttpPost("{id:guid}")] + public async Task<IResponseOutput> DeleteCustomTag(Guid id) + { + var success = await _readingCustomTagRepository.DeleteFromQueryAsync(t => t.Id == id, true); + return ResponseOutput.Ok(); + } + + + /// <summary> + /// 获取项目临床问题 + /// </summary> + /// <param name="inQuery"></param> + /// <returns></returns> + [HttpPost] + public async Task<List<ReadingCustomTagDto>> GetCustomTag(GetCustomTagInDto inQuery) + { + var result= await _readingCustomTagRepository.Where(x => x.VisitTaskId == inQuery.VisitTaskId).ProjectTo<ReadingCustomTagDto>(_mapper.ConfigurationProvider).ToListAsync(); + return result; + } + /// <summary> /// 获取手册 /// </summary> 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<ShortcutKey, DefaultShortcutKeyView>(); - CreateMap<UserWLTemplate, UserWLTemplateView>(); + CreateMap<ReadingCustomTag, ReadingCustomTagDto>(); + CreateMap<ReadingCustomTagDto, ReadingCustomTag>(); + + CreateMap<UserWLTemplate, UserWLTemplateView>(); CreateMap<UserWLTemplate,UserWLTemplateAddOrEdit>().ReverseMap(); CreateMap<ReadingPeriodSetAddOrEdit, ReadingPeriodSet>(); 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 +{ + ///<summary> + ///ReadingCustomTag + ///</summary> + [Table("ReadingCustomTag")] + public class ReadingCustomTag : Entity, IAuditAdd + { + /// <summary> + /// 任务Id + /// </summary> + public Guid VisitTaskId { get; set; } + + /// <summary> + /// StudyId + /// </summary> + public Guid? StudyId { get; set; } + + /// <summary> + /// SeriesId + /// </summary> + public Guid? SeriesId { get; set; } + + /// <summary> + /// InstanceId + /// </summary> + public Guid? InstanceId { get; set; } + + /// <summary> + /// MeasureData + /// </summary> + public string MeasureData { get; set; } + + /// <summary> + /// CreateTime + /// </summary> + public DateTime CreateTime { get; set; } + + /// <summary> + /// CreateUserId + /// </summary> + 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> TrialCriterionDictionaryCode { get; set; } + public virtual DbSet<ReadingCustomTag> ReadingCustomTag { get; set; } public virtual DbSet<SystemCriterionDictionaryCode> SystemCriterionDictionaryCode { get; set; } public virtual DbSet<ReadingTaskRelation> ReadingTaskRelation { get; set; } public virtual DbSet<OrganInfo> OrganInfo { get; set; }