Uat_Study
he 2022-06-13 15:15:12 +08:00
parent e90a247873
commit 3297a18ba4
10 changed files with 536 additions and 50 deletions

View File

@ -1475,17 +1475,147 @@
阅片期名称
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.AddOrUpdateReadingQuestionCriterionSystemInDto.CriterionId">
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionCriterionSystemInDto.CriterionId">
<summary>
标准ID
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.AddOrUpdateReadingQuestionCriterionSystemInDto.CriterionName">
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionCriterionSystemInDto.CriterionName">
<summary>
标准
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.AddOrUpdateReadingQuestionCriterionSystemInDto.IsEnable">
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionCriterionSystemInDto.IsEnable">
<summary>
是否启用
</summary>
</member>
<member name="T:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionCriterionSystemViewInDto">
<summary>
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemView.Id">
<summary>
Id
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemView.ReadingQuestionCriterionSystem">
<summary>
系统标准Id
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemView.Type">
<summary>
类型
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemView.ParentTriggerValue">
<summary>
父问题触发
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemView.QuestionName">
<summary>
问题名称
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemView.IsRequired">
<summary>
是否是必须
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemView.ShowOrder">
<summary>
排序
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemView.ParentId">
<summary>
父问题ID
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemView.TypeValue">
<summary>
类型值
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemViewInDto.ReadingQuestionCriterionSystemId">
<summary>
系统标准Id
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemViewInDto.Type">
<summary>
类型
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemViewInDto.QuestionName">
<summary>
问题名称
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionSystemInDto.Id">
<summary>
Id
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionSystemInDto.ReadingQuestionCriterionSystem">
<summary>
系统标准Id
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionSystemInDto.Type">
<summary>
类型
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionSystemInDto.ParentTriggerValue">
<summary>
父问题触发
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionSystemInDto.QuestionName">
<summary>
问题名称
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionSystemInDto.IsRequired">
<summary>
是否是必须
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionSystemInDto.ShowOrder">
<summary>
排序
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionSystemInDto.ParentId">
<summary>
父问题ID
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionSystemInDto.TypeValue">
<summary>
类型值
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionCriterionSystemView.Id">
<summary>
返回的对象
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionCriterionSystemView.CriterionId">
<summary>
标准ID
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionCriterionSystemView.CriterionName">
<summary>
标准
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionCriterionSystemView.IsEnable">
<summary>
是否启用
</summary>
@ -3796,13 +3926,46 @@
阅片问题.标准
</summary>
</member>
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.AddOrUpdateReadingQuestionCriterionSystem(IRaCIS.Core.Application.Service.Reading.AddOrUpdateReadingQuestionCriterionSystemInDto)">
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.AddOrUpdateReadingQuestionCriterionSystem(IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionCriterionSystemInDto)">
<summary>
新增修改
新增修改系统问题标准
</summary>
<param name="indto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.GetReadingQuestionCriterionSystemList(IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionCriterionSystemViewInDto)">
<summary>
获取系统问题标准
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.DeleteReadingQuestionCriterionSystem(System.Guid)">
<summary>
删除系统问题标准
</summary>
<param name="readingQuestionCriterionSystemId"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.AddOrUpdateReadingQuestionSystem(IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionSystemInDto)">
<summary>
新增修改系统问题
</summary>
<param name="indto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.GetReadingQuestionSystemList(IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionSystemViewInDto)">
<summary>
获取系统问题
</summary>
<returns></returns>
</member>
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.DeleteReadingQuestionSystem(System.Guid)">
<summary>
删除系统问题
</summary>
<param name="readingQuestionSystemId"></param>
<returns></returns>
</member>
<member name="T:IRaCIS.Application.Services.ReadModuleService">
<summary>
生成的阅片模块(在大列表上展示的) 阅片期

View File

@ -294,16 +294,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 对象ID
/// </summary>
[Required(ErrorMessage = "ReadingId为null")]
public Guid ReadingId { get; set; }
public Guid? ReadingId { get; set; }
[Required(ErrorMessage = "SubjectId为null")]
public Guid SubjectId { get; set; }
public Guid? SubjectId { get; set; }
/// <summary>
/// 是否是访视
/// </summary>
[Required(ErrorMessage = "IsVisit为null")]
public bool IsVisit { get; set; }
public bool? IsVisit { get; set; }
}

View File

@ -0,0 +1,183 @@
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IRaCIS.Core.Application.Service.Reading.Dto
{
public class AddOrUpdateReadingQuestionCriterionSystemInDto
{
public Guid? Id { get; set; }
/// <summary>
/// 标准ID
/// </summary>
public Guid CriterionId { get; set; }
/// <summary>
/// 标准
/// </summary>
public string CriterionName { get; set; }
/// <summary>
/// 是否启用
/// </summary>
public bool IsEnable { get; set; }
}
/// <summary>
///
/// </summary>
public class ReadingQuestionCriterionSystemViewInDto:PageInput
{
public string CriterionName { get; set; }
}
public class ReadingQuestionSystemView
{
/// <summary>
/// Id
/// </summary>
public Guid Id { get; set; }
/// <summary>
/// 系统标准Id
/// </summary>
public Guid ReadingQuestionCriterionSystem { get; set; }
/// <summary>
/// 类型
/// </summary>
public string Type { get; set; }
/// <summary>
/// 父问题触发
/// </summary>
public string ParentTriggerValue { get; set; }
/// <summary>
/// 问题名称
/// </summary>
public string QuestionName { get; set; }
/// <summary>
/// 是否是必须
/// </summary>
public bool IsRequired { get; set; }
/// <summary>
/// 排序
/// </summary>
public int ShowOrder { get; set; }
/// <summary>
/// 父问题ID
/// </summary>
public Guid? ParentId { get; set; }
/// <summary>
/// 类型值
/// </summary>
public string TypeValue { get; set; }
public bool IsEnable { get; set; }
}
public class ReadingQuestionSystemViewInDto : PageInput
{
/// <summary>
/// 系统标准Id
/// </summary>
[Required(ErrorMessage = "ReadingQuestionCriterionSystemId为null")]
public Guid ReadingQuestionCriterionSystemId { get; set; }
/// <summary>
/// 类型
/// </summary>
public string Type { get; set; } = string.Empty;
/// <summary>
/// 问题名称
/// </summary>
public string QuestionName { get; set; } = string.Empty;
}
public class AddOrUpdateReadingQuestionSystemInDto
{
/// <summary>
/// Id
/// </summary>
public Guid? Id { get; set; }
/// <summary>
/// 系统标准Id
/// </summary>
public Guid ReadingQuestionCriterionSystem { get; set; }
/// <summary>
/// 类型
/// </summary>
public string Type { get; set; }
/// <summary>
/// 父问题触发
/// </summary>
public string ParentTriggerValue { get; set; } = string.Empty;
/// <summary>
/// 问题名称
/// </summary>
public string QuestionName { get; set; }
/// <summary>
/// 是否是必须
/// </summary>
public bool IsRequired { get; set; } = false;
/// <summary>
/// 排序
/// </summary>
public int ShowOrder { get; set; } = 0;
/// <summary>
/// 父问题ID
/// </summary>
public Guid? ParentId { get; set; }
/// <summary>
/// 类型值
/// </summary>
public string TypeValue { get; set; }
public bool IsEnable { get; set; } = false;
}
public class ReadingQuestionCriterionSystemView
{
/// <summary>
/// 返回的对象
/// </summary>
public Guid Id { get; set; }
/// <summary>
/// 标准ID
/// </summary>
public Guid CriterionId { get; set; }
/// <summary>
/// 标准
/// </summary>
public string CriterionName { get; set; }
/// <summary>
/// 是否启用
/// </summary>
public bool IsEnable { get; set; }
}
}

View File

@ -149,8 +149,8 @@ namespace IRaCIS.Application.Services
var usedIdsQuery = _readingClinicalDataRepository.Where(x => x.ReadingId == inDto.ReadingId && x.Id != inDto.ReadingClinicalDataId).Select(x => x.ClinicalDataTrialSetId);
List<GetTrialClinicalDataSelectOutDto> clinicalList = await _clinicalDataTrialSetRepository.Where(x=>x.TrialId==inDto.TrialId&&x.IsConfirm&&x.ClinicalDataSetName!= "既往局部治疗史")
.Where(x=> !usedIdsQuery.Contains(x.Id))
.WhereIf(inDto.IsVisit,x=>x.ClinicalDataLevel == ClinicalLevel.Subject||x.ClinicalDataLevel== ClinicalLevel.SubjectVisit)
.WhereIf(!inDto.IsVisit, x => x.ClinicalDataLevel == ClinicalLevel.Subject || x.ClinicalDataLevel == ClinicalLevel.Read)
.WhereIf(inDto.IsVisit.Value,x=>x.ClinicalDataLevel == ClinicalLevel.Subject||x.ClinicalDataLevel== ClinicalLevel.SubjectVisit)
.WhereIf(!inDto.IsVisit.Value, x => x.ClinicalDataLevel == ClinicalLevel.Subject || x.ClinicalDataLevel == ClinicalLevel.Read)
.Select(x => new GetTrialClinicalDataSelectOutDto()
{

View File

@ -10,6 +10,7 @@ using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Domain.Share.Reading;
using MassTransit;
using IRaCIS.Core.Application.Service.Reading;
using IRaCIS.Core.Infra.EFCore.Common;
namespace IRaCIS.Application.Services
{
@ -21,42 +22,113 @@ namespace IRaCIS.Application.Services
{
public IRepository<SubjectVisit> _subjectVisitRepository;
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystemRepository;
private readonly IRepository<ReadingQuestionSystem> _readingQuestionSystemRepository;
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
private readonly IRepository<ClinicalDataSystemSet> _clinicalDataSystemSetRepository;
private readonly IRepository<PreviousPDF> _previousPDFRepository;
public ReadingQuestionService(IRepository<SubjectVisit> subjectVisitRepository,
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystemRepository,
IRepository<ReadingQuestionSystem> readingQuestionSystemRepository,
IRepository<ClinicalDataTrialSet> ClinicalDataTrialSetRepository,
IRepository<ClinicalDataSystemSet> ClinicalDataSystemSetRepository,
IRepository<PreviousPDF> previousPDFRepository
)
{
_subjectVisitRepository = subjectVisitRepository;
this._readingQuestionCriterionSystemRepository = readingQuestionCriterionSystemRepository;
this._readingQuestionSystemRepository = readingQuestionSystemRepository;
_clinicalDataTrialSetRepository = ClinicalDataTrialSetRepository;
_clinicalDataSystemSetRepository = ClinicalDataSystemSetRepository;
this._previousPDFRepository = previousPDFRepository;
}
/// <summary>
/// 新增修改
/// 新增修改系统问题标准
/// </summary>
/// <param name="indto"></param>
/// <returns></returns>
[HttpPost]
public async Task<IResponseOutput> AddOrUpdateReadingQuestionCriterionSystem(AddOrUpdateReadingQuestionCriterionSystemInDto indto)
{
var entity = await _clinicalDataTrialSetRepository.InsertOrUpdateAsync(indto,true);
var entity = await _readingQuestionCriterionSystemRepository.InsertOrUpdateAsync(indto,true);
return ResponseOutput.Ok(entity.Id.ToString());
}
/// <summary>
/// 获取系统问题标准
/// </summary>
/// <returns></returns>
[HttpPost]
public async Task<PageOutput<ReadingQuestionCriterionSystemView>> GetReadingQuestionCriterionSystemList(ReadingQuestionCriterionSystemViewInDto inDto)
{
var query= _readingQuestionCriterionSystemRepository.AsQueryable()
.WhereIf(!inDto.CriterionName.IsNullOrEmpty(), x => x.CriterionName.Contains(inDto.CriterionName))
.ProjectTo<ReadingQuestionCriterionSystemView>(_mapper.ConfigurationProvider);
return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField == null ? nameof(ReadingQuestionCriterionSystemView.CriterionName) : inDto.SortField,
inDto.Asc);
}
/// <summary>
/// 删除系统问题标准
/// </summary>
/// <param name="readingQuestionCriterionSystemId"></param>
/// <returns></returns>
[HttpDelete("{readingQuestionCriterionSystemId:guid}")]
public async Task<IResponseOutput> DeleteReadingQuestionCriterionSystem(Guid readingQuestionCriterionSystemId)
{
await _readingQuestionCriterionSystemRepository.DeleteFromQueryAsync(t => t.Id == readingQuestionCriterionSystemId);
var success = await _readingQuestionCriterionSystemRepository.SaveChangesAsync();
return ResponseOutput.Result(success);
}
/// <summary>
/// 新增修改系统问题
/// </summary>
/// <param name="indto"></param>
/// <returns></returns>
[HttpPost]
public async Task<IResponseOutput> AddOrUpdateReadingQuestionSystem(AddOrUpdateReadingQuestionSystemInDto indto)
{
var entity = await _readingQuestionSystemRepository.InsertOrUpdateAsync(indto, true);
return ResponseOutput.Ok(entity.Id.ToString());
}
/// <summary>
/// 获取系统问题
/// </summary>
/// <returns></returns>
[HttpPost]
public async Task<PageOutput<ReadingQuestionSystemView>> GetReadingQuestionSystemList(ReadingQuestionSystemViewInDto inDto)
{
var query = _readingQuestionSystemRepository.AsQueryable()
.Where(x=>x.ReadingQuestionCriterionSystemId==inDto.ReadingQuestionCriterionSystemId)
.WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName))
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type.Contains(inDto.Type))
.ProjectTo<ReadingQuestionSystemView>(_mapper.ConfigurationProvider);
return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField == null ? nameof(ReadingQuestionSystemView.QuestionName) : inDto.SortField,
inDto.Asc);
}
/// <summary>
/// 删除系统问题
/// </summary>
/// <param name="readingQuestionSystemId"></param>
/// <returns></returns>
[HttpDelete("{readingQuestionSystemId:guid}")]
public async Task<IResponseOutput> DeleteReadingQuestionSystem(Guid readingQuestionSystemId)
{
await _readingQuestionSystemRepository.DeleteFromQueryAsync(t => t.Id == readingQuestionSystemId);
var success = await _readingQuestionSystemRepository.SaveChangesAsync();
return ResponseOutput.Result(success);
}
}
}

View File

@ -1,28 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IRaCIS.Core.Application.Service.Reading
{
public class AddOrUpdateReadingQuestionCriterionSystemInDto
{
public Guid? Id { get; set; }
/// <summary>
/// 标准ID
/// </summary>
public Guid CriterionId { get; set; }
/// <summary>
/// 标准
/// </summary>
public string CriterionName { get; set; }
/// <summary>
/// 是否启用
/// </summary>
public bool IsEnable { get; set; }
}
}

View File

@ -28,7 +28,6 @@ namespace IRaCIS.Core.Application.Service
//.ForMember(d => d.FileCount, u => u.MapFrom(s => s.ReadingClinicalDataPDFList.Count()));
CreateMap<ReadingClinicalDataPDF, GetReadingClinicalDataPDFListOutDto>();
//.ForMember(d => d.SiteNames, u => u.MapFrom(s => s.ReadingPeriodSites.SelectMany(x => x.Site.SiteName).ToList()));
@ -51,7 +50,8 @@ namespace IRaCIS.Core.Application.Service
CreateMap<ReadModuleAddOrEdit, ReadModule>();
#region 阅片问题
CreateMap<AddOrUpdateReadingQuestionCriterionSystemInDto, ReadingQuestionCriterionSystem>();
CreateMap<ReadingQuestionCriterionSystem, ReadingQuestionCriterionSystemView>();
#endregion

View File

@ -0,0 +1,80 @@
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
{
///<summary>
/// 系统阅片问题
///</summary>
[Table("ReadingQuestionSystem")]
public class ReadingQuestionSystem : Entity, IAuditAdd
{
/// <summary>
/// 系统标准Id
/// </summary>
public Guid ReadingQuestionCriterionSystemId { get; set; }
/// <summary>
/// 类型
/// </summary>
public string Type { get; set; }
/// <summary>
/// 父问题触发
/// </summary>
public string ParentTriggerValue { get; set; }
/// <summary>
/// 问题名称
/// </summary>
public string QuestionName { get; set; }
/// <summary>
/// 是否是必须
/// </summary>
public bool IsRequired { get; set; }
/// <summary>
/// 排序
/// </summary>
public int ShowOrder { get; set; }
/// <summary>
/// 父问题ID
/// </summary>
public Guid? ParentId { get; set; }
/// <summary>
/// 类型值
/// </summary>
public string TypeValue { get; set; }
public bool IsEnable { get; set; }
/// <summary>
/// 创建时间
/// </summary>
public DateTime CreateTime { get; set; }
/// <summary>
/// 创建人
/// </summary>
public Guid CreateUserId { get; set; }
}
}

View File

@ -41,6 +41,20 @@ namespace IRaCIS.Core.Infra.EFCore.Common
}
public static bool IsNullOrEmpty(this string value)
{
if (value == null || value == string.Empty)
{
return true;
}
else
{
return false;
}
}
/// <summary>
/// 获取DisplayName
/// </summary>

View File

@ -184,6 +184,8 @@ namespace IRaCIS.Core.Infra.EFCore
public virtual DbSet<ReadingQuestionCriterionSystem> ReadingQuestionCriterionSystem { get; set; }
public virtual DbSet<ReadingQuestionSystem> ReadingQuestionSystem { get; set; }
public virtual DbSet<ReadingClinicalDataView> ReadingClinicalDataView { get; set; }
public virtual DbSet<ReadingClinicalDataPDF> ReadingClinicalDataPDF { get; set; }