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 ba791cea0..a3b19fcf6 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -45,6 +45,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; @@ -84,6 +85,7 @@ namespace IRaCIS.Application.Services IRepository organInfoRepository, IRepository trialDocumentRepository, IRepository userRepository, + IRepository readingCustomTagRepository, IMemoryCache cache, IRepository readingCriterionDictionaryRepository, IRepository readingTrialCriterionDictionaryRepository, @@ -121,6 +123,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; @@ -138,6 +141,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 1919f105d..47aff4eb7 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 344cd1c73..9d2f16f52 100644 --- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs +++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs @@ -216,6 +216,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; } diff --git a/IRaCIS.Core.Test/DbHelper.ttinclude b/IRaCIS.Core.Test/DbHelper.ttinclude index b0b701547..415c2a1c0 100644 --- a/IRaCIS.Core.Test/DbHelper.ttinclude +++ b/IRaCIS.Core.Test/DbHelper.ttinclude @@ -4,7 +4,7 @@ public static readonly string ConnectionString = "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true"; public static readonly string DbDatabase = "IRaCIS_New_Tet"; //ַ,ƴ - public static readonly string TableName = "ReadModuleCriterionFrom"; + public static readonly string TableName = "ReadingCustomTag"; //ļ service Ƿҳ } #>