diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs index 79039f051..d8e7fcaf4 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs @@ -92,6 +92,22 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto } + public class SetDictionaryFollowVisitUseInDto + { + public Guid Id { get; set; } + + public bool IsFollowVisitUse { get; set; } + + } + + public class SetDictionaryBaseLineUseInDto + { + public Guid Id { get; set; } + + public bool IsBaseLineUse { get; set; } + + } + public class GetAssessTypeInDto { [NotDefault] @@ -118,6 +134,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public string ChildGroup { get; set; } + /// + /// IsBaseUse + /// + public bool IsBaseLineUse { get; set; } = false; + + /// + /// IsBaseUse + /// + public bool IsFollowVisitUse { get; set; } = false; + public string Value { get; set; } = string.Empty; public string ValueCN { get; set; } = string.Empty; diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingCriterionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingCriterionService.cs index 81cd47260..5a9cdd388 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingCriterionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingCriterion/ReadingCriterionService.cs @@ -343,6 +343,42 @@ namespace IRaCIS.Core.Application.Service.RC #region 全局评估类型 肿瘤学评估类型 + /// + /// 修改是否是基线使用 + /// + /// + /// + [HttpPost] + public async Task SetDictionaryFollowVisitUse(SetDictionaryFollowVisitUseInDto inDto) + { + await _readingCriterionDictionaryRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new ReadingCriterionDictionary() + { + IsFollowVisitUse = inDto.IsFollowVisitUse + }); + + await _readingCriterionDictionaryRepository.SaveChangesAsync(); + + return ResponseOutput.Ok(true); + } + + + /// + /// 修改是否是基线使用 + /// + /// + /// + [HttpPost] + public async Task SetDictionaryBaseLineUse(SetDictionaryBaseLineUseInDto inDto) + { + await _readingCriterionDictionaryRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new ReadingCriterionDictionary() + { + IsBaseLineUse = inDto.IsBaseLineUse + }); + + await _readingCriterionDictionaryRepository.SaveChangesAsync(); + + return ResponseOutput.Ok(true); + } /// /// 获取标准字典 @@ -360,6 +396,8 @@ namespace IRaCIS.Core.Application.Service.RC Id = x.Id, DictionaryId = x.DictionaryId, ChildGroup = x.Dictionary.ChildGroup, + IsBaseLineUse = x.IsBaseLineUse, + IsFollowVisitUse=x.IsFollowVisitUse, Code = x.Dictionary.Code, Description = x.Dictionary.Description, ShowOrder = x.Dictionary.ShowOrder, diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingCriterionDictionary.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingCriterionDictionary.cs index 687432d74..16b6bb0ec 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingCriterionDictionary.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterionQuestion/ReadingCriterionDictionary.cs @@ -43,6 +43,17 @@ namespace IRaCIS.Core.Domain.Models /// public Guid CreateUserId { get; set; } + + /// + /// IsBaseLineUse + /// + public bool IsBaseLineUse { get; set; } = false; + + /// + /// IsBaseUse + /// + public bool IsFollowVisitUse { get; set; } = false; + [JsonIgnore] [ForeignKey("DictionaryId")] public Dictionary Dictionary { get; set; }