diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 097325b62..5fd42050b 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -4061,6 +4061,46 @@ 序号标记 + + + 任务Id + + + + + 任务Id + + + + + StudyId + + + + + SeriesId + + + + + InstanceId + + + + + MeasureData + + + + + CreateTime + + + + + CreateUserId + + Name @@ -11615,6 +11655,27 @@ + + + 提交自定义标记 + + + + + + + 删除自定义标记 + + + + + + + 获取自定义标记 + + + + 获取手册 diff --git a/IRaCIS.Core.Application/Service/Reading/ClinicalData/ClinicalAnswerService.cs b/IRaCIS.Core.Application/Service/Reading/ClinicalData/ClinicalAnswerService.cs index 9916cf064..d5055d242 100644 --- a/IRaCIS.Core.Application/Service/Reading/ClinicalData/ClinicalAnswerService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ClinicalData/ClinicalAnswerService.cs @@ -363,7 +363,7 @@ namespace IRaCIS.Core.Application.Service if (inDto.ClinicalFormId!=null&&(await _readModuleCriterionFromRepository.AnyAsync(x => x.ClinicalFormId == inDto.ClinicalFormId.Value))) { - throw new BusinessValidationFailedException("当前表单已确认,无法修改!"); + throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_translation"]); } var existsClinical = await _clinicalFormRepository.Where(x => @@ -375,7 +375,7 @@ namespace IRaCIS.Core.Application.Service if (existsClinical) { - throw new BusinessValidationFailedException("已经添加过临床数据,不允许多次添加!"); + throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_duplicateData"]); } try { @@ -392,7 +392,7 @@ namespace IRaCIS.Core.Application.Service { if (await _readModuleRepository.AnyAsync(x =>x.SubjectId== inDto.SubjectId&& x.SubjectVisit.LatestScanDate <= clinicalForm.CheckDate && x.IsCRCConfirm)) { - throw new BusinessValidationFailedException("无法添加和修改当前日期的临床数据,因为CRC已经确认!"); + throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_unableToAddOrUpdate"]); } } @@ -478,7 +478,7 @@ namespace IRaCIS.Core.Application.Service if (await _readModuleCriterionFromRepository.AnyAsync(x => x.ClinicalFormId == inDto.ClinicalFormId)) { - throw new BusinessValidationFailedException("当前表单已确认,无法删除!"); + throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_unableToDelete"]); } await _clinicalFormRepository.BatchDeleteNoTrackingAsync(x => x.Id == inDto.ClinicalFormId); @@ -839,12 +839,12 @@ namespace IRaCIS.Core.Application.Service if (dataList.Any(x => x.IsCRCConfirm && x.LatestScanDate > presentData.LatestScanDate && x.ReadingSetType == presentData.ReadingSetType)) { - throw new BusinessValidationFailedException("当前数据并非最后一条确认信息,无法取消!"); + throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_unableToCancel"]); } if(presentData.IsPMConfirm) { - throw new BusinessValidationFailedException("PM已确认,无法取消!"); + throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_unableToCancelPMConfirmed"]); } if (presentData.IsNotNeedPMConfirm) @@ -883,17 +883,17 @@ namespace IRaCIS.Core.Application.Service var readModuleData = await _readModuleRepository.Where(x => x.Id == inDto.ReadModuleId).FirstNotNullAsync(); if (!readModuleData.IsCRCConfirm) { - throw new BusinessValidationFailedException("CRC还未确认数据,PM无法操作"); + throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_PMUnableToOperate"]); } if (readModuleData.IsCRCApplicationRevoke && inDto.IsConfirm) { - throw new BusinessValidationFailedException("CRC正在申请退回,PM无法确认"); + throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_PMUnableToConfirm"]); } if (!readModuleData.IsCRCApplicationRevoke && !inDto.IsConfirm) { - throw new BusinessValidationFailedException("CRC未申请退回,PM无法撤销"); + throw new BusinessValidationFailedException(_localizer["ClinicalAnswer_PMUnableToWithdraw"]); } if (inDto.IsConfirm) diff --git a/IRaCIS.Core.Application/Service/Reading/ClinicalData/ClinicalDataSetService.cs b/IRaCIS.Core.Application/Service/Reading/ClinicalData/ClinicalDataSetService.cs index 297083244..e05935740 100644 --- a/IRaCIS.Core.Application/Service/Reading/ClinicalData/ClinicalDataSetService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ClinicalData/ClinicalDataSetService.cs @@ -68,7 +68,7 @@ namespace IRaCIS.Application.Services if (_systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId).Count() == 0) { - throw new BusinessValidationFailedException("当前临床数据未配置问题,请先配置问题之后再应用"); + throw new BusinessValidationFailedException(_localizer["ClinicalComment_dataNotConfigured"]); } if (isNeedVerify&&_systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId && x.IsCheckDate).Count() != 1) { @@ -103,7 +103,7 @@ namespace IRaCIS.Application.Services if (_trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId).Count() == 0) { - throw new BusinessValidationFailedException("当前临床数据未配置问题,请先配置问题之后再应用"); + throw new BusinessValidationFailedException(_localizer["ClinicalComment_dataNotConfigured"]); } if (isNeedVerify&&_trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId && x.IsCheckDate).Count() != 1) 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..a7b900325 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; }