diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index bd37cfbab..70c7016b3 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -1475,6 +1475,16 @@ 阅片期名称 + + + 标准 + + + + + 是否启用 + + 标准ID @@ -1495,12 +1505,57 @@ + + + + + + + + 系统标准Id + + + + + 类型 + + + + + 父问题触发 + + + + + 问题名称 + + + + + 是否是必须 + + + + + 排序 + + + + + 父问题ID + + + + + 类型值 + + Id - + 系统标准Id @@ -1540,6 +1595,21 @@ 类型值 + + + 系统标准Id + + + + + 类型 + + + + + 问题名称 + + 系统标准Id @@ -1560,7 +1630,7 @@ Id - + 系统标准Id @@ -1600,6 +1670,51 @@ 类型值 + + + Id + + + + + 系统标准Id + + + + + 类型 + + + + + 父问题触发 + + + + + 问题名称 + + + + + 是否是必须 + + + + + 排序 + + + + + 父问题ID + + + + + 类型值 + + 返回的对象 @@ -1620,6 +1735,31 @@ 是否启用 + + + 返回的对象 + + + + + 系统标准ID + + + + + 标准 + + + + + 是否启用 + + + + + 是否是系统数据 + + 项目外部人员 录入流程相关 @@ -3966,6 +4106,46 @@ + + + 新增修改项目问题标准(项目) + + + + + + + 获取项目问题标准(项目) + + + + + + 删除项目问题标准(项目) + + + + + + + 新增修改项目问题(项目) + + + + + + + 获取项目问题(项目) + + + + + + 删除项目问题(项目) + + + + 生成的阅片模块(在大列表上展示的) 阅片期 diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs index fdaddcbea..1af6b429f 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingQuestionViewModel.cs @@ -7,7 +7,26 @@ using System.Threading.Tasks; namespace IRaCIS.Core.Application.Service.Reading.Dto { - public class AddOrUpdateReadingQuestionCriterionSystemInDto + + public class AddOrUpdateReadingQuestionCriterionTrialInDto + { + public Guid? Id { get; set; } + + [NotDefault] + public Guid TrialId { get; set; } + + /// + /// 标准 + /// + public string CriterionName { get; set; } + + /// + /// 是否启用 + /// + public bool IsEnable { get; set; } + } + + public class AddOrUpdateReadingQuestionCriterionSystemInDto { public Guid? Id { get; set; } @@ -32,21 +51,33 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public class ReadingQuestionCriterionSystemViewInDto:PageInput { - public string CriterionName { get; set; } + public string CriterionName { get; set; }=String.Empty; } - public class ReadingQuestionSystemView + /// + /// + /// + public class ReadingQuestionCriterionTrialViewInDto : PageInput { - /// - /// Id - /// + [NotDefault] + public Guid TrialId { get; set; } + + public string CriterionName { get; set; } = string.Empty; + } + + + public class ReadingQuestionTrialView + { + public Guid Id { get; set; } /// /// 系统标准Id /// - public Guid ReadingQuestionCriterionSystem { get; set; } + public Guid ReadingQuestionCriterionTrialId { get; set; } + + public Guid TrialId { get; set; } /// /// 类型 @@ -87,12 +118,86 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public bool IsEnable { get; set; } } + public class ReadingQuestionSystemView + { + /// + /// Id + /// + public Guid Id { get; set; } + + /// + /// 系统标准Id + /// + public Guid ReadingQuestionCriterionSystemId { get; set; } + + /// + /// 类型 + /// + public string Type { get; set; } + + /// + /// 父问题触发 + /// + public string ParentTriggerValue { get; set; } + + /// + /// 问题名称 + /// + public string QuestionName { get; set; } + + /// + /// 是否是必须 + /// + public bool IsRequired { get; set; } + + /// + /// 排序 + /// + public int ShowOrder { get; set; } + + /// + /// 父问题ID + /// + public Guid? ParentId { get; set; } + + + /// + /// 类型值 + /// + public string TypeValue { get; set; } + + public bool IsEnable { get; set; } + } + + + public class ReadingQuestionTrialViewInDto : PageInput + { + /// + /// 系统标准Id + /// + [NotDefault] + public Guid ReadingQuestionCriterionTrialId { get; set; } + + /// + /// 类型 + /// + public string Type { get; set; } = string.Empty; + + + /// + /// 问题名称 + /// + public string QuestionName { get; set; } = string.Empty; + } + + + public class ReadingQuestionSystemViewInDto : PageInput { /// /// 系统标准Id /// - [Required(ErrorMessage = "ReadingQuestionCriterionSystemId为null")] + [NotDefault] public Guid ReadingQuestionCriterionSystemId { get; set; } /// @@ -117,7 +222,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// /// 系统标准Id /// - public Guid ReadingQuestionCriterionSystem { get; set; } + public Guid ReadingQuestionCriterionSystemId { get; set; } /// /// 类型 @@ -158,6 +263,63 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public bool IsEnable { get; set; } = false; } + + + public class AddOrUpdateReadingQuestionTrialInDto + { + /// + /// Id + /// + public Guid? Id { get; set; } + + + public Guid TrialId { get; set; } + + /// + /// 系统标准Id + /// + public Guid ReadingQuestionCriterionTrialId { get; set; } + + /// + /// 类型 + /// + public string Type { get; set; } + + /// + /// 父问题触发 + /// + public string ParentTriggerValue { get; set; } = string.Empty; + + /// + /// 问题名称 + /// + public string QuestionName { get; set; } + + /// + /// 是否是必须 + /// + public bool IsRequired { get; set; } = false; + + /// + /// 排序 + /// + public int ShowOrder { get; set; } = 0; + + /// + /// 父问题ID + /// + public Guid? ParentId { get; set; } + + + /// + /// 类型值 + /// + public string TypeValue { get; set; } + + public bool IsEnable { get; set; } = false; + } + + public class ReadingQuestionCriterionSystemView { /// @@ -180,4 +342,37 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public bool IsEnable { get; set; } } + + + public class ReadingQuestionCriterionTrialView + { + /// + /// 返回的对象 + /// + public Guid Id { get; set; } + + /// + /// 系统标准ID + /// + public Guid? ReadingQuestionCriterionSystemId { get; set; } + + /// + /// 标准 + /// + public string CriterionName { get; set; } + + /// + /// 是否启用 + /// + public bool IsEnable { get; set; } + + /// + /// 是否是系统数据 + /// + public bool IsSystemData { + get { + return this.ReadingQuestionCriterionSystemId != null; + } + } + } } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs index 0c8f6f24b..f4e1c1a01 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingQuestionService.cs @@ -23,7 +23,9 @@ namespace IRaCIS.Application.Services public IRepository _subjectVisitRepository; private readonly IRepository _readingQuestionCriterionSystemRepository; + private readonly IRepository _readingQuestionCriterionTrialRepository; private readonly IRepository _readingQuestionSystemRepository; + private readonly IRepository _readingQuestionTrialRepository; private readonly IRepository _clinicalDataTrialSetRepository; private readonly IRepository _clinicalDataSystemSetRepository; private readonly IRepository _previousPDFRepository; @@ -31,7 +33,9 @@ namespace IRaCIS.Application.Services public ReadingQuestionService(IRepository subjectVisitRepository, IRepository readingQuestionCriterionSystemRepository, + IRepository readingQuestionCriterionTrialRepository, IRepository readingQuestionSystemRepository, + IRepository readingQuestionTrialRepository, IRepository ClinicalDataTrialSetRepository, IRepository ClinicalDataSystemSetRepository, IRepository previousPDFRepository @@ -39,7 +43,9 @@ namespace IRaCIS.Application.Services { _subjectVisitRepository = subjectVisitRepository; this._readingQuestionCriterionSystemRepository = readingQuestionCriterionSystemRepository; + this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository; this._readingQuestionSystemRepository = readingQuestionSystemRepository; + this._readingQuestionTrialRepository = readingQuestionTrialRepository; _clinicalDataTrialSetRepository = ClinicalDataTrialSetRepository; _clinicalDataSystemSetRepository = ClinicalDataSystemSetRepository; this._previousPDFRepository = previousPDFRepository; @@ -130,5 +136,88 @@ namespace IRaCIS.Application.Services + /// + /// 新增修改项目问题标准(项目) + /// + /// + /// + [HttpPost] + public async Task AddOrUpdateReadingQuestionCriterionTrial(AddOrUpdateReadingQuestionCriterionTrialInDto indto) + { + var entity = await _readingQuestionCriterionTrialRepository.InsertOrUpdateAsync(indto, true); + return ResponseOutput.Ok(entity.Id.ToString()); + } + + /// + /// 获取项目问题标准(项目) + /// + /// + [HttpPost] + public async Task> GetReadingQuestionCriterionTrialList(ReadingQuestionCriterionTrialViewInDto inDto) + { + var query = _readingQuestionCriterionTrialRepository.AsQueryable() + .Where(x=>x.TrialId==inDto.TrialId) + .WhereIf(!inDto.CriterionName.IsNullOrEmpty(), x => x.CriterionName.Contains(inDto.CriterionName)) + .ProjectTo(_mapper.ConfigurationProvider); + return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField == null ? nameof(ReadingQuestionCriterionTrialView.CriterionName) : inDto.SortField, + inDto.Asc); + } + + /// + /// 删除项目问题标准(项目) + /// + /// + /// + [HttpDelete("{readingQuestionCriterionTrialId:guid}")] + public async Task DeleteReadingQuestionCriterionTrial(Guid readingQuestionCriterionTrialId) + { + await _readingQuestionCriterionTrialRepository.DeleteFromQueryAsync(t => t.Id == readingQuestionCriterionTrialId); + var success = await _readingQuestionCriterionTrialRepository.SaveChangesAsync(); + return ResponseOutput.Result(success); + } + + + + /// + /// 新增修改项目问题(项目) + /// + /// + /// + [HttpPost] + public async Task AddOrUpdateReadingQuestionTrial(AddOrUpdateReadingQuestionTrialInDto indto) + { + var entity = await _readingQuestionTrialRepository.InsertOrUpdateAsync(indto, true); + return ResponseOutput.Ok(entity.Id.ToString()); + } + + /// + /// 获取项目问题(项目) + /// + /// + [HttpPost] + public async Task> GetReadingQuestionTrialList(ReadingQuestionTrialViewInDto inDto) + { + var query = _readingQuestionTrialRepository.AsQueryable() + .Where(x => x.ReadingQuestionCriterionTrialId == inDto.ReadingQuestionCriterionTrialId) + .WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName)) + .WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type.Contains(inDto.Type)) + .ProjectTo(_mapper.ConfigurationProvider); + return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField == null ? nameof(ReadingQuestionTrialView.QuestionName) : inDto.SortField, + inDto.Asc); + } + + /// + /// 删除项目问题(项目) + /// + /// + /// + [HttpDelete("{readingQuestionTrialId:guid}")] + public async Task DeleteReadingQuestionTrial(Guid readingQuestionTrialId) + { + await _readingQuestionTrialRepository.DeleteFromQueryAsync(t => t.Id == readingQuestionTrialId); + var success = await _readingQuestionTrialRepository.SaveChangesAsync(); + return ResponseOutput.Result(success); + } + } } diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs index 635d5d2cf..efa2ac442 100644 --- a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs @@ -52,6 +52,18 @@ namespace IRaCIS.Core.Application.Service #region 阅片问题 CreateMap(); CreateMap(); + + + CreateMap(); + CreateMap(); + + + CreateMap(); + CreateMap(); + + + CreateMap(); + CreateMap(); #endregion diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionTrial.cs new file mode 100644 index 000000000..024ab01bd --- /dev/null +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionCriterionTrial.cs @@ -0,0 +1,55 @@ + + +using System; +using IRaCIS.Core.Domain.Share; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using IRaCIS.Core.Domain.Share.Reading; +using System.Collections.Generic; + +namespace IRaCIS.Core.Domain.Models +{ + /// + /// 项目阅片标准 + /// + [Table("ReadingQuestionCriterionTrial")] + public class ReadingQuestionCriterionTrial : Entity, IAuditAdd + { + /// + /// 系统标准ID + /// + public Guid? ReadingQuestionCriterionSystemId { get; set; } + + public Guid TrialId { get; set; } + + /// + /// 标准 + /// + public string CriterionName { get; set; } + + /// + /// 是否启用 + /// + public bool IsEnable { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreateTime { get; set; } + + /// + /// 创建人 + /// + public Guid CreateUserId { get; set; } + + + + + } + + + + + + +} diff --git a/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs new file mode 100644 index 000000000..322265151 --- /dev/null +++ b/IRaCIS.Core.Domain/Reading/ReadingQuestionTrial.cs @@ -0,0 +1,82 @@ + + +using System; +using IRaCIS.Core.Domain.Share; +using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; +using IRaCIS.Core.Domain.Share.Reading; +using System.Collections.Generic; + +namespace IRaCIS.Core.Domain.Models +{ + /// + /// 项目阅片问题 + /// + [Table("ReadingQuestionTrial")] + public class ReadingQuestionTrial : Entity, IAuditAdd + { + /// + /// 系统标准Id + /// + public Guid ReadingQuestionCriterionTrialId { get; set; } + + public Guid TrialId { get; set; } + + /// + /// 类型 + /// + public string Type { get; set; } + + /// + /// 父问题触发 + /// + public string ParentTriggerValue { get; set; } + + /// + /// 问题名称 + /// + public string QuestionName { get; set; } + + /// + /// 是否是必须 + /// + public bool IsRequired { get; set; } + + /// + /// 排序 + /// + public int ShowOrder { get; set; } + + /// + /// 父问题ID + /// + public Guid? ParentId { get; set; } + + + /// + /// 类型值 + /// + public string TypeValue { get; set; } + + public bool IsEnable { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreateTime { get; set; } + + /// + /// 创建人 + /// + public Guid CreateUserId { get; set; } + + + + } + + + + + + +} diff --git a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs index 7458d5e30..34b230f99 100644 --- a/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs +++ b/IRaCIS.Core.Infra.EFCore/Context/IRaCISDBContext.cs @@ -184,8 +184,12 @@ namespace IRaCIS.Core.Infra.EFCore public virtual DbSet ReadingQuestionCriterionSystem { get; set; } + public virtual DbSet ReadingQuestionCriterionTrial { get; set; } + public virtual DbSet ReadingQuestionSystem { get; set; } + public virtual DbSet ReadingQuestionTrial { get; set; } + public virtual DbSet ReadingClinicalDataView { get; set; } public virtual DbSet ReadingClinicalDataPDF { get; set; }