修改一版
parent
a273238d59
commit
e0753389f0
|
@ -9,6 +9,35 @@ using System.Threading.Tasks;
|
|||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
|
||||
|
||||
public class ReadingCriterionPageView
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
public string PageName { get; set; }
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class ReadingCriterionPageQuery
|
||||
{
|
||||
///<summary> PageName</summary>
|
||||
public string PageName { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class ReadingCriterionPageAddOrEdit
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
public string PageName { get; set; }
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class AddOrUpdateReadingQuestionCriterionTrialInDto
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
@ -124,6 +153,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public Guid TrialId { get; set; }
|
||||
|
||||
public string CriterionName { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -194,6 +226,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// 是否是裁判问题
|
||||
/// </summary>
|
||||
public bool IsJudgeQuestion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标准分页Id
|
||||
/// </summary>
|
||||
public Guid? ReadingCriterionPageId { get; set; }
|
||||
}
|
||||
|
||||
public class ReadingQuestionSystemView
|
||||
|
@ -285,6 +322,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// 问题名称
|
||||
/// </summary>
|
||||
public string QuestionName { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
public Guid? ReadingCriterionPageId { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -31,6 +31,7 @@ namespace IRaCIS.Application.Services
|
|||
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
|
||||
private readonly IRepository<ClinicalDataSystemSet> _clinicalDataSystemSetRepository;
|
||||
private readonly IRepository<Dictionary> _dictionaryRepository;
|
||||
private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IReadingImageTaskService _readingImageTaskService;
|
||||
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswer;
|
||||
|
@ -45,6 +46,7 @@ namespace IRaCIS.Application.Services
|
|||
IRepository<ClinicalDataTrialSet> ClinicalDataTrialSetRepository,
|
||||
IRepository<ClinicalDataSystemSet> ClinicalDataSystemSetRepository,
|
||||
IRepository<Dictionary> dictionaryRepository,
|
||||
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
||||
IRepository<Trial> trialRepository,
|
||||
IReadingImageTaskService readingImageTaskService,
|
||||
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswer,
|
||||
|
@ -59,12 +61,40 @@ namespace IRaCIS.Application.Services
|
|||
this._clinicalDataTrialSetRepository = ClinicalDataTrialSetRepository;
|
||||
this._clinicalDataSystemSetRepository = ClinicalDataSystemSetRepository;
|
||||
this._dictionaryRepository = dictionaryRepository;
|
||||
this._readingCriterionPageRepository = readingCriterionPageRepository;
|
||||
this._trialRepository = trialRepository;
|
||||
this._readingImageTaskService = readingImageTaskService;
|
||||
this._readingTaskQuestionAnswer = readingTaskQuestionAnswer;
|
||||
this._previousPDFRepository = previousPDFRepository;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 新增修改项目标准分页
|
||||
/// </summary>
|
||||
/// <param name="addOrEditReadingCriterionPage"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> AddOrUpdateReadingCriterionPage(ReadingCriterionPageAddOrEdit addOrEditReadingCriterionPage)
|
||||
{
|
||||
|
||||
var entity = await _readingCriterionPageRepository.InsertOrUpdateAsync(addOrEditReadingCriterionPage, true);
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除标准分页
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{Id:guid}")]
|
||||
public async Task<IResponseOutput> DeleteReadingCriterionPage(Guid Id)
|
||||
{
|
||||
var success = await _readingCriterionPageRepository.DeleteFromQueryAsync(t => t.Id == Id, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 新增修改系统问题标准
|
||||
///// </summary>
|
||||
|
@ -626,6 +656,7 @@ namespace IRaCIS.Application.Services
|
|||
var query = _readingQuestionCriterionTrialRepository.AsQueryable()
|
||||
.Where(x=>x.TrialId==inDto.TrialId)
|
||||
.WhereIf(!inDto.CriterionName.IsNullOrEmpty(), x => x.CriterionName.Contains(inDto.CriterionName))
|
||||
|
||||
.ProjectTo<ReadingQuestionCriterionTrialView>(_mapper.ConfigurationProvider);
|
||||
return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField == null ? nameof(ReadingQuestionCriterionTrialView.CriterionName) : inDto.SortField,
|
||||
inDto.Asc);
|
||||
|
@ -679,6 +710,7 @@ namespace IRaCIS.Application.Services
|
|||
.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))
|
||||
.WhereIf(inDto.ReadingCriterionPageId!=null, x => x.ReadingCriterionPageId==inDto.ReadingCriterionPageId)
|
||||
.ProjectTo<ReadingQuestionTrialView>(_mapper.ConfigurationProvider);
|
||||
return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, "GroupName ASC,ShowOrder",
|
||||
inDto.Asc);
|
||||
|
|
|
@ -50,6 +50,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<ReadModuleAddOrEdit, ReadModule>();
|
||||
|
||||
#region 阅片问题
|
||||
|
||||
|
||||
|
||||
CreateMap<ReadingCriterionPageAddOrEdit, ReadingCriterionPage>();
|
||||
CreateMap<AddOrUpdateReadingQuestionCriterionSystemInDto, ReadingQuestionCriterionSystem>();
|
||||
CreateMap<ReadingQuestionCriterionSystem, ReadingQuestionCriterionSystemView>()
|
||||
.ForMember(d => d.QuestionCount, u => u.MapFrom(s => s.ReadingQuestionSystemList.Count()))
|
||||
|
|
|
@ -292,27 +292,21 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
/// </summary>
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 阅片平台
|
||||
/// </summary>
|
||||
public int ImagePlatform { get; set; } = 1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 任务组织级别
|
||||
/// </summary>
|
||||
public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 影像是否有标注
|
||||
/// </summary>
|
||||
public bool IsImageStandard { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// IR阅片是否显示受试者信息
|
||||
/// </summary>
|
||||
|
@ -333,8 +327,10 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
/// </summary>
|
||||
public int ArbitrationRule { get; set; } = 2;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 项目标准Id
|
||||
/// </summary>
|
||||
public List<Guid> TrialCriterionId { get; set; }
|
||||
|
||||
///// <summary>
|
||||
///// 全局阅片
|
||||
|
@ -368,21 +364,107 @@ namespace IRaCIS.Core.Application.Contracts
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 项目标准集合
|
||||
/// 项目分页
|
||||
/// </summary>
|
||||
public List<TrialReadingCriterion> TrialReadingCriterionList { get; set; }
|
||||
public List<ReadingCriterionPage> ReadingCriterionPageList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 项目裁判问题集合
|
||||
/// </summary>
|
||||
public List<TrialJudgeQuestion> TrialJudgeQuestionList { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 项目问题集合
|
||||
/// </summary>
|
||||
public List<TrialReadQuestion> TrialQuestionList { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class TrialReadQuestion
|
||||
{
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
public int ShowOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分页名称
|
||||
/// </summary>
|
||||
public string PageName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题名称
|
||||
/// </summary>
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型
|
||||
/// </summary>
|
||||
public string Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 父问题触发
|
||||
/// </summary>
|
||||
public string ParentTriggerValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 父问题名称
|
||||
/// </summary>
|
||||
public string ParentQuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是必须
|
||||
/// </summary>
|
||||
public bool IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是裁判问题
|
||||
/// </summary>
|
||||
public bool IsJudgeQuestion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分组
|
||||
/// </summary>
|
||||
public string GroupName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 答案分组
|
||||
/// </summary>
|
||||
public string AnswerGroup { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 答案组合
|
||||
/// </summary>
|
||||
public string AnswerCombination { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 裁判类型
|
||||
/// </summary>
|
||||
public JudgeTypeEnum JudgeType { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class TrialJudgeQuestion
|
||||
{
|
||||
|
||||
|
||||
public Guid ReadingQuestionCriterionTrialId { get; set; }
|
||||
|
||||
public Guid QuestionId { get; set; }
|
||||
|
|
|
@ -19,6 +19,7 @@ namespace IRaCIS.Core.Application
|
|||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
|
||||
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
||||
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
|
||||
private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
|
||||
private readonly IEasyCachingProvider _provider;
|
||||
|
||||
private readonly IRepository<TaskAllocationRule> _taskAllocationRuleRepository;
|
||||
|
@ -28,6 +29,7 @@ namespace IRaCIS.Core.Application
|
|||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
||||
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository,
|
||||
IRepository<ClinicalDataTrialSet> clinicalDataTrialSetRepository,
|
||||
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
||||
IRepository<TaskAllocationRule> taskAllocationRuleRepository,
|
||||
IEasyCachingProvider provider
|
||||
)
|
||||
|
@ -38,6 +40,7 @@ namespace IRaCIS.Core.Application
|
|||
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
||||
this._clinicalDataTrialSetRepository = clinicalDataTrialSetRepository;
|
||||
this._readingCriterionPageRepository = readingCriterionPageRepository;
|
||||
this._provider = provider;
|
||||
}
|
||||
|
||||
|
@ -51,13 +54,9 @@ namespace IRaCIS.Core.Application
|
|||
{
|
||||
GetTrialReadingInfoOutDto trialInfo= await _trialRepository.Where(x=>x.Id==inDto.TrialId).ProjectTo<GetTrialReadingInfoOutDto>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
||||
|
||||
trialInfo.TrialReadingCriterionList = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).Select(x => new TrialReadingCriterion()
|
||||
{
|
||||
CriterionName = x.CriterionName,
|
||||
Id = x.Id
|
||||
}).ToListAsync();
|
||||
|
||||
trialInfo.TrialJudgeQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrial.IsConfirm && x.IsJudgeQuestion)
|
||||
trialInfo.ReadingCriterionPageList = await _readingCriterionPageRepository.Where(x => x.TrialId == inDto.TrialId).ToListAsync();
|
||||
trialInfo.TrialCriterionId = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).Select(x => x.Id).ToListAsync();
|
||||
trialInfo.TrialJudgeQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrial.IsConfirm && x.IsJudgeQuestion && x.TrialId == inDto.TrialId)
|
||||
.Select(x => new TrialJudgeQuestion()
|
||||
{
|
||||
AnswerCombination = x.AnswerCombination,
|
||||
|
@ -68,6 +67,11 @@ namespace IRaCIS.Core.Application
|
|||
ReadingQuestionCriterionTrialId = x.ReadingQuestionCriterionTrialId
|
||||
}).ToListAsync();
|
||||
|
||||
trialInfo.TrialQuestionList= await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrial.IsConfirm&&x.TrialId==inDto.TrialId)
|
||||
.ProjectTo<TrialReadQuestion>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
|
||||
|
||||
return trialInfo;
|
||||
}
|
||||
|
||||
|
|
|
@ -228,6 +228,12 @@ namespace IRaCIS.Core.Application.Service
|
|||
|
||||
|
||||
|
||||
CreateMap<ReadingQuestionTrial, TrialReadQuestion>()
|
||||
.ForMember(t => t.PageName, u => u.MapFrom(c => c.ReadingCriterionPage.PageName))
|
||||
.ForMember(t => t.ParentQuestionName, u => u.MapFrom(c => c.ParentReadingQuestionTrial.QuestionName));
|
||||
|
||||
|
||||
|
||||
CreateMap<Trial, TrialSiteUserExportDto>()
|
||||
.ForMember(t => t.TrialSiteUserList, u => u.Ignore());
|
||||
|
||||
|
|
|
@ -0,0 +1,49 @@
|
|||
|
||||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2022-07-13 09:48:30
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
///<summary>
|
||||
///阅片标准分页
|
||||
///</summary>
|
||||
[Table("ReadingCriterionPage")]
|
||||
public class ReadingCriterionPage : Entity, IAuditAdd
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目ID
|
||||
/// </summary>
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分页名称
|
||||
/// </summary>
|
||||
public string PageName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建用户ID
|
||||
/// </summary>
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
public List<ReadingQuestionTrial> ReadingQuestionList { get; set; } = new List<ReadingQuestionTrial>();
|
||||
|
||||
|
||||
}
|
||||
}
|
|
@ -112,6 +112,17 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// </summary>
|
||||
public Guid CreateUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标准分页Id
|
||||
/// </summary>
|
||||
public Guid? ReadingCriterionPageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分页标准
|
||||
/// </summary>
|
||||
[ForeignKey("ReadingCriterionPageId")]
|
||||
public ReadingCriterionPage ReadingCriterionPage { get; set; }
|
||||
|
||||
[ForeignKey("ParentId")]
|
||||
public ReadingQuestionTrial ParentReadingQuestionTrial { get; set; }
|
||||
|
||||
|
|
|
@ -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 = "EnrollReadingCategory";
|
||||
public static readonly string TableName = "ReadingCriterionPage";
|
||||
//具体文件里面 例如service 可以配置是否分页
|
||||
}
|
||||
#>
|
||||
|
|
|
@ -1,64 +0,0 @@
|
|||
//--------------------------------------------------------------------
|
||||
// 此代码由T4模板自动生成 byzhouhang 20210918
|
||||
// 生成时间 2022-07-01 15:37:24
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
/// <summary>
|
||||
/// TaskConsistentRuleService
|
||||
/// </summary>
|
||||
[ ApiExplorerSettings(GroupName = "Test")]
|
||||
public class TaskConsistentRuleService: BaseService, ITaskConsistentRuleService
|
||||
{
|
||||
|
||||
private readonly IRepository<TaskConsistentRule> _taskConsistentRuleRepository;
|
||||
|
||||
public TaskConsistentRuleService(IRepository<TaskConsistentRule> taskConsistentRuleRepository)
|
||||
{
|
||||
_taskConsistentRuleRepository = taskConsistentRuleRepository;
|
||||
}
|
||||
|
||||
|
||||
public async Task<List<TaskConsistentRuleView>> GetTaskConsistentRuleList(TaskConsistentRuleQuery inQuery)
|
||||
{
|
||||
|
||||
|
||||
var taskConsistentRuleQueryable = _taskConsistentRuleRepository
|
||||
.ProjectTo<TaskConsistentRuleView>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await taskConsistentRuleQueryable.ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
public async Task<IResponseOutput> AddOrUpdateTaskConsistentRule(TaskConsistentRuleAddOrEdit addOrEditTaskConsistentRule)
|
||||
{
|
||||
// 在此处拷贝automapper 映射
|
||||
|
||||
|
||||
CreateMap<TaskConsistentRule, TaskConsistentRuleView>();
|
||||
// CreateMap< TaskConsistentRule,TaskConsistentRuleAddOrEdit>().ReverseMap();
|
||||
|
||||
|
||||
var entity = await _taskConsistentRuleRepository.InsertOrUpdateAsync(addOrEditTaskConsistentRule, true);
|
||||
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
|
||||
}
|
||||
|
||||
|
||||
[HttpDelete("{taskConsistentRuleId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteTaskConsistentRule(Guid taskConsistentRuleId)
|
||||
{
|
||||
var success = await _taskConsistentRuleRepository.DeleteFromQueryAsync(t => t.Id == taskConsistentRuleId,true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue