代码整理
parent
5005eba7f6
commit
8967f57f2a
|
@ -4388,86 +4388,132 @@
|
||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.GetSystemCriterionList">
|
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.GetSystemCriterionList">
|
||||||
<summary>
|
<summary>
|
||||||
获取获取系统阅片标准下拉
|
获取获取系统阅片标准下拉
|
||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.GetReadingQuestionCriterionSystemList(IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionCriterionSystemViewInDto)">
|
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.GetReadingQuestionCriterionSystemList(IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionCriterionSystemViewInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
获取系统问题标准
|
获取系统问题标准
|
||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.GetSystemCriterionSelectList">
|
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.GetSystemCriterionSelectList">
|
||||||
<summary>
|
<summary>
|
||||||
获取系统问题标准下拉
|
获取系统问题标准下拉
|
||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.AddOrUpdateReadingQuestionCriterionSystem(IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionCriterionSystemInDto)">
|
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.AddOrUpdateReadingQuestionCriterionSystem(IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionCriterionSystemInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
新增修改系统问题标准
|
新增修改系统问题标准
|
||||||
</summary>
|
</summary>
|
||||||
<param name="indto"></param>
|
<param name="indto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.DeleteReadingQuestionCriterionSystem(System.Guid)">
|
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.DeleteReadingQuestionCriterionSystem(System.Guid)">
|
||||||
<summary>
|
<summary>
|
||||||
删除系统问题标准
|
删除系统问题标准
|
||||||
</summary>
|
</summary>
|
||||||
<param name="id"></param>
|
<param name="id"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.SetSystemReadingQuestionCriterionIsCompleteConfig(IRaCIS.Core.Application.Service.Reading.Dto.SetSystemReadingQuestionCriterionIsIsCompleteConfig)">
|
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.SetSystemReadingQuestionCriterionIsCompleteConfig(IRaCIS.Core.Application.Service.Reading.Dto.SetSystemReadingQuestionCriterionIsIsCompleteConfig)">
|
||||||
<summary>
|
<summary>
|
||||||
设置系统问题标准是否完成配置
|
设置系统问题标准是否完成配置
|
||||||
</summary>
|
</summary>
|
||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.GetTrialJudgyInfo(IRaCIS.Core.Application.Service.Reading.Dto.GetTrialJudgyInfoInDto)">
|
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.GetTrialJudgyInfo(IRaCIS.Core.Application.Service.Reading.Dto.GetTrialJudgyInfoInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
获取项目裁判信息
|
获取项目裁判信息
|
||||||
</summary>
|
</summary>
|
||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.AddOrUpdateReadingQuestionCriterionTrial(IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionCriterionTrialInDto)">
|
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.AddOrUpdateReadingQuestionCriterionTrial(IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateReadingQuestionCriterionTrialInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
新增修改项目问题标准(项目)
|
新增修改项目问题标准(项目)
|
||||||
</summary>
|
</summary>
|
||||||
<param name="indto"></param>
|
<param name="indto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.SetTrialReadingQuestionCriterionIsIsCompleteConfig(IRaCIS.Core.Application.Service.Reading.Dto.SetSystemReadingQuestionCriterionIsIsCompleteConfig)">
|
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.SetTrialReadingQuestionCriterionIsIsCompleteConfig(IRaCIS.Core.Application.Service.Reading.Dto.SetSystemReadingQuestionCriterionIsIsCompleteConfig)">
|
||||||
<summary>
|
<summary>
|
||||||
设置项目标准是否完成配置
|
设置项目标准是否完成配置
|
||||||
</summary>
|
</summary>
|
||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.GetReadingQuestionCriterionTrialList(IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionCriterionTrialViewInDto)">
|
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.GetReadingQuestionCriterionTrialList(IRaCIS.Core.Application.Service.Reading.Dto.ReadingQuestionCriterionTrialViewInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
获取项目问题标准(项目)
|
获取项目问题标准(项目)
|
||||||
</summary>
|
</summary>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.DeleteReadingQuestionCriterionTrial(System.Guid)">
|
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.DeleteReadingQuestionCriterionTrial(System.Guid)">
|
||||||
<summary>
|
<summary>
|
||||||
删除项目问题标准(项目)
|
删除项目问题标准(项目)
|
||||||
</summary>
|
</summary>
|
||||||
<param name="id"></param>
|
<param name="id"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Core.Application.Service.ReadingQuestionService.SetTrialJudgyInfo(IRaCIS.Core.Application.Service.Reading.Dto.SetTrialJudgyInfoInDto)">
|
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.SetTrialJudgyInfo(IRaCIS.Core.Application.Service.Reading.Dto.SetTrialJudgyInfoInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
设置项目裁判信息
|
设置项目裁判信息
|
||||||
</summary>
|
</summary>
|
||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.AddOrUpdateReadingCriterionPage(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCriterionPageAddOrEdit)">
|
||||||
|
<summary>
|
||||||
|
新增修改项目标准分页
|
||||||
|
</summary>
|
||||||
|
<param name="addOrEditReadingCriterionPage"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.DeleteReadingCriterionPage(System.Guid)">
|
||||||
|
<summary>
|
||||||
|
删除标准分页
|
||||||
|
</summary>
|
||||||
|
<param name="Id"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.RC.ReadingQuestionService.AddSystemDataToTrila(System.Guid)">
|
||||||
|
<summary>
|
||||||
|
添加系统数据到项目里面
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.TA.ReadingQuestionService.GetTumorAssessmentList(IRaCIS.Core.Application.Service.Reading.Dto.GetTumorAssessmentListInDto)">
|
||||||
|
<summary>
|
||||||
|
获取疗效对照
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.TA.ReadingQuestionService.GetTumorAssessmentPageList(IRaCIS.Core.Application.Service.Reading.Dto.GetTumorAssessmentListInDto)">
|
||||||
|
<summary>
|
||||||
|
获取疗效对照
|
||||||
|
</summary>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.TA.ReadingQuestionService.AddOrUpdateTumorAssessment(IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateTumorAssessmentInDto)">
|
||||||
|
<summary>
|
||||||
|
新增修改疗效对照
|
||||||
|
</summary>
|
||||||
|
<param name="indto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Core.Application.Service.TA.ReadingQuestionService.DeleteTumorAssessment(System.Guid)">
|
||||||
|
<summary>
|
||||||
|
删除疗效对照
|
||||||
|
</summary>
|
||||||
|
<param name="Id"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="T:IRaCIS.Core.Application.Service.TrialExternalUserService">
|
<member name="T:IRaCIS.Core.Application.Service.TrialExternalUserService">
|
||||||
<summary>
|
<summary>
|
||||||
项目外部人员 录入流程相关
|
项目外部人员 录入流程相关
|
||||||
|
@ -6159,21 +6205,11 @@
|
||||||
是否显示详情
|
是否显示详情
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Contracts.GetOncologySetOutDto.EvaluationResult">
|
|
||||||
<summary>
|
|
||||||
评估结果
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:IRaCIS.Core.Application.Contracts.GetOncologySetOutDto.EvaluationReason">
|
<member name="P:IRaCIS.Core.Application.Contracts.GetOncologySetOutDto.EvaluationReason">
|
||||||
<summary>
|
<summary>
|
||||||
评估原因
|
评估原因
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
<member name="P:IRaCIS.Core.Application.Contracts.GetOncologySetOutDto.IsShowDetail">
|
|
||||||
<summary>
|
|
||||||
是否显示详情
|
|
||||||
</summary>
|
|
||||||
</member>
|
|
||||||
<member name="P:IRaCIS.Core.Application.Contracts.SetTrialReadingCriterionInDto.FormType">
|
<member name="P:IRaCIS.Core.Application.Contracts.SetTrialReadingCriterionInDto.FormType">
|
||||||
<summary>
|
<summary>
|
||||||
表单类型
|
表单类型
|
||||||
|
@ -7069,34 +7105,6 @@
|
||||||
<param name="addOrEditBasic"></param>
|
<param name="addOrEditBasic"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.DictionaryService.DeleteTrialConfigDictionary(System.Guid)">
|
|
||||||
<summary>
|
|
||||||
删除项目字典
|
|
||||||
</summary>
|
|
||||||
<param name="Id"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Application.Services.DictionaryService.GetTrialConfigDictionarySelect(IRaCIS.Application.Contracts.GetTrialConfigDictionarySelectInDto)">
|
|
||||||
<summary>
|
|
||||||
获取待添加的项目字典数据
|
|
||||||
</summary>
|
|
||||||
<param name="inDto"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Application.Services.DictionaryService.AddTrialConfigDictionaryList(IRaCIS.Application.Contracts.AddTrialConfigDictionaryListInDto)">
|
|
||||||
<summary>
|
|
||||||
批量添加项目字典
|
|
||||||
</summary>
|
|
||||||
<param name="inDto"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Application.Services.DictionaryService.GetTrialConfigDictionaryList(IRaCIS.Application.Contracts.GetTrialConfigDictionaryListInDto)">
|
|
||||||
<summary>
|
|
||||||
获取项目字典
|
|
||||||
</summary>
|
|
||||||
<param name="inDto"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Application.Services.DictionaryService.GetChildList(System.Guid)">
|
<member name="M:IRaCIS.Application.Services.DictionaryService.GetChildList(System.Guid)">
|
||||||
<summary>
|
<summary>
|
||||||
获取子项数组
|
获取子项数组
|
||||||
|
@ -8257,6 +8265,20 @@
|
||||||
阅片问题.标准
|
阅片问题.标准
|
||||||
</summary>
|
</summary>
|
||||||
</member>
|
</member>
|
||||||
|
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.GetAssessType(IRaCIS.Core.Application.Service.Reading.Dto.GetAssessTypeInDto)">
|
||||||
|
<summary>
|
||||||
|
获取标准字典
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
|
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.SetAssessType(IRaCIS.Core.Application.Service.Reading.Dto.SetAssessTypeInDto)">
|
||||||
|
<summary>
|
||||||
|
设置标准字典
|
||||||
|
</summary>
|
||||||
|
<param name="inDto"></param>
|
||||||
|
<returns></returns>
|
||||||
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.GetSystemGroupNameList(IRaCIS.Core.Application.Service.Reading.Dto.GetTrialGroupNameListInDto)">
|
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.GetSystemGroupNameList(IRaCIS.Core.Application.Service.Reading.Dto.GetTrialGroupNameListInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
获取系统问题分组
|
获取系统问题分组
|
||||||
|
@ -8381,52 +8403,13 @@
|
||||||
<param name="Id"></param>
|
<param name="Id"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.AddOrUpdateReadingCriterionPage(IRaCIS.Core.Application.Service.Reading.Dto.ReadingCriterionPageAddOrEdit)">
|
|
||||||
<summary>
|
|
||||||
新增修改项目标准分页
|
|
||||||
</summary>
|
|
||||||
<param name="addOrEditReadingCriterionPage"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.DeleteReadingCriterionPage(System.Guid)">
|
|
||||||
<summary>
|
|
||||||
删除标准分页
|
|
||||||
</summary>
|
|
||||||
<param name="Id"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.GetTumorAssessmentList(IRaCIS.Core.Application.Service.Reading.Dto.GetTumorAssessmentListInDto)">
|
|
||||||
<summary>
|
|
||||||
获取疗效对照
|
|
||||||
</summary>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.GetTumorAssessmentPageList(IRaCIS.Core.Application.Service.Reading.Dto.GetTumorAssessmentListInDto)">
|
|
||||||
<summary>
|
|
||||||
获取疗效对照
|
|
||||||
</summary>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.AddOrUpdateTumorAssessment(IRaCIS.Core.Application.Service.Reading.Dto.AddOrUpdateTumorAssessmentInDto)">
|
|
||||||
<summary>
|
|
||||||
新增修改疗效对照
|
|
||||||
</summary>
|
|
||||||
<param name="indto"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.DeleteTumorAssessment(System.Guid)">
|
|
||||||
<summary>
|
|
||||||
删除疗效对照
|
|
||||||
</summary>
|
|
||||||
<param name="Id"></param>
|
|
||||||
<returns></returns>
|
|
||||||
</member>
|
|
||||||
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.CopySystemCriterionData(IRaCIS.Core.Application.Service.Reading.Dto.CopySystemCriterionDataInDto)">
|
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.CopySystemCriterionData(IRaCIS.Core.Application.Service.Reading.Dto.CopySystemCriterionDataInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
复制一个系统标准到另一系统标准
|
复制一个系统标准到另一系统标准
|
||||||
</summary>
|
</summary>
|
||||||
<param name="inDto"></param>
|
<param name="inDto"></param>
|
||||||
<returns></returns>
|
<returns></returns>
|
||||||
|
|
||||||
</member>
|
</member>
|
||||||
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.SynchronizeCriterion(IRaCIS.Core.Application.Service.Reading.Dto.SynchronizeCriterionInDto)">
|
<member name="M:IRaCIS.Application.Services.ReadingQuestionService.SynchronizeCriterion(IRaCIS.Core.Application.Service.Reading.Dto.SynchronizeCriterionInDto)">
|
||||||
<summary>
|
<summary>
|
||||||
|
|
|
@ -1,372 +1,376 @@
|
||||||
//using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
//using IRaCIS.Core.Application.Interfaces;
|
using IRaCIS.Core.Application.Interfaces;
|
||||||
//using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
//using IRaCIS.Core.Infra.EFCore.Common;
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
//using MassTransit;
|
using MassTransit;
|
||||||
//using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
//using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
//using IRaCIS.Core.Application.Service.Reading.Dto;
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
//using Panda.DynamicWebApi.Attributes;
|
using Panda.DynamicWebApi.Attributes;
|
||||||
|
|
||||||
//namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service.RC
|
||||||
//{
|
{
|
||||||
|
|
||||||
|
|
||||||
// [ApiExplorerSettings(GroupName = "Reading")]
|
[ApiExplorerSettings(GroupName = "Reading")]
|
||||||
// public class ReadingQuestionService : BaseService
|
public class ReadingQuestionService : BaseService
|
||||||
// {
|
{
|
||||||
|
|
||||||
// //private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystemRepository;
|
||||||
// private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystemRepository;
|
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
|
||||||
// private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
|
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
||||||
// //private readonly IRepository<ReadingQuestionSystem> _readingQuestionSystemRepository;
|
|
||||||
// private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
|
||||||
// //private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
|
|
||||||
// //private readonly IRepository<ClinicalDataSystemSet> _clinicalDataSystemSetRepository;
|
|
||||||
// //private readonly IRepository<Dictionary> _dictionaryRepository;
|
|
||||||
// //private readonly IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository;
|
|
||||||
// //private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
|
|
||||||
// //private readonly IRepository<Trial> _trialRepository;
|
|
||||||
// //private readonly IRepository<TumorAssessment> _tumorAssessmentRepository;
|
|
||||||
// //private readonly IRepository<OrganInfo> _organInfoRepository;
|
|
||||||
// //private readonly IRepository<ReadingTableQuestionSystem> _readingTableQuestionSystemRepository;
|
|
||||||
// private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswer;
|
|
||||||
// //private readonly IRepository<PreviousPDF> _previousPDFRepository;
|
|
||||||
|
|
||||||
// public ReadingQuestionService(
|
|
||||||
// IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystemRepository,
|
|
||||||
// IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
|
||||||
// //IRepository<ReadingQuestionSystem> readingQuestionSystemRepository,
|
|
||||||
// IRepository<ReadingQuestionTrial> readingQuestionTrialRepository,
|
|
||||||
// //IRepository<ClinicalDataTrialSet> ClinicalDataTrialSetRepository,
|
|
||||||
// //IRepository<ClinicalDataSystemSet> ClinicalDataSystemSetRepository,
|
|
||||||
// //IRepository<Dictionary> dictionaryRepository,
|
|
||||||
// //IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
|
||||||
// //IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
|
||||||
// //IRepository<Trial> trialRepository,
|
|
||||||
// //IRepository<TumorAssessment> tumorAssessmentRepository,
|
|
||||||
// //IRepository<OrganInfo> organInfoRepository,
|
|
||||||
// //IRepository<ReadingTableQuestionSystem> readingTableQuestionSystemRepository,
|
|
||||||
// IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswer
|
|
||||||
// //IRepository<PreviousPDF> previousPDFRepository
|
|
||||||
// //IRepository<SubjectVisit> subjectVisitRepository,
|
|
||||||
|
|
||||||
// )
|
|
||||||
// {
|
|
||||||
// //this._subjectVisitRepository = subjectVisitRepository;
|
|
||||||
// this._readingQuestionCriterionSystemRepository = readingQuestionCriterionSystemRepository;
|
|
||||||
// this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
|
||||||
// //this._readingQuestionSystemRepository = readingQuestionSystemRepository;
|
|
||||||
// this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
|
||||||
// //this._clinicalDataTrialSetRepository = ClinicalDataTrialSetRepository;
|
|
||||||
// //this._clinicalDataSystemSetRepository = ClinicalDataSystemSetRepository;
|
|
||||||
// //this._dictionaryRepository = dictionaryRepository;
|
|
||||||
// //this._readingTableQuestionTrialRepository = readingTableQuestionTrialRepository;
|
|
||||||
// //this._readingCriterionPageRepository = readingCriterionPageRepository;
|
|
||||||
// //this._trialRepository = trialRepository;
|
|
||||||
// //this._tumorAssessmentRepository = tumorAssessmentRepository;
|
|
||||||
// //this._organInfoRepository = organInfoRepository;
|
|
||||||
// //this._readingTableQuestionSystemRepository = readingTableQuestionSystemRepository;
|
|
||||||
// this._readingTaskQuestionAnswer = readingTaskQuestionAnswer;
|
|
||||||
// //this._previousPDFRepository = previousPDFRepository;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// #region 系统标准
|
private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswer;
|
||||||
// /// <summary>
|
private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
|
||||||
// /// 获取获取系统阅片标准下拉
|
|
||||||
// /// </summary>
|
|
||||||
// /// <returns></returns>
|
|
||||||
// [HttpPost]
|
|
||||||
// public async Task<List<GetSystemCriterionListOutDto>> GetSystemCriterionList()
|
|
||||||
// {
|
|
||||||
// List<GetSystemCriterionListOutDto> result = await _readingQuestionCriterionSystemRepository.Select(x => new GetSystemCriterionListOutDto()
|
|
||||||
// {
|
|
||||||
|
|
||||||
// CriterionId = x.Id,
|
public ReadingQuestionService(
|
||||||
// CriterionName = x.CriterionName,
|
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystemRepository,
|
||||||
|
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
||||||
// }).ToListAsync();
|
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository,
|
||||||
|
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswer,
|
||||||
// return result;
|
IRepository<ReadingCriterionPage> readingCriterionPageRepository
|
||||||
// }
|
|
||||||
|
|
||||||
// /// <summary>
|
|
||||||
// /// 获取系统问题标准
|
|
||||||
// /// </summary>
|
|
||||||
// /// <returns></returns>
|
|
||||||
// [HttpPost]
|
|
||||||
// public async Task<PageOutput<ReadingQuestionCriterionSystemView>> GetReadingQuestionCriterionSystemList(ReadingQuestionCriterionSystemViewInDto inDto)
|
|
||||||
// {
|
|
||||||
// //await AddSystemQuestionCriterion();
|
|
||||||
// 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.IsNullOrEmpty() ? nameof(ReadingQuestionCriterionSystemView.ShowOrder) : inDto.SortField,
|
|
||||||
// inDto.Asc);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /// <summary>
|
|
||||||
// /// 获取系统问题标准下拉
|
|
||||||
// /// </summary>
|
|
||||||
// /// <returns></returns>
|
|
||||||
// [HttpPost]
|
|
||||||
// public async Task<List<GetSystemCriterionSelectDto>> GetSystemCriterionSelectList()
|
|
||||||
// {
|
|
||||||
// var criterionList = await _readingQuestionCriterionSystemRepository.AsQueryable()
|
|
||||||
// .OrderBy(x => x.ShowOrder)
|
|
||||||
// .Select(x => new GetSystemCriterionSelectDto()
|
|
||||||
// {
|
|
||||||
// Id = x.Id,
|
|
||||||
// CriterionName = x.CriterionName,
|
|
||||||
|
|
||||||
// }).ToListAsync();
|
|
||||||
// return criterionList;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /// <summary>
|
|
||||||
// /// 新增修改系统问题标准
|
|
||||||
// /// </summary>
|
|
||||||
// /// <param name="indto"></param>
|
|
||||||
// /// <returns></returns>
|
|
||||||
// [HttpPost]
|
|
||||||
// public async Task<IResponseOutput> AddOrUpdateReadingQuestionCriterionSystem(AddOrUpdateReadingQuestionCriterionSystemInDto indto)
|
|
||||||
// {
|
|
||||||
// var entity = await _readingQuestionCriterionSystemRepository.InsertOrUpdateAsync(indto, true);
|
|
||||||
|
|
||||||
// if (indto.Id != null)
|
|
||||||
// {
|
|
||||||
// await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x => x.ReadingQuestionCriterionSystemId == indto.Id, x => new ReadingQuestionCriterionTrial()
|
|
||||||
// {
|
|
||||||
// CriterionName = indto.CriterionName,
|
|
||||||
// CriterionType = indto.CriterionType,
|
|
||||||
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// return ResponseOutput.Ok(entity.Id.ToString());
|
|
||||||
// }
|
|
||||||
|
|
||||||
// /// <summary>
|
|
||||||
// /// 删除系统问题标准
|
|
||||||
// /// </summary>
|
|
||||||
// /// <param name="id"></param>
|
|
||||||
// /// <returns></returns>
|
|
||||||
// [HttpDelete("{id:guid}")]
|
|
||||||
// public async Task<IResponseOutput> DeleteReadingQuestionCriterionSystem(Guid id)
|
|
||||||
// {
|
|
||||||
|
|
||||||
|
|
||||||
// if (await _readingQuestionCriterionTrialRepository.AnyAsync(x => x.IsConfirm && x.ReadingQuestionCriterionSystemId == id))
|
)
|
||||||
// {
|
{
|
||||||
// throw new BusinessValidationFailedException("当前标准被引用过了,不可以删除");
|
this._readingQuestionCriterionSystemRepository = readingQuestionCriterionSystemRepository;
|
||||||
// }
|
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||||
|
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
||||||
|
|
||||||
// await _readingQuestionCriterionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
|
this._readingCriterionPageRepository = readingCriterionPageRepository;
|
||||||
// var success = await _readingQuestionCriterionSystemRepository.SaveChangesAsync();
|
|
||||||
// return ResponseOutput.Result(success);
|
this._readingTaskQuestionAnswer = readingTaskQuestionAnswer;
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#region 系统标准
|
||||||
|
/// <summary>
|
||||||
|
/// 获取获取系统阅片标准下拉
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<List<GetSystemCriterionListOutDto>> GetSystemCriterionList()
|
||||||
|
{
|
||||||
|
List<GetSystemCriterionListOutDto> result = await _readingQuestionCriterionSystemRepository.Select(x => new GetSystemCriterionListOutDto()
|
||||||
|
{
|
||||||
|
|
||||||
|
CriterionId = x.Id,
|
||||||
|
CriterionName = x.CriterionName,
|
||||||
|
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取系统问题标准
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<PageOutput<ReadingQuestionCriterionSystemView>> GetReadingQuestionCriterionSystemList(ReadingQuestionCriterionSystemViewInDto inDto)
|
||||||
|
{
|
||||||
|
//await AddSystemQuestionCriterion();
|
||||||
|
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.IsNullOrEmpty() ? nameof(ReadingQuestionCriterionSystemView.ShowOrder) : inDto.SortField,
|
||||||
|
inDto.Asc);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取系统问题标准下拉
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<List<GetSystemCriterionSelectDto>> GetSystemCriterionSelectList()
|
||||||
|
{
|
||||||
|
var criterionList = await _readingQuestionCriterionSystemRepository.AsQueryable()
|
||||||
|
.OrderBy(x => x.ShowOrder)
|
||||||
|
.Select(x => new GetSystemCriterionSelectDto()
|
||||||
|
{
|
||||||
|
Id = x.Id,
|
||||||
|
CriterionName = x.CriterionName,
|
||||||
|
|
||||||
|
}).ToListAsync();
|
||||||
|
return criterionList;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 新增修改系统问题标准
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="indto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> AddOrUpdateReadingQuestionCriterionSystem(AddOrUpdateReadingQuestionCriterionSystemInDto indto)
|
||||||
|
{
|
||||||
|
var entity = await _readingQuestionCriterionSystemRepository.InsertOrUpdateAsync(indto, true);
|
||||||
|
|
||||||
|
if (indto.Id != null)
|
||||||
|
{
|
||||||
|
await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x => x.ReadingQuestionCriterionSystemId == indto.Id, x => new ReadingQuestionCriterionTrial()
|
||||||
|
{
|
||||||
|
CriterionName = indto.CriterionName,
|
||||||
|
CriterionType = indto.CriterionType,
|
||||||
|
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 删除系统问题标准
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="id"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpDelete("{id:guid}")]
|
||||||
|
public async Task<IResponseOutput> DeleteReadingQuestionCriterionSystem(Guid id)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
if (await _readingQuestionCriterionTrialRepository.AnyAsync(x => x.IsConfirm && x.ReadingQuestionCriterionSystemId == id))
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException("当前标准被引用过了,不可以删除");
|
||||||
|
}
|
||||||
|
|
||||||
|
await _readingQuestionCriterionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||||
|
var success = await _readingQuestionCriterionSystemRepository.SaveChangesAsync();
|
||||||
|
return ResponseOutput.Result(success);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// /// <summary>
|
/// <summary>
|
||||||
// /// 设置系统问题标准是否完成配置
|
/// 设置系统问题标准是否完成配置
|
||||||
// /// </summary>
|
/// </summary>
|
||||||
// /// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
// /// <returns></returns>
|
/// <returns></returns>
|
||||||
// public async Task<IResponseOutput> SetSystemReadingQuestionCriterionIsCompleteConfig(SetSystemReadingQuestionCriterionIsIsCompleteConfig inDto)
|
public async Task<IResponseOutput> SetSystemReadingQuestionCriterionIsCompleteConfig(SetSystemReadingQuestionCriterionIsIsCompleteConfig inDto)
|
||||||
// {
|
{
|
||||||
|
|
||||||
// if (!inDto.IsCompleteConfig)
|
if (!inDto.IsCompleteConfig)
|
||||||
// {
|
{
|
||||||
// var trialCriterionIds = await _readingQuestionCriterionTrialRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.Id).Select(x => x.Id).ToListAsync();
|
var trialCriterionIds = await _readingQuestionCriterionTrialRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.Id).Select(x => x.Id).ToListAsync();
|
||||||
// if (await _readingTaskQuestionAnswer.AnyAsync(x => trialCriterionIds.Contains(x.ReadingQuestionCriterionTrialId)))
|
if (await _readingTaskQuestionAnswer.AnyAsync(x => trialCriterionIds.Contains(x.ReadingQuestionCriterionTrialId)))
|
||||||
// {
|
{
|
||||||
// return ResponseOutput.NotOk("此标准在项目里面已被使用,操作失败");
|
return ResponseOutput.NotOk("此标准在项目里面已被使用,操作失败");
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
|
|
||||||
// var systemCriterion = await _readingQuestionCriterionSystemRepository.Where(x => x.Id == inDto.Id).AsNoTracking().FirstOrDefaultAsync();
|
var systemCriterion = await _readingQuestionCriterionSystemRepository.Where(x => x.Id == inDto.Id).AsNoTracking().FirstOrDefaultAsync();
|
||||||
|
|
||||||
// var confirmTime = systemCriterion.ConfirmTime;
|
var confirmTime = systemCriterion.ConfirmTime;
|
||||||
|
|
||||||
// if (inDto.IsCompleteConfig)
|
if (inDto.IsCompleteConfig)
|
||||||
// {
|
{
|
||||||
// confirmTime = DateTime.Now;
|
confirmTime = DateTime.Now;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// await _readingQuestionCriterionSystemRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new ReadingQuestionCriterionSystem()
|
await _readingQuestionCriterionSystemRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new ReadingQuestionCriterionSystem()
|
||||||
// {
|
{
|
||||||
// IsCompleteConfig = inDto.IsCompleteConfig,
|
IsCompleteConfig = inDto.IsCompleteConfig,
|
||||||
// ConfirmTime = confirmTime,
|
ConfirmTime = confirmTime,
|
||||||
// });
|
});
|
||||||
|
|
||||||
// if (inDto.IsCompleteConfig)
|
if (inDto.IsCompleteConfig)
|
||||||
// {
|
{
|
||||||
// //await SynchronizeSystemCriterion(inDto.Id);
|
//await SynchronizeSystemCriterion(inDto.Id);
|
||||||
// }
|
}
|
||||||
// else
|
else
|
||||||
// {
|
{
|
||||||
// await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x => x.ReadingQuestionCriterionSystemId == inDto.Id, x => new ReadingQuestionCriterionTrial()
|
await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x => x.ReadingQuestionCriterionSystemId == inDto.Id, x => new ReadingQuestionCriterionTrial()
|
||||||
// {
|
{
|
||||||
// IsCompleteConfig = inDto.IsCompleteConfig
|
IsCompleteConfig = inDto.IsCompleteConfig
|
||||||
// });
|
});
|
||||||
// }
|
}
|
||||||
// var result = await _readingQuestionCriterionSystemRepository.SaveChangesAsync();
|
var result = await _readingQuestionCriterionSystemRepository.SaveChangesAsync();
|
||||||
|
|
||||||
// return ResponseOutput.Ok(result);
|
return ResponseOutput.Ok(result);
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
// #endregion
|
#endregion
|
||||||
|
|
||||||
// #region 项目标准
|
#region 项目标准
|
||||||
|
|
||||||
// /// <summary>
|
/// <summary>
|
||||||
// /// 获取项目裁判信息
|
/// 获取项目裁判信息
|
||||||
// /// </summary>
|
/// </summary>
|
||||||
// /// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
// /// <returns></returns>
|
/// <returns></returns>
|
||||||
// [HttpPost]
|
[HttpPost]
|
||||||
// public async Task<GetTrialJudgyInfoOutDto> GetTrialJudgyInfo(GetTrialJudgyInfoInDto inDto)
|
public async Task<GetTrialJudgyInfoOutDto> GetTrialJudgyInfo(GetTrialJudgyInfoInDto inDto)
|
||||||
// {
|
{
|
||||||
// GetTrialJudgyInfoOutDto result = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).Select(x => new GetTrialJudgyInfoOutDto
|
GetTrialJudgyInfoOutDto result = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).Select(x => new GetTrialJudgyInfoOutDto
|
||||||
// {
|
{
|
||||||
// TrialId = x.TrialId,
|
TrialId = x.TrialId,
|
||||||
// IsReadingTaskViewInOrder = x.IsReadingTaskViewInOrder,
|
IsReadingTaskViewInOrder = x.IsReadingTaskViewInOrder,
|
||||||
// ArbitrationRule = x.ArbitrationRule,
|
ArbitrationRule = x.ArbitrationRule,
|
||||||
// IsArbitrationReading = x.IsArbitrationReading
|
IsArbitrationReading = x.IsArbitrationReading
|
||||||
|
|
||||||
// }).FirstNotNullAsync();
|
}).FirstNotNullAsync();
|
||||||
|
|
||||||
// return result;
|
return result;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// /// <summary>
|
/// <summary>
|
||||||
// /// 新增修改项目问题标准(项目)
|
/// 新增修改项目问题标准(项目)
|
||||||
// /// </summary>
|
/// </summary>
|
||||||
// /// <param name="indto"></param>
|
/// <param name="indto"></param>
|
||||||
// /// <returns></returns>
|
/// <returns></returns>
|
||||||
// [HttpPost]
|
[HttpPost]
|
||||||
// public async Task<IResponseOutput> AddOrUpdateReadingQuestionCriterionTrial(AddOrUpdateReadingQuestionCriterionTrialInDto indto)
|
public async Task<IResponseOutput> AddOrUpdateReadingQuestionCriterionTrial(AddOrUpdateReadingQuestionCriterionTrialInDto indto)
|
||||||
// {
|
{
|
||||||
|
|
||||||
// var entity = await _readingQuestionCriterionTrialRepository.InsertOrUpdateAsync(indto, true);
|
var entity = await _readingQuestionCriterionTrialRepository.InsertOrUpdateAsync(indto, true);
|
||||||
// return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// /// <summary>
|
/// <summary>
|
||||||
// /// 设置项目标准是否完成配置
|
/// 设置项目标准是否完成配置
|
||||||
// /// </summary>
|
/// </summary>
|
||||||
// /// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
// /// <returns></returns>
|
/// <returns></returns>
|
||||||
// public async Task<IResponseOutput> SetTrialReadingQuestionCriterionIsIsCompleteConfig(SetSystemReadingQuestionCriterionIsIsCompleteConfig inDto)
|
public async Task<IResponseOutput> SetTrialReadingQuestionCriterionIsIsCompleteConfig(SetSystemReadingQuestionCriterionIsIsCompleteConfig inDto)
|
||||||
// {
|
{
|
||||||
// await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new ReadingQuestionCriterionTrial()
|
await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new ReadingQuestionCriterionTrial()
|
||||||
// {
|
{
|
||||||
// IsCompleteConfig = inDto.IsCompleteConfig
|
IsCompleteConfig = inDto.IsCompleteConfig
|
||||||
// });
|
});
|
||||||
|
|
||||||
// var result = await _readingQuestionCriterionTrialRepository.SaveChangesAsync();
|
var result = await _readingQuestionCriterionTrialRepository.SaveChangesAsync();
|
||||||
|
|
||||||
// return ResponseOutput.Ok(result);
|
return ResponseOutput.Ok(result);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// /// <summary>
|
/// <summary>
|
||||||
// /// 获取项目问题标准(项目)
|
/// 获取项目问题标准(项目)
|
||||||
// /// </summary>
|
/// </summary>
|
||||||
// /// <returns></returns>
|
/// <returns></returns>
|
||||||
// [HttpPost]
|
[HttpPost]
|
||||||
// public async Task<PageOutput<ReadingQuestionCriterionTrialView>> GetReadingQuestionCriterionTrialList(ReadingQuestionCriterionTrialViewInDto inDto)
|
public async Task<PageOutput<ReadingQuestionCriterionTrialView>> GetReadingQuestionCriterionTrialList(ReadingQuestionCriterionTrialViewInDto inDto)
|
||||||
// {
|
{
|
||||||
// //await AddSystemDataToTrila(inDto.TrialId);
|
//await AddSystemDataToTrila(inDto.TrialId);
|
||||||
// var query = _readingQuestionCriterionTrialRepository.AsQueryable()
|
var query = _readingQuestionCriterionTrialRepository.AsQueryable()
|
||||||
// .Where(x => x.TrialId == inDto.TrialId)
|
.Where(x => x.TrialId == inDto.TrialId)
|
||||||
// .Where(x => (x.ReadingQuestionCriterionSystemId != null && x.IsEnable) || x.ReadingQuestionCriterionSystemId == null)
|
.Where(x => (x.ReadingQuestionCriterionSystemId != null && x.IsEnable) || x.ReadingQuestionCriterionSystemId == null)
|
||||||
// .WhereIf(!inDto.CriterionName.IsNullOrEmpty(), x => x.CriterionName.Contains(inDto.CriterionName))
|
.WhereIf(!inDto.CriterionName.IsNullOrEmpty(), x => x.CriterionName.Contains(inDto.CriterionName))
|
||||||
|
|
||||||
// .ProjectTo<ReadingQuestionCriterionTrialView>(_mapper.ConfigurationProvider);
|
.ProjectTo<ReadingQuestionCriterionTrialView>(_mapper.ConfigurationProvider);
|
||||||
// return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField.IsNullOrEmpty() ? nameof(ReadingQuestionCriterionTrialView.ShowOrder) : inDto.SortField,
|
return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField.IsNullOrEmpty() ? nameof(ReadingQuestionCriterionTrialView.ShowOrder) : inDto.SortField,
|
||||||
// inDto.Asc);
|
inDto.Asc);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// /// <summary>
|
/// <summary>
|
||||||
// /// 删除项目问题标准(项目)
|
/// 删除项目问题标准(项目)
|
||||||
// /// </summary>
|
/// </summary>
|
||||||
// /// <param name="id"></param>
|
/// <param name="id"></param>
|
||||||
// /// <returns></returns>
|
/// <returns></returns>
|
||||||
// [HttpDelete("{id:guid}")]
|
[HttpDelete("{id:guid}")]
|
||||||
// public async Task<IResponseOutput> DeleteReadingQuestionCriterionTrial(Guid id)
|
public async Task<IResponseOutput> DeleteReadingQuestionCriterionTrial(Guid id)
|
||||||
// {
|
{
|
||||||
// await _readingQuestionCriterionTrialRepository.DeleteFromQueryAsync(t => t.Id == id);
|
await _readingQuestionCriterionTrialRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||||
// var success = await _readingQuestionCriterionTrialRepository.SaveChangesAsync();
|
var success = await _readingQuestionCriterionTrialRepository.SaveChangesAsync();
|
||||||
// return ResponseOutput.Result(success);
|
return ResponseOutput.Result(success);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// /// <summary>
|
/// <summary>
|
||||||
// /// 设置项目裁判信息
|
/// 设置项目裁判信息
|
||||||
// /// </summary>
|
/// </summary>
|
||||||
// /// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
// /// <returns></returns>
|
/// <returns></returns>
|
||||||
// [HttpPost]
|
[HttpPost]
|
||||||
// public async Task<IResponseOutput> SetTrialJudgyInfo(SetTrialJudgyInfoInDto inDto)
|
public async Task<IResponseOutput> SetTrialJudgyInfo(SetTrialJudgyInfoInDto inDto)
|
||||||
// {
|
{
|
||||||
|
|
||||||
// var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.Id == inDto.TrialReadingCriterionId).FirstOrDefaultAsync();
|
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.Id == inDto.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||||
|
|
||||||
// var judgeCount = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialCriterion.Id && x.IsJudgeQuestion)
|
var judgeCount = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialCriterion.Id && x.IsJudgeQuestion)
|
||||||
// .WhereIf(trialCriterion.FormType == FormType.SinglePage, x => x.ReadingCriterionPageId == null)
|
.WhereIf(trialCriterion.FormType == FormType.SinglePage, x => x.ReadingCriterionPageId == null)
|
||||||
// .WhereIf(trialCriterion.FormType == FormType.MultiplePage, x => x.ReadingCriterionPageId != null).CountAsync();
|
.WhereIf(trialCriterion.FormType == FormType.MultiplePage, x => x.ReadingCriterionPageId != null).CountAsync();
|
||||||
|
|
||||||
// if (judgeCount == 0 && (inDto.ArbitrationRule == ArbitrationRule.Visit || inDto.ArbitrationRule == ArbitrationRule.Reading))
|
if (judgeCount == 0 && (inDto.ArbitrationRule == ArbitrationRule.Visit || inDto.ArbitrationRule == ArbitrationRule.Reading))
|
||||||
// {
|
{
|
||||||
// throw new BusinessValidationFailedException("无裁判问题却有仲裁对象,操作失败");
|
throw new BusinessValidationFailedException("无裁判问题却有仲裁对象,操作失败");
|
||||||
// }
|
}
|
||||||
// await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
|
await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
|
||||||
// {
|
{
|
||||||
// ArbitrationRule = inDto.ArbitrationRule,
|
ArbitrationRule = inDto.ArbitrationRule,
|
||||||
// //IsArbitrationReading = inDto.IsArbitrationReading,
|
//IsArbitrationReading = inDto.IsArbitrationReading,
|
||||||
// });
|
});
|
||||||
|
|
||||||
// var result = await _readingQuestionCriterionTrialRepository.SaveChangesAsync();
|
var result = await _readingQuestionCriterionTrialRepository.SaveChangesAsync();
|
||||||
// return ResponseOutput.Ok(result);
|
return ResponseOutput.Ok(result);
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
// #endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
// /// <summary>
|
#region 项目阅片标准问题分页
|
||||||
// /// 添加系统数据到项目里面
|
|
||||||
// /// </summary>
|
|
||||||
// /// <returns></returns>
|
|
||||||
// [NonDynamicMethod]
|
|
||||||
// private async Task AddSystemDataToTrila(Guid trialId)
|
|
||||||
// {
|
|
||||||
// var trialUsrSystemIds = _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == trialId && x.ReadingQuestionCriterionSystemId != null)
|
|
||||||
// .Select(x => x.ReadingQuestionCriterionSystemId);
|
|
||||||
// var trialCriterionNames = _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == trialId)
|
|
||||||
// .Select(x => x.CriterionName);
|
|
||||||
// List<ReadingQuestionCriterionTrial> needAddCriterionList = await _readingQuestionCriterionSystemRepository.Where(x => !trialUsrSystemIds.Contains(x.Id) && x.IsEnable && !trialCriterionNames.Contains(x.CriterionName)).ProjectTo<ReadingQuestionCriterionTrial>(_mapper.ConfigurationProvider).ToListAsync();
|
|
||||||
|
|
||||||
// List<ReadingQuestionTrial> needAddQuestionList = new List<ReadingQuestionTrial>();
|
/// <summary>
|
||||||
// needAddCriterionList.ForEach(x =>
|
/// 新增修改项目标准分页
|
||||||
// {
|
/// </summary>
|
||||||
// //x.IsEnable = false;
|
/// <param name="addOrEditReadingCriterionPage"></param>
|
||||||
// x.TrialId = trialId;
|
/// <returns></returns>
|
||||||
// x.ReadingQuestionCriterionSystemId = x.Id;
|
[HttpPost]
|
||||||
// x.Id = NewId.NextGuid();
|
public async Task<IResponseOutput> AddOrUpdateReadingCriterionPage(ReadingCriterionPageAddOrEdit addOrEditReadingCriterionPage)
|
||||||
// // 同步问题暂时注释
|
{
|
||||||
// //List<ReadingQuestionTrial> readingQuestionTrialList = new List<ReadingQuestionTrial>();
|
|
||||||
// //SetChildParentQuestion(criterion.Id, trialId, systemQuestionList, readingQuestionTrialList);
|
|
||||||
// //needAddQuestionList.AddRange(readingQuestionTrialList);
|
|
||||||
// });
|
|
||||||
// await _readingQuestionCriterionTrialRepository.AddRangeAsync(needAddCriterionList);
|
|
||||||
// await _readingQuestionTrialRepository.AddRangeAsync(needAddQuestionList);
|
|
||||||
// await _readingQuestionTrialRepository.SaveChangesAsync();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// }
|
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();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 添加系统数据到项目里面
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
[NonDynamicMethod]
|
||||||
|
private async Task AddSystemDataToTrila(Guid trialId)
|
||||||
|
{
|
||||||
|
var trialUsrSystemIds = _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == trialId && x.ReadingQuestionCriterionSystemId != null)
|
||||||
|
.Select(x => x.ReadingQuestionCriterionSystemId);
|
||||||
|
var trialCriterionNames = _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == trialId)
|
||||||
|
.Select(x => x.CriterionName);
|
||||||
|
List<ReadingQuestionCriterionTrial> needAddCriterionList = await _readingQuestionCriterionSystemRepository.Where(x => !trialUsrSystemIds.Contains(x.Id) && x.IsEnable && !trialCriterionNames.Contains(x.CriterionName)).ProjectTo<ReadingQuestionCriterionTrial>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
|
List<ReadingQuestionTrial> needAddQuestionList = new List<ReadingQuestionTrial>();
|
||||||
|
needAddCriterionList.ForEach(x =>
|
||||||
|
{
|
||||||
|
//x.IsEnable = false;
|
||||||
|
x.TrialId = trialId;
|
||||||
|
x.ReadingQuestionCriterionSystemId = x.Id;
|
||||||
|
x.Id = NewId.NextGuid();
|
||||||
|
// 同步问题暂时注释
|
||||||
|
//List<ReadingQuestionTrial> readingQuestionTrialList = new List<ReadingQuestionTrial>();
|
||||||
|
//SetChildParentQuestion(criterion.Id, trialId, systemQuestionList, readingQuestionTrialList);
|
||||||
|
//needAddQuestionList.AddRange(readingQuestionTrialList);
|
||||||
|
});
|
||||||
|
await _readingQuestionCriterionTrialRepository.AddRangeAsync(needAddCriterionList);
|
||||||
|
await _readingQuestionTrialRepository.AddRangeAsync(needAddQuestionList);
|
||||||
|
await _readingQuestionTrialRepository.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -1,140 +1,91 @@
|
||||||
//using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
//using IRaCIS.Core.Application.Interfaces;
|
using IRaCIS.Core.Application.Interfaces;
|
||||||
//using IRaCIS.Core.Application.ViewModel;
|
using IRaCIS.Core.Application.ViewModel;
|
||||||
//using IRaCIS.Core.Infra.EFCore.Common;
|
using IRaCIS.Core.Infra.EFCore.Common;
|
||||||
//using MassTransit;
|
using MassTransit;
|
||||||
//using IRaCIS.Core.Infrastructure;
|
using IRaCIS.Core.Infrastructure;
|
||||||
//using IRaCIS.Core.Domain.Share;
|
using IRaCIS.Core.Domain.Share;
|
||||||
//using IRaCIS.Core.Application.Service.Reading.Dto;
|
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||||
//using Panda.DynamicWebApi.Attributes;
|
using Panda.DynamicWebApi.Attributes;
|
||||||
|
|
||||||
//namespace IRaCIS.Core.Application.Service
|
namespace IRaCIS.Core.Application.Service.TA
|
||||||
//{
|
{
|
||||||
|
|
||||||
|
|
||||||
// [ApiExplorerSettings(GroupName = "Reading")]
|
[ApiExplorerSettings(GroupName = "Reading")]
|
||||||
// public class ReadingQuestionService : BaseService
|
public class ReadingQuestionService : BaseService
|
||||||
// {
|
{
|
||||||
|
private readonly IRepository<TumorAssessment> _tumorAssessmentRepository;
|
||||||
|
|
||||||
// //private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
public ReadingQuestionService( IRepository<TumorAssessment> tumorAssessmentRepository )
|
||||||
// private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystemRepository;
|
{
|
||||||
// private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
|
this._tumorAssessmentRepository = tumorAssessmentRepository;
|
||||||
// //private readonly IRepository<ReadingQuestionSystem> _readingQuestionSystemRepository;
|
}
|
||||||
// private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
|
||||||
// //private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
|
|
||||||
// //private readonly IRepository<ClinicalDataSystemSet> _clinicalDataSystemSetRepository;
|
|
||||||
// //private readonly IRepository<Dictionary> _dictionaryRepository;
|
|
||||||
// //private readonly IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository;
|
|
||||||
// //private readonly IRepository<ReadingCriterionPage> _readingCriterionPageRepository;
|
|
||||||
// //private readonly IRepository<Trial> _trialRepository;
|
|
||||||
// //private readonly IRepository<TumorAssessment> _tumorAssessmentRepository;
|
|
||||||
// //private readonly IRepository<OrganInfo> _organInfoRepository;
|
|
||||||
// //private readonly IRepository<ReadingTableQuestionSystem> _readingTableQuestionSystemRepository;
|
|
||||||
// private readonly IRepository<ReadingTaskQuestionAnswer> _readingTaskQuestionAnswer;
|
|
||||||
// //private readonly IRepository<PreviousPDF> _previousPDFRepository;
|
|
||||||
|
|
||||||
// public ReadingQuestionService(
|
|
||||||
// IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystemRepository,
|
|
||||||
// IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
|
||||||
// //IRepository<ReadingQuestionSystem> readingQuestionSystemRepository,
|
|
||||||
// IRepository<ReadingQuestionTrial> readingQuestionTrialRepository,
|
|
||||||
// //IRepository<ClinicalDataTrialSet> ClinicalDataTrialSetRepository,
|
|
||||||
// //IRepository<ClinicalDataSystemSet> ClinicalDataSystemSetRepository,
|
|
||||||
// //IRepository<Dictionary> dictionaryRepository,
|
|
||||||
// //IRepository<ReadingTableQuestionTrial> readingTableQuestionTrialRepository,
|
|
||||||
// //IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
|
||||||
// //IRepository<Trial> trialRepository,
|
|
||||||
// //IRepository<TumorAssessment> tumorAssessmentRepository,
|
|
||||||
// //IRepository<OrganInfo> organInfoRepository,
|
|
||||||
// //IRepository<ReadingTableQuestionSystem> readingTableQuestionSystemRepository,
|
|
||||||
// IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswer
|
|
||||||
// //IRepository<PreviousPDF> previousPDFRepository
|
|
||||||
// //IRepository<SubjectVisit> subjectVisitRepository,
|
|
||||||
|
|
||||||
// )
|
|
||||||
// {
|
|
||||||
// //this._subjectVisitRepository = subjectVisitRepository;
|
|
||||||
// this._readingQuestionCriterionSystemRepository = readingQuestionCriterionSystemRepository;
|
|
||||||
// this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
|
||||||
// //this._readingQuestionSystemRepository = readingQuestionSystemRepository;
|
|
||||||
// this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
|
||||||
// //this._clinicalDataTrialSetRepository = ClinicalDataTrialSetRepository;
|
|
||||||
// //this._clinicalDataSystemSetRepository = ClinicalDataSystemSetRepository;
|
|
||||||
// //this._dictionaryRepository = dictionaryRepository;
|
|
||||||
// //this._readingTableQuestionTrialRepository = readingTableQuestionTrialRepository;
|
|
||||||
// //this._readingCriterionPageRepository = readingCriterionPageRepository;
|
|
||||||
// //this._trialRepository = trialRepository;
|
|
||||||
// //this._tumorAssessmentRepository = tumorAssessmentRepository;
|
|
||||||
// //this._organInfoRepository = organInfoRepository;
|
|
||||||
// //this._readingTableQuestionSystemRepository = readingTableQuestionSystemRepository;
|
|
||||||
// this._readingTaskQuestionAnswer = readingTaskQuestionAnswer;
|
|
||||||
// //this._previousPDFRepository = previousPDFRepository;
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
|
||||||
// /// <summary>
|
/// <summary>
|
||||||
// /// 获取疗效对照
|
/// 获取疗效对照
|
||||||
// /// </summary>
|
/// </summary>
|
||||||
// /// <returns></returns>
|
/// <returns></returns>
|
||||||
// [HttpPost]
|
[HttpPost]
|
||||||
// public async Task<List<TumorAssessmentView>> GetTumorAssessmentList(GetTumorAssessmentListInDto inDto)
|
public async Task<List<TumorAssessmentView>> GetTumorAssessmentList(GetTumorAssessmentListInDto inDto)
|
||||||
// {
|
{
|
||||||
// var result = await _tumorAssessmentRepository
|
var result = await _tumorAssessmentRepository
|
||||||
// .Where(x => x.CriterionId == inDto.CriterionId)
|
.Where(x => x.CriterionId == inDto.CriterionId)
|
||||||
// .WhereIf(inDto.OverallEfficacy != null, x => x.OverallEfficacy == inDto.OverallEfficacy)
|
.WhereIf(inDto.OverallEfficacy != null, x => x.OverallEfficacy == inDto.OverallEfficacy)
|
||||||
// .WhereIf(inDto.TargetLesion != null, x => x.TargetLesion == inDto.TargetLesion)
|
.WhereIf(inDto.TargetLesion != null, x => x.TargetLesion == inDto.TargetLesion)
|
||||||
// .WhereIf(inDto.NonTargetLesions != null, x => x.NonTargetLesions == inDto.NonTargetLesions)
|
.WhereIf(inDto.NonTargetLesions != null, x => x.NonTargetLesions == inDto.NonTargetLesions)
|
||||||
// .WhereIf(inDto.NewLesion != null, x => x.NewLesion == inDto.NewLesion)
|
.WhereIf(inDto.NewLesion != null, x => x.NewLesion == inDto.NewLesion)
|
||||||
// .ProjectTo<TumorAssessmentView>(_mapper.ConfigurationProvider).ToListAsync();
|
.ProjectTo<TumorAssessmentView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
// return result;
|
return result;
|
||||||
// }
|
}
|
||||||
|
|
||||||
// /// <summary>
|
/// <summary>
|
||||||
// /// 获取疗效对照
|
/// 获取疗效对照
|
||||||
// /// </summary>
|
/// </summary>
|
||||||
// /// <returns></returns>
|
/// <returns></returns>
|
||||||
// [HttpPost]
|
[HttpPost]
|
||||||
// public async Task<PageOutput<TumorAssessmentView>> GetTumorAssessmentPageList(GetTumorAssessmentListInDto inQuery)
|
public async Task<PageOutput<TumorAssessmentView>> GetTumorAssessmentPageList(GetTumorAssessmentListInDto inQuery)
|
||||||
// {
|
{
|
||||||
// var query = _tumorAssessmentRepository
|
var query = _tumorAssessmentRepository
|
||||||
// .Where(x => x.CriterionId == inQuery.CriterionId)
|
.Where(x => x.CriterionId == inQuery.CriterionId)
|
||||||
// .WhereIf(inQuery.OverallEfficacy != null, x => x.OverallEfficacy == inQuery.OverallEfficacy)
|
.WhereIf(inQuery.OverallEfficacy != null, x => x.OverallEfficacy == inQuery.OverallEfficacy)
|
||||||
// .WhereIf(inQuery.TargetLesion != null, x => x.TargetLesion == inQuery.TargetLesion)
|
.WhereIf(inQuery.TargetLesion != null, x => x.TargetLesion == inQuery.TargetLesion)
|
||||||
// .WhereIf(inQuery.NonTargetLesions != null, x => x.NonTargetLesions == inQuery.NonTargetLesions)
|
.WhereIf(inQuery.NonTargetLesions != null, x => x.NonTargetLesions == inQuery.NonTargetLesions)
|
||||||
// .WhereIf(inQuery.NewLesion != null, x => x.NewLesion == inQuery.NewLesion)
|
.WhereIf(inQuery.NewLesion != null, x => x.NewLesion == inQuery.NewLesion)
|
||||||
// .ProjectTo<TumorAssessmentView>(_mapper.ConfigurationProvider);
|
.ProjectTo<TumorAssessmentView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
// return await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TumorAssessmentView.Id) : inQuery.SortField, inQuery.Asc);
|
return await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TumorAssessmentView.Id) : inQuery.SortField, inQuery.Asc);
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
|
||||||
// /// <summary>
|
/// <summary>
|
||||||
// /// 新增修改疗效对照
|
/// 新增修改疗效对照
|
||||||
// /// </summary>
|
/// </summary>
|
||||||
// /// <param name="indto"></param>
|
/// <param name="indto"></param>
|
||||||
// /// <returns></returns>
|
/// <returns></returns>
|
||||||
// [HttpPost]
|
[HttpPost]
|
||||||
// public async Task<IResponseOutput> AddOrUpdateTumorAssessment(AddOrUpdateTumorAssessmentInDto indto)
|
public async Task<IResponseOutput> AddOrUpdateTumorAssessment(AddOrUpdateTumorAssessmentInDto indto)
|
||||||
// {
|
{
|
||||||
|
|
||||||
// var entity = await _tumorAssessmentRepository.InsertOrUpdateAsync(indto, true);
|
var entity = await _tumorAssessmentRepository.InsertOrUpdateAsync(indto, true);
|
||||||
|
|
||||||
// return ResponseOutput.Ok(entity.Id.ToString());
|
return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
|
||||||
// }
|
}
|
||||||
|
|
||||||
// /// <summary>
|
/// <summary>
|
||||||
// /// 删除疗效对照
|
/// 删除疗效对照
|
||||||
// /// </summary>
|
/// </summary>
|
||||||
// /// <param name="Id"></param>
|
/// <param name="Id"></param>
|
||||||
// /// <returns></returns>
|
/// <returns></returns>
|
||||||
// [HttpDelete("{Id:guid}")]
|
[HttpDelete("{Id:guid}")]
|
||||||
// public async Task<IResponseOutput> DeleteTumorAssessment(Guid Id)
|
public async Task<IResponseOutput> DeleteTumorAssessment(Guid Id)
|
||||||
// {
|
{
|
||||||
// await _tumorAssessmentRepository.DeleteFromQueryAsync(t => t.Id == Id);
|
await _tumorAssessmentRepository.DeleteFromQueryAsync(t => t.Id == Id);
|
||||||
// var success = await _tumorAssessmentRepository.SaveChangesAsync();
|
var success = await _tumorAssessmentRepository.SaveChangesAsync();
|
||||||
// return ResponseOutput.Result(success);
|
return ResponseOutput.Result(success);
|
||||||
// }
|
}
|
||||||
|
|
||||||
// }
|
}
|
||||||
//}
|
}
|
|
@ -129,270 +129,6 @@ namespace IRaCIS.Application.Services
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region 系统标准
|
|
||||||
/// <summary>
|
|
||||||
/// 获取获取系统阅片标准下拉
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<List<GetSystemCriterionListOutDto>> GetSystemCriterionList()
|
|
||||||
{
|
|
||||||
List<GetSystemCriterionListOutDto> result = await _readingQuestionCriterionSystemRepository.Select(x => new GetSystemCriterionListOutDto()
|
|
||||||
{
|
|
||||||
|
|
||||||
CriterionId = x.Id,
|
|
||||||
CriterionName = x.CriterionName,
|
|
||||||
|
|
||||||
}).ToListAsync();
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取系统问题标准
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<PageOutput<ReadingQuestionCriterionSystemView>> GetReadingQuestionCriterionSystemList(ReadingQuestionCriterionSystemViewInDto inDto)
|
|
||||||
{
|
|
||||||
//await AddSystemQuestionCriterion();
|
|
||||||
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.IsNullOrEmpty() ? nameof(ReadingQuestionCriterionSystemView.ShowOrder) : inDto.SortField,
|
|
||||||
inDto.Asc);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取系统问题标准下拉
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<List<GetSystemCriterionSelectDto>> GetSystemCriterionSelectList()
|
|
||||||
{
|
|
||||||
var criterionList = await _readingQuestionCriterionSystemRepository.AsQueryable()
|
|
||||||
.OrderBy(x => x.ShowOrder)
|
|
||||||
.Select(x => new GetSystemCriterionSelectDto()
|
|
||||||
{
|
|
||||||
Id = x.Id,
|
|
||||||
CriterionName = x.CriterionName,
|
|
||||||
|
|
||||||
}).ToListAsync();
|
|
||||||
return criterionList;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 新增修改系统问题标准
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="indto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<IResponseOutput> AddOrUpdateReadingQuestionCriterionSystem(AddOrUpdateReadingQuestionCriterionSystemInDto indto)
|
|
||||||
{
|
|
||||||
var entity = await _readingQuestionCriterionSystemRepository.InsertOrUpdateAsync(indto, true);
|
|
||||||
|
|
||||||
if (indto.Id != null)
|
|
||||||
{
|
|
||||||
await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x => x.ReadingQuestionCriterionSystemId == indto.Id, x => new ReadingQuestionCriterionTrial()
|
|
||||||
{
|
|
||||||
CriterionName = indto.CriterionName,
|
|
||||||
CriterionType = indto.CriterionType,
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 删除系统问题标准
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="id"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpDelete("{id:guid}")]
|
|
||||||
public async Task<IResponseOutput> DeleteReadingQuestionCriterionSystem(Guid id)
|
|
||||||
{
|
|
||||||
|
|
||||||
|
|
||||||
if (await _readingQuestionCriterionTrialRepository.AnyAsync(x => x.IsConfirm && x.ReadingQuestionCriterionSystemId == id))
|
|
||||||
{
|
|
||||||
throw new BusinessValidationFailedException("当前标准被引用过了,不可以删除");
|
|
||||||
}
|
|
||||||
|
|
||||||
await _readingQuestionCriterionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
|
|
||||||
var success = await _readingQuestionCriterionSystemRepository.SaveChangesAsync();
|
|
||||||
return ResponseOutput.Result(success);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 设置系统问题标准是否完成配置
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="inDto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<IResponseOutput> SetSystemReadingQuestionCriterionIsCompleteConfig(SetSystemReadingQuestionCriterionIsIsCompleteConfig inDto)
|
|
||||||
{
|
|
||||||
|
|
||||||
if (!inDto.IsCompleteConfig)
|
|
||||||
{
|
|
||||||
var trialCriterionIds = await _readingQuestionCriterionTrialRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.Id).Select(x => x.Id).ToListAsync();
|
|
||||||
if (await _readingTaskQuestionAnswer.AnyAsync(x => trialCriterionIds.Contains(x.ReadingQuestionCriterionTrialId)))
|
|
||||||
{
|
|
||||||
return ResponseOutput.NotOk("此标准在项目里面已被使用,操作失败");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var systemCriterion = await _readingQuestionCriterionSystemRepository.Where(x => x.Id == inDto.Id).AsNoTracking().FirstOrDefaultAsync();
|
|
||||||
|
|
||||||
var confirmTime = systemCriterion.ConfirmTime;
|
|
||||||
|
|
||||||
if (inDto.IsCompleteConfig)
|
|
||||||
{
|
|
||||||
confirmTime = DateTime.Now;
|
|
||||||
}
|
|
||||||
|
|
||||||
await _readingQuestionCriterionSystemRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new ReadingQuestionCriterionSystem()
|
|
||||||
{
|
|
||||||
IsCompleteConfig = inDto.IsCompleteConfig,
|
|
||||||
ConfirmTime = confirmTime,
|
|
||||||
});
|
|
||||||
|
|
||||||
if (inDto.IsCompleteConfig)
|
|
||||||
{
|
|
||||||
//await SynchronizeSystemCriterion(inDto.Id);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x => x.ReadingQuestionCriterionSystemId == inDto.Id, x => new ReadingQuestionCriterionTrial()
|
|
||||||
{
|
|
||||||
IsCompleteConfig = inDto.IsCompleteConfig
|
|
||||||
});
|
|
||||||
}
|
|
||||||
var result = await _readingQuestionCriterionSystemRepository.SaveChangesAsync();
|
|
||||||
|
|
||||||
return ResponseOutput.Ok(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 项目标准
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取项目裁判信息
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="inDto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<GetTrialJudgyInfoOutDto> GetTrialJudgyInfo(GetTrialJudgyInfoInDto inDto)
|
|
||||||
{
|
|
||||||
GetTrialJudgyInfoOutDto result = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).Select(x => new GetTrialJudgyInfoOutDto
|
|
||||||
{
|
|
||||||
TrialId = x.TrialId,
|
|
||||||
IsReadingTaskViewInOrder = x.IsReadingTaskViewInOrder,
|
|
||||||
ArbitrationRule = x.ArbitrationRule,
|
|
||||||
IsArbitrationReading = x.IsArbitrationReading
|
|
||||||
|
|
||||||
}).FirstNotNullAsync();
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 新增修改项目问题标准(项目)
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="indto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<IResponseOutput> AddOrUpdateReadingQuestionCriterionTrial(AddOrUpdateReadingQuestionCriterionTrialInDto indto)
|
|
||||||
{
|
|
||||||
|
|
||||||
var entity = await _readingQuestionCriterionTrialRepository.InsertOrUpdateAsync(indto, true);
|
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 设置项目标准是否完成配置
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="inDto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public async Task<IResponseOutput> SetTrialReadingQuestionCriterionIsIsCompleteConfig(SetSystemReadingQuestionCriterionIsIsCompleteConfig inDto)
|
|
||||||
{
|
|
||||||
await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new ReadingQuestionCriterionTrial()
|
|
||||||
{
|
|
||||||
IsCompleteConfig = inDto.IsCompleteConfig
|
|
||||||
});
|
|
||||||
|
|
||||||
var result = await _readingQuestionCriterionTrialRepository.SaveChangesAsync();
|
|
||||||
|
|
||||||
return ResponseOutput.Ok(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取项目问题标准(项目)
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<PageOutput<ReadingQuestionCriterionTrialView>> GetReadingQuestionCriterionTrialList(ReadingQuestionCriterionTrialViewInDto inDto)
|
|
||||||
{
|
|
||||||
await AddSystemDataToTrila(inDto.TrialId);
|
|
||||||
var query = _readingQuestionCriterionTrialRepository.AsQueryable()
|
|
||||||
.Where(x => x.TrialId == inDto.TrialId)
|
|
||||||
.Where(x => (x.ReadingQuestionCriterionSystemId != null && x.IsEnable) || x.ReadingQuestionCriterionSystemId == null)
|
|
||||||
.WhereIf(!inDto.CriterionName.IsNullOrEmpty(), x => x.CriterionName.Contains(inDto.CriterionName))
|
|
||||||
|
|
||||||
.ProjectTo<ReadingQuestionCriterionTrialView>(_mapper.ConfigurationProvider);
|
|
||||||
return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField.IsNullOrEmpty() ? nameof(ReadingQuestionCriterionTrialView.ShowOrder) : inDto.SortField,
|
|
||||||
inDto.Asc);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 删除项目问题标准(项目)
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="id"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpDelete("{id:guid}")]
|
|
||||||
public async Task<IResponseOutput> DeleteReadingQuestionCriterionTrial(Guid id)
|
|
||||||
{
|
|
||||||
await _readingQuestionCriterionTrialRepository.DeleteFromQueryAsync(t => t.Id == id);
|
|
||||||
var success = await _readingQuestionCriterionTrialRepository.SaveChangesAsync();
|
|
||||||
return ResponseOutput.Result(success);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 设置项目裁判信息
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="inDto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<IResponseOutput> SetTrialJudgyInfo(SetTrialJudgyInfoInDto inDto)
|
|
||||||
{
|
|
||||||
|
|
||||||
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.Id == inDto.TrialReadingCriterionId).FirstOrDefaultAsync();
|
|
||||||
|
|
||||||
var judgeCount = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialCriterion.Id && x.IsJudgeQuestion)
|
|
||||||
.WhereIf(trialCriterion.FormType == FormType.SinglePage, x => x.ReadingCriterionPageId == null)
|
|
||||||
.WhereIf(trialCriterion.FormType == FormType.MultiplePage, x => x.ReadingCriterionPageId != null).CountAsync();
|
|
||||||
|
|
||||||
if (judgeCount == 0 && (inDto.ArbitrationRule == ArbitrationRule.Visit || inDto.ArbitrationRule == ArbitrationRule.Reading))
|
|
||||||
{
|
|
||||||
throw new BusinessValidationFailedException("无裁判问题却有仲裁对象,操作失败");
|
|
||||||
}
|
|
||||||
await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
|
|
||||||
{
|
|
||||||
ArbitrationRule = inDto.ArbitrationRule,
|
|
||||||
//IsArbitrationReading = inDto.IsArbitrationReading,
|
|
||||||
});
|
|
||||||
|
|
||||||
var result = await _trialRepository.SaveChangesAsync();
|
|
||||||
return ResponseOutput.Ok(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 系统标准问题
|
#region 系统标准问题
|
||||||
|
|
||||||
|
@ -780,104 +516,9 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 项目阅片标准问题分页
|
|
||||||
|
|
||||||
/// <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();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
#region 疗效对照表
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取疗效对照
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<List<TumorAssessmentView>> GetTumorAssessmentList(GetTumorAssessmentListInDto inDto)
|
|
||||||
{
|
|
||||||
var result = await _tumorAssessmentRepository
|
|
||||||
.Where(x => x.CriterionId == inDto.CriterionId)
|
|
||||||
.WhereIf(inDto.OverallEfficacy != null, x => x.OverallEfficacy == inDto.OverallEfficacy)
|
|
||||||
.WhereIf(inDto.TargetLesion != null, x => x.TargetLesion == inDto.TargetLesion)
|
|
||||||
.WhereIf(inDto.NonTargetLesions != null, x => x.NonTargetLesions == inDto.NonTargetLesions)
|
|
||||||
.WhereIf(inDto.NewLesion != null, x => x.NewLesion == inDto.NewLesion)
|
|
||||||
.ProjectTo<TumorAssessmentView>(_mapper.ConfigurationProvider).ToListAsync();
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 获取疗效对照
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<PageOutput<TumorAssessmentView>> GetTumorAssessmentPageList(GetTumorAssessmentListInDto inQuery)
|
|
||||||
{
|
|
||||||
var query = _tumorAssessmentRepository
|
|
||||||
.Where(x => x.CriterionId == inQuery.CriterionId)
|
|
||||||
.WhereIf(inQuery.OverallEfficacy != null, x => x.OverallEfficacy == inQuery.OverallEfficacy)
|
|
||||||
.WhereIf(inQuery.TargetLesion != null, x => x.TargetLesion == inQuery.TargetLesion)
|
|
||||||
.WhereIf(inQuery.NonTargetLesions != null, x => x.NonTargetLesions == inQuery.NonTargetLesions)
|
|
||||||
.WhereIf(inQuery.NewLesion != null, x => x.NewLesion == inQuery.NewLesion)
|
|
||||||
.ProjectTo<TumorAssessmentView>(_mapper.ConfigurationProvider);
|
|
||||||
|
|
||||||
return await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TumorAssessmentView.Id) : inQuery.SortField, inQuery.Asc);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 新增修改疗效对照
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="indto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<IResponseOutput> AddOrUpdateTumorAssessment(AddOrUpdateTumorAssessmentInDto indto)
|
|
||||||
{
|
|
||||||
|
|
||||||
var entity = await _tumorAssessmentRepository.InsertOrUpdateAsync(indto, true);
|
|
||||||
|
|
||||||
return ResponseOutput.Ok(entity.Id.ToString());
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 删除疗效对照
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="Id"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[HttpDelete("{Id:guid}")]
|
|
||||||
public async Task<IResponseOutput> DeleteTumorAssessment(Guid Id)
|
|
||||||
{
|
|
||||||
await _tumorAssessmentRepository.DeleteFromQueryAsync(t => t.Id == Id);
|
|
||||||
var success = await _tumorAssessmentRepository.SaveChangesAsync();
|
|
||||||
return ResponseOutput.Result(success);
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -885,6 +526,7 @@ namespace IRaCIS.Application.Services
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
///
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<IResponseOutput> CopySystemCriterionData(CopySystemCriterionDataInDto inDto)
|
public async Task<IResponseOutput> CopySystemCriterionData(CopySystemCriterionDataInDto inDto)
|
||||||
{
|
{
|
||||||
|
@ -1534,5 +1176,374 @@ namespace IRaCIS.Application.Services
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 移动到其他服务 废弃
|
||||||
|
|
||||||
|
//#region 项目阅片标准问题分页
|
||||||
|
|
||||||
|
///// <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();
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//#region 疗效对照表
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 获取疗效对照
|
||||||
|
///// </summary>
|
||||||
|
///// <returns></returns>
|
||||||
|
//[HttpPost]
|
||||||
|
//public async Task<List<TumorAssessmentView>> GetTumorAssessmentList(GetTumorAssessmentListInDto inDto)
|
||||||
|
//{
|
||||||
|
// var result = await _tumorAssessmentRepository
|
||||||
|
// .Where(x => x.CriterionId == inDto.CriterionId)
|
||||||
|
// .WhereIf(inDto.OverallEfficacy != null, x => x.OverallEfficacy == inDto.OverallEfficacy)
|
||||||
|
// .WhereIf(inDto.TargetLesion != null, x => x.TargetLesion == inDto.TargetLesion)
|
||||||
|
// .WhereIf(inDto.NonTargetLesions != null, x => x.NonTargetLesions == inDto.NonTargetLesions)
|
||||||
|
// .WhereIf(inDto.NewLesion != null, x => x.NewLesion == inDto.NewLesion)
|
||||||
|
// .ProjectTo<TumorAssessmentView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
// return result;
|
||||||
|
//}
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 获取疗效对照
|
||||||
|
///// </summary>
|
||||||
|
///// <returns></returns>
|
||||||
|
//[HttpPost]
|
||||||
|
//public async Task<PageOutput<TumorAssessmentView>> GetTumorAssessmentPageList(GetTumorAssessmentListInDto inQuery)
|
||||||
|
//{
|
||||||
|
// var query = _tumorAssessmentRepository
|
||||||
|
// .Where(x => x.CriterionId == inQuery.CriterionId)
|
||||||
|
// .WhereIf(inQuery.OverallEfficacy != null, x => x.OverallEfficacy == inQuery.OverallEfficacy)
|
||||||
|
// .WhereIf(inQuery.TargetLesion != null, x => x.TargetLesion == inQuery.TargetLesion)
|
||||||
|
// .WhereIf(inQuery.NonTargetLesions != null, x => x.NonTargetLesions == inQuery.NonTargetLesions)
|
||||||
|
// .WhereIf(inQuery.NewLesion != null, x => x.NewLesion == inQuery.NewLesion)
|
||||||
|
// .ProjectTo<TumorAssessmentView>(_mapper.ConfigurationProvider);
|
||||||
|
|
||||||
|
// return await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrWhiteSpace(inQuery.SortField) ? nameof(TumorAssessmentView.Id) : inQuery.SortField, inQuery.Asc);
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 新增修改疗效对照
|
||||||
|
///// </summary>
|
||||||
|
///// <param name="indto"></param>
|
||||||
|
///// <returns></returns>
|
||||||
|
//[HttpPost]
|
||||||
|
//public async Task<IResponseOutput> AddOrUpdateTumorAssessment(AddOrUpdateTumorAssessmentInDto indto)
|
||||||
|
//{
|
||||||
|
|
||||||
|
// var entity = await _tumorAssessmentRepository.InsertOrUpdateAsync(indto, true);
|
||||||
|
|
||||||
|
// return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
|
||||||
|
//}
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 删除疗效对照
|
||||||
|
///// </summary>
|
||||||
|
///// <param name="Id"></param>
|
||||||
|
///// <returns></returns>
|
||||||
|
//[HttpDelete("{Id:guid}")]
|
||||||
|
//public async Task<IResponseOutput> DeleteTumorAssessment(Guid Id)
|
||||||
|
//{
|
||||||
|
// await _tumorAssessmentRepository.DeleteFromQueryAsync(t => t.Id == Id);
|
||||||
|
// var success = await _tumorAssessmentRepository.SaveChangesAsync();
|
||||||
|
// return ResponseOutput.Result(success);
|
||||||
|
//}
|
||||||
|
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//#region 系统标准
|
||||||
|
///// <summary>
|
||||||
|
///// 获取获取系统阅片标准下拉
|
||||||
|
///// </summary>
|
||||||
|
///// <returns></returns>
|
||||||
|
//[HttpPost]
|
||||||
|
//public async Task<List<GetSystemCriterionListOutDto>> GetSystemCriterionList()
|
||||||
|
//{
|
||||||
|
// List<GetSystemCriterionListOutDto> result = await _readingQuestionCriterionSystemRepository.Select(x => new GetSystemCriterionListOutDto()
|
||||||
|
// {
|
||||||
|
|
||||||
|
// CriterionId = x.Id,
|
||||||
|
// CriterionName = x.CriterionName,
|
||||||
|
|
||||||
|
// }).ToListAsync();
|
||||||
|
|
||||||
|
// return result;
|
||||||
|
//}
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 获取系统问题标准
|
||||||
|
///// </summary>
|
||||||
|
///// <returns></returns>
|
||||||
|
//[HttpPost]
|
||||||
|
//public async Task<PageOutput<ReadingQuestionCriterionSystemView>> GetReadingQuestionCriterionSystemList(ReadingQuestionCriterionSystemViewInDto inDto)
|
||||||
|
//{
|
||||||
|
// //await AddSystemQuestionCriterion();
|
||||||
|
// 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.IsNullOrEmpty() ? nameof(ReadingQuestionCriterionSystemView.ShowOrder) : inDto.SortField,
|
||||||
|
// inDto.Asc);
|
||||||
|
//}
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 获取系统问题标准下拉
|
||||||
|
///// </summary>
|
||||||
|
///// <returns></returns>
|
||||||
|
//[HttpPost]
|
||||||
|
//public async Task<List<GetSystemCriterionSelectDto>> GetSystemCriterionSelectList()
|
||||||
|
//{
|
||||||
|
// var criterionList = await _readingQuestionCriterionSystemRepository.AsQueryable()
|
||||||
|
// .OrderBy(x => x.ShowOrder)
|
||||||
|
// .Select(x => new GetSystemCriterionSelectDto()
|
||||||
|
// {
|
||||||
|
// Id = x.Id,
|
||||||
|
// CriterionName = x.CriterionName,
|
||||||
|
|
||||||
|
// }).ToListAsync();
|
||||||
|
// return criterionList;
|
||||||
|
//}
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 新增修改系统问题标准
|
||||||
|
///// </summary>
|
||||||
|
///// <param name="indto"></param>
|
||||||
|
///// <returns></returns>
|
||||||
|
//[HttpPost]
|
||||||
|
//public async Task<IResponseOutput> AddOrUpdateReadingQuestionCriterionSystem(AddOrUpdateReadingQuestionCriterionSystemInDto indto)
|
||||||
|
//{
|
||||||
|
// var entity = await _readingQuestionCriterionSystemRepository.InsertOrUpdateAsync(indto, true);
|
||||||
|
|
||||||
|
// if (indto.Id != null)
|
||||||
|
// {
|
||||||
|
// await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x => x.ReadingQuestionCriterionSystemId == indto.Id, x => new ReadingQuestionCriterionTrial()
|
||||||
|
// {
|
||||||
|
// CriterionName = indto.CriterionName,
|
||||||
|
// CriterionType = indto.CriterionType,
|
||||||
|
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
//}
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 删除系统问题标准
|
||||||
|
///// </summary>
|
||||||
|
///// <param name="id"></param>
|
||||||
|
///// <returns></returns>
|
||||||
|
//[HttpDelete("{id:guid}")]
|
||||||
|
//public async Task<IResponseOutput> DeleteReadingQuestionCriterionSystem(Guid id)
|
||||||
|
//{
|
||||||
|
|
||||||
|
|
||||||
|
// if (await _readingQuestionCriterionTrialRepository.AnyAsync(x => x.IsConfirm && x.ReadingQuestionCriterionSystemId == id))
|
||||||
|
// {
|
||||||
|
// throw new BusinessValidationFailedException("当前标准被引用过了,不可以删除");
|
||||||
|
// }
|
||||||
|
|
||||||
|
// await _readingQuestionCriterionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||||
|
// var success = await _readingQuestionCriterionSystemRepository.SaveChangesAsync();
|
||||||
|
// return ResponseOutput.Result(success);
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 设置系统问题标准是否完成配置
|
||||||
|
///// </summary>
|
||||||
|
///// <param name="inDto"></param>
|
||||||
|
///// <returns></returns>
|
||||||
|
//public async Task<IResponseOutput> SetSystemReadingQuestionCriterionIsCompleteConfig(SetSystemReadingQuestionCriterionIsIsCompleteConfig inDto)
|
||||||
|
//{
|
||||||
|
|
||||||
|
// if (!inDto.IsCompleteConfig)
|
||||||
|
// {
|
||||||
|
// var trialCriterionIds = await _readingQuestionCriterionTrialRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.Id).Select(x => x.Id).ToListAsync();
|
||||||
|
// if (await _readingTaskQuestionAnswer.AnyAsync(x => trialCriterionIds.Contains(x.ReadingQuestionCriterionTrialId)))
|
||||||
|
// {
|
||||||
|
// return ResponseOutput.NotOk("此标准在项目里面已被使用,操作失败");
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// var systemCriterion = await _readingQuestionCriterionSystemRepository.Where(x => x.Id == inDto.Id).AsNoTracking().FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
// var confirmTime = systemCriterion.ConfirmTime;
|
||||||
|
|
||||||
|
// if (inDto.IsCompleteConfig)
|
||||||
|
// {
|
||||||
|
// confirmTime = DateTime.Now;
|
||||||
|
// }
|
||||||
|
|
||||||
|
// await _readingQuestionCriterionSystemRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new ReadingQuestionCriterionSystem()
|
||||||
|
// {
|
||||||
|
// IsCompleteConfig = inDto.IsCompleteConfig,
|
||||||
|
// ConfirmTime = confirmTime,
|
||||||
|
// });
|
||||||
|
|
||||||
|
// if (inDto.IsCompleteConfig)
|
||||||
|
// {
|
||||||
|
// //await SynchronizeSystemCriterion(inDto.Id);
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x => x.ReadingQuestionCriterionSystemId == inDto.Id, x => new ReadingQuestionCriterionTrial()
|
||||||
|
// {
|
||||||
|
// IsCompleteConfig = inDto.IsCompleteConfig
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// var result = await _readingQuestionCriterionSystemRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
// return ResponseOutput.Ok(result);
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
//#endregion
|
||||||
|
|
||||||
|
//#region 项目标准
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 获取项目裁判信息
|
||||||
|
///// </summary>
|
||||||
|
///// <param name="inDto"></param>
|
||||||
|
///// <returns></returns>
|
||||||
|
//[HttpPost]
|
||||||
|
//public async Task<GetTrialJudgyInfoOutDto> GetTrialJudgyInfo(GetTrialJudgyInfoInDto inDto)
|
||||||
|
//{
|
||||||
|
// GetTrialJudgyInfoOutDto result = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).Select(x => new GetTrialJudgyInfoOutDto
|
||||||
|
// {
|
||||||
|
// TrialId = x.TrialId,
|
||||||
|
// IsReadingTaskViewInOrder = x.IsReadingTaskViewInOrder,
|
||||||
|
// ArbitrationRule = x.ArbitrationRule,
|
||||||
|
// IsArbitrationReading = x.IsArbitrationReading
|
||||||
|
|
||||||
|
// }).FirstNotNullAsync();
|
||||||
|
|
||||||
|
// return result;
|
||||||
|
//}
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 新增修改项目问题标准(项目)
|
||||||
|
///// </summary>
|
||||||
|
///// <param name="indto"></param>
|
||||||
|
///// <returns></returns>
|
||||||
|
//[HttpPost]
|
||||||
|
//public async Task<IResponseOutput> AddOrUpdateReadingQuestionCriterionTrial(AddOrUpdateReadingQuestionCriterionTrialInDto indto)
|
||||||
|
//{
|
||||||
|
|
||||||
|
// var entity = await _readingQuestionCriterionTrialRepository.InsertOrUpdateAsync(indto, true);
|
||||||
|
// return ResponseOutput.Ok(entity.Id.ToString());
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 设置项目标准是否完成配置
|
||||||
|
///// </summary>
|
||||||
|
///// <param name="inDto"></param>
|
||||||
|
///// <returns></returns>
|
||||||
|
//public async Task<IResponseOutput> SetTrialReadingQuestionCriterionIsIsCompleteConfig(SetSystemReadingQuestionCriterionIsIsCompleteConfig inDto)
|
||||||
|
//{
|
||||||
|
// await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new ReadingQuestionCriterionTrial()
|
||||||
|
// {
|
||||||
|
// IsCompleteConfig = inDto.IsCompleteConfig
|
||||||
|
// });
|
||||||
|
|
||||||
|
// var result = await _readingQuestionCriterionTrialRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
// return ResponseOutput.Ok(result);
|
||||||
|
//}
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 获取项目问题标准(项目)
|
||||||
|
///// </summary>
|
||||||
|
///// <returns></returns>
|
||||||
|
//[HttpPost]
|
||||||
|
//public async Task<PageOutput<ReadingQuestionCriterionTrialView>> GetReadingQuestionCriterionTrialList(ReadingQuestionCriterionTrialViewInDto inDto)
|
||||||
|
//{
|
||||||
|
// await AddSystemDataToTrila(inDto.TrialId);
|
||||||
|
// var query = _readingQuestionCriterionTrialRepository.AsQueryable()
|
||||||
|
// .Where(x => x.TrialId == inDto.TrialId)
|
||||||
|
// .Where(x => (x.ReadingQuestionCriterionSystemId != null && x.IsEnable) || x.ReadingQuestionCriterionSystemId == null)
|
||||||
|
// .WhereIf(!inDto.CriterionName.IsNullOrEmpty(), x => x.CriterionName.Contains(inDto.CriterionName))
|
||||||
|
|
||||||
|
// .ProjectTo<ReadingQuestionCriterionTrialView>(_mapper.ConfigurationProvider);
|
||||||
|
// return await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField.IsNullOrEmpty() ? nameof(ReadingQuestionCriterionTrialView.ShowOrder) : inDto.SortField,
|
||||||
|
// inDto.Asc);
|
||||||
|
//}
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 删除项目问题标准(项目)
|
||||||
|
///// </summary>
|
||||||
|
///// <param name="id"></param>
|
||||||
|
///// <returns></returns>
|
||||||
|
//[HttpDelete("{id:guid}")]
|
||||||
|
//public async Task<IResponseOutput> DeleteReadingQuestionCriterionTrial(Guid id)
|
||||||
|
//{
|
||||||
|
// await _readingQuestionCriterionTrialRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||||
|
// var success = await _readingQuestionCriterionTrialRepository.SaveChangesAsync();
|
||||||
|
// return ResponseOutput.Result(success);
|
||||||
|
//}
|
||||||
|
|
||||||
|
///// <summary>
|
||||||
|
///// 设置项目裁判信息
|
||||||
|
///// </summary>
|
||||||
|
///// <param name="inDto"></param>
|
||||||
|
///// <returns></returns>
|
||||||
|
//[HttpPost]
|
||||||
|
//public async Task<IResponseOutput> SetTrialJudgyInfo(SetTrialJudgyInfoInDto inDto)
|
||||||
|
//{
|
||||||
|
|
||||||
|
// var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.Id == inDto.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
// var judgeCount = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialCriterion.Id && x.IsJudgeQuestion)
|
||||||
|
// .WhereIf(trialCriterion.FormType == FormType.SinglePage, x => x.ReadingCriterionPageId == null)
|
||||||
|
// .WhereIf(trialCriterion.FormType == FormType.MultiplePage, x => x.ReadingCriterionPageId != null).CountAsync();
|
||||||
|
|
||||||
|
// if (judgeCount == 0 && (inDto.ArbitrationRule == ArbitrationRule.Visit || inDto.ArbitrationRule == ArbitrationRule.Reading))
|
||||||
|
// {
|
||||||
|
// throw new BusinessValidationFailedException("无裁判问题却有仲裁对象,操作失败");
|
||||||
|
// }
|
||||||
|
// await _readingQuestionCriterionTrialRepository.UpdatePartialFromQueryAsync(inDto.TrialReadingCriterionId, x => new ReadingQuestionCriterionTrial()
|
||||||
|
// {
|
||||||
|
// ArbitrationRule = inDto.ArbitrationRule,
|
||||||
|
// //IsArbitrationReading = inDto.IsArbitrationReading,
|
||||||
|
// });
|
||||||
|
|
||||||
|
// var result = await _trialRepository.SaveChangesAsync();
|
||||||
|
// return ResponseOutput.Ok(result);
|
||||||
|
//}
|
||||||
|
|
||||||
|
|
||||||
|
//#endregion
|
||||||
|
#endregion
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue