合并
This commit is contained in:
-2
@@ -3,9 +3,7 @@
|
||||
// 生成时间 2023-03-17 11:59:00
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace IRaCIS.Core.Application.ViewModel
|
||||
|
||||
+6
-9
@@ -3,9 +3,6 @@
|
||||
// 生成时间 2023-03-17 11:58:25
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace IRaCIS.Core.Application.ViewModel
|
||||
@@ -29,8 +26,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
public ImageFilterState? ImageFilterState { get; set; }
|
||||
public ImageDeterminationResultState? ImageDeterminationResultState { get; set; }
|
||||
public ImageFilterState? ImageFilterState { get; set; }
|
||||
public ImageDeterminationResultState? ImageDeterminationResultState { get; set; }
|
||||
|
||||
|
||||
public bool? IsGeneratedTask { get; set; }
|
||||
@@ -42,7 +39,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
}
|
||||
|
||||
///<summary>SubjectCriteriaEvaluationVisitFilterQuery 列表查询参数模型</summary>
|
||||
public class SubjectCriteriaEvaluationVisitFilterQuery
|
||||
public class SubjectCriteriaEvaluationVisitFilterQuery
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
@@ -81,7 +78,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
|
||||
public List<Guid> SubjectVisitIdList { get; set; }=new List<Guid>();
|
||||
public List<Guid> SubjectVisitIdList { get; set; } = new List<Guid>();
|
||||
}
|
||||
|
||||
|
||||
@@ -145,9 +142,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
|
||||
public class SelctStudySeriesView
|
||||
{
|
||||
public List<SelectStudyView> StudyList { get; set; }=new List<SelectStudyView>();
|
||||
public List<SelectStudyView> StudyList { get; set; } = new List<SelectStudyView>();
|
||||
|
||||
public List<SelectSeriesView> SeriesList { get; set; }=new List<SelectSeriesView>();
|
||||
public List<SelectSeriesView> SeriesList { get; set; } = new List<SelectSeriesView>();
|
||||
}
|
||||
|
||||
public class SelectStudyView
|
||||
|
||||
-3
@@ -3,9 +3,6 @@
|
||||
// 生成时间 2023-03-17 11:58:25
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
namespace IRaCIS.Core.Application.ViewModel
|
||||
{
|
||||
/// <summary> SubjectCriteriaEvaluationVisitStudyFilterView 列表视图模型 </summary>
|
||||
|
||||
+6
-7
@@ -4,13 +4,12 @@
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
namespace IRaCIS.Core.Application.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// ISubjectCriteriaEvaluationService
|
||||
/// </summary>
|
||||
public interface ISubjectCriteriaEvaluationService
|
||||
{
|
||||
/// <summary>
|
||||
/// ISubjectCriteriaEvaluationService
|
||||
/// </summary>
|
||||
public interface ISubjectCriteriaEvaluationService
|
||||
{
|
||||
|
||||
|
||||
@@ -22,4 +21,4 @@ namespace IRaCIS.Core.Application.Interfaces
|
||||
|
||||
Task AutoSubjectCriteriaEvaluationVisitFilter(Guid subjectId, Guid subjectVisitId, Guid trialReadingCriterionId);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+13
-22
@@ -4,22 +4,13 @@
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Application.Contracts.DTO;
|
||||
using System.Linq;
|
||||
using System.Linq.Dynamic.Core;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using DocumentFormat.OpenXml.Spreadsheet;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using IRaCIS.Core.Domain.Share.Reading;
|
||||
using System.Runtime.InteropServices;
|
||||
using DocumentFormat.OpenXml.Bibliography;
|
||||
using System.Linq.Expressions;
|
||||
using MathNet.Numerics.Statistics.Mcmc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using System.Linq.Dynamic.Core;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
@@ -43,7 +34,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
IRepository<VisitTaskReReading> _visitTaskReReadingRepository) : BaseService, ISubjectCriteriaEvaluationService
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -52,7 +43,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput<PageOutput<SubjectCriteriaEvaluationView>> > GetSubjectCriteriaEvaluationList(SubjectCriteriaEvaluationQuery inQuery)
|
||||
public async Task<IResponseOutput<PageOutput<SubjectCriteriaEvaluationView>>> GetSubjectCriteriaEvaluationList(SubjectCriteriaEvaluationQuery inQuery)
|
||||
{
|
||||
|
||||
var trialReadingCritionList = _trialReadingCriterionRepository.Where(t => t.TrialId == inQuery.TrialId).ToList();
|
||||
@@ -84,7 +75,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
var questionIdList = addtionalQustionInfoList.Select(t => t.QuestionId).ToList();
|
||||
|
||||
|
||||
var subjectCriteriaEvaluationQueryable = from subject in _subjectRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsDeleted==false)
|
||||
var subjectCriteriaEvaluationQueryable = from subject in _subjectRepository.Where(t => t.TrialId == inQuery.TrialId && t.IsDeleted == false)
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.SubjectCode), t => t.Code.Contains(inQuery.SubjectCode))
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(inQuery.TrialSiteCode), t => t.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode))
|
||||
.WhereIf(inQuery.SubjectStatus != null, t => t.Status == inQuery.SubjectStatus)
|
||||
@@ -105,8 +96,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
Id = subjectCriteriaEvaluation.Id,
|
||||
TrialReadingCriterionId = inQuery.TrialReadingCriterionId,
|
||||
|
||||
IsImageFiltering = subject.SubjectCriteriaEvaluationVisitFilterList.Any(t => t.TrialReadingCriterionId== inQuery.TrialReadingCriterionId
|
||||
&& t.ImageFilterState == ImageFilterState.None),
|
||||
IsImageFiltering = subject.SubjectCriteriaEvaluationVisitFilterList.Any(t => t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId
|
||||
&& t.ImageFilterState == ImageFilterState.None),
|
||||
|
||||
IsJoinEvaluation = subjectCriteriaEvaluation.IsJoinEvaluation,
|
||||
|
||||
@@ -128,7 +119,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
var pageList = await subjectCriteriaEvaluationQueryable
|
||||
.WhereIf(inQuery.IsImageFiltering != null, t => t.IsImageFiltering == inQuery.IsImageFiltering)
|
||||
.WhereIf(inQuery.IsJoinEvaluation != null, t => t.IsJoinEvaluation == inQuery.IsJoinEvaluation)
|
||||
.ToPagedListAsync(inQuery,nameof(SubjectCriteriaEvaluationView.SubjectCode));
|
||||
.ToPagedListAsync(inQuery, nameof(SubjectCriteriaEvaluationView.SubjectCode));
|
||||
|
||||
|
||||
foreach (var item in pageList.CurrentPageData)
|
||||
@@ -215,7 +206,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
|
||||
|
||||
return ResponseOutput.Ok (pageList, addtionalQustionInfoList);
|
||||
return ResponseOutput.Ok(pageList, addtionalQustionInfoList);
|
||||
}
|
||||
|
||||
|
||||
@@ -253,7 +244,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -478,9 +469,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
public async Task<IResponseOutput> BatchGenerateTask(BatchGenerateTaskCommand batchGenerateTaskCommand)
|
||||
{
|
||||
|
||||
var trakingList= await _subjectCriteriaEvaluationVisitFilterRepository.Where(t => t.SubjectId == batchGenerateTaskCommand.SubjectId
|
||||
var trakingList = await _subjectCriteriaEvaluationVisitFilterRepository.Where(t => t.SubjectId == batchGenerateTaskCommand.SubjectId
|
||||
&& t.TrialReadingCriterionId == batchGenerateTaskCommand.TrialReadingCriterionId
|
||||
&& batchGenerateTaskCommand.SubjectVisitIdList.Contains(t.SubjectVisitId),true).ToListAsync();
|
||||
&& batchGenerateTaskCommand.SubjectVisitIdList.Contains(t.SubjectVisitId), true).ToListAsync();
|
||||
|
||||
foreach (var item in trakingList)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,16 +1,11 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using MassTransit;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using System.Linq;
|
||||
using System.Linq.Expressions;
|
||||
using System;
|
||||
using MathNet.Numerics.Optimization.LineSearch;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
/// <summary>
|
||||
/// 临床数据配置
|
||||
@@ -30,7 +25,7 @@ namespace IRaCIS.Application.Services
|
||||
IRepository<TrialClinicalQuestion> _trialClinicalQuestionRepository,
|
||||
IRepository<SystemClinicalQuestion> _systemClinicalQuestionRepository) : BaseService
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -44,17 +39,17 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
||||
var isNeedVerify = await _clinicalDataSystemSetRepository.AnyAsync(x => x.Id == inDto.SystemClinicalId && (x.ClinicalDataLevel == ClinicalLevel.ImageRead || x.ClinicalDataLevel == ClinicalLevel.OncologyRead)
|
||||
&& x.ClinicalUploadType == ClinicalUploadType.Structuring && x.UploadRole == UploadRole.CRC
|
||||
&& x.ClinicalUploadType == ClinicalUploadType.Structuring && x.UploadRole == UploadRole.CRC
|
||||
);
|
||||
|
||||
if (_systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId).Count() == 0)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ClinicalComment_dataNotConfigured"]);
|
||||
}
|
||||
if (isNeedVerify&&_systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId && x.IsCheckDate).Count() != 1)
|
||||
if (_systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId).Count() == 0)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ClinicalComment_dataNotConfigured"]);
|
||||
}
|
||||
if (isNeedVerify && _systemClinicalQuestionRepository.Where(x => x.SystemClinicalId == inDto.SystemClinicalId && x.IsCheckDate).Count() != 1)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ClinicalDataSet_Apply"]);
|
||||
|
||||
|
||||
}
|
||||
|
||||
await _clinicalDataSystemSetRepository.UpdatePartialFromQueryAsync(x => x.Id == inDto.SystemClinicalId, x => new ClinicalDataSystemSet()
|
||||
@@ -78,16 +73,16 @@ namespace IRaCIS.Application.Services
|
||||
public async Task<IResponseOutput> ApplyTrialClinical(ApplyTrialClinicalInDto inDto)
|
||||
{
|
||||
|
||||
var isNeedVerify = await _clinicalDataTrialSetRepository.AnyAsync(x => x.Id == inDto.TrialClinicalId && (x.ClinicalDataLevel == ClinicalLevel.ImageRead|| x.ClinicalDataLevel==ClinicalLevel.OncologyRead)
|
||||
&& x.ClinicalUploadType == ClinicalUploadType.Structuring && x.UploadRole == UploadRole.CRC
|
||||
);
|
||||
var isNeedVerify = await _clinicalDataTrialSetRepository.AnyAsync(x => x.Id == inDto.TrialClinicalId && (x.ClinicalDataLevel == ClinicalLevel.ImageRead || x.ClinicalDataLevel == ClinicalLevel.OncologyRead)
|
||||
&& x.ClinicalUploadType == ClinicalUploadType.Structuring && x.UploadRole == UploadRole.CRC
|
||||
);
|
||||
|
||||
if (_trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId).Count() == 0)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ClinicalComment_dataNotConfigured"]);
|
||||
}
|
||||
throw new BusinessValidationFailedException(_localizer["ClinicalComment_dataNotConfigured"]);
|
||||
}
|
||||
|
||||
if (isNeedVerify&&_trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId && x.IsCheckDate).Count() != 1)
|
||||
if (isNeedVerify && _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId && x.IsCheckDate).Count() != 1)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ClinicalDataSet_Apply"]);
|
||||
|
||||
@@ -121,11 +116,11 @@ namespace IRaCIS.Application.Services
|
||||
var dictionary = await _dictionaryRepository.Where(x => x.Parent.Code == "ClinicalDataType" && x.Code == indto.ClinicalDataSetEnum.ToString()).FirstNotNullAsync();
|
||||
indto.ClinicalDataSetName = dictionary.ValueCN;
|
||||
indto.ClinicalDataSetEnName = dictionary.Value;
|
||||
var existsQuery = _clinicalDataSystemSetRepository
|
||||
var existsQuery = _clinicalDataSystemSetRepository
|
||||
.WhereIf(indto.Id != null, x => x.Id != indto.Id)
|
||||
.Where(x => x.ClinicalDataSetName == indto.ClinicalDataSetName||x.ClinicalDataSetEnName==indto.ClinicalDataSetEnName);
|
||||
.Where(x => x.ClinicalDataSetName == indto.ClinicalDataSetName || x.ClinicalDataSetEnName == indto.ClinicalDataSetEnName);
|
||||
|
||||
|
||||
|
||||
|
||||
if (await existsQuery.AnyAsync())
|
||||
{
|
||||
@@ -133,7 +128,7 @@ namespace IRaCIS.Application.Services
|
||||
return ResponseOutput.NotOk(_localizer["ClinicalDataSet_DupTypeFail"]);
|
||||
}
|
||||
|
||||
indto.CriterionEnumListStr= $"|{String.Join('|', indto.CriterionEnumList)}|";
|
||||
indto.CriterionEnumListStr = $"|{String.Join('|', indto.CriterionEnumList)}|";
|
||||
|
||||
var entity = await _clinicalDataSystemSetRepository.InsertOrUpdateAsync(indto);
|
||||
|
||||
@@ -203,7 +198,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
var existsQuery = _clinicalDataTrialSetRepository
|
||||
.WhereIf(indto.Id != null, x => x.Id != indto.Id)
|
||||
.Where(x => (x.ClinicalDataSetName == indto.ClinicalDataSetName||x.ClinicalDataSetEnName==indto.ClinicalDataSetEnName) && x.TrialId == indto.TrialId);
|
||||
.Where(x => (x.ClinicalDataSetName == indto.ClinicalDataSetName || x.ClinicalDataSetEnName == indto.ClinicalDataSetEnName) && x.TrialId == indto.TrialId);
|
||||
|
||||
if (await existsQuery.AnyAsync())
|
||||
{
|
||||
@@ -220,7 +215,7 @@ namespace IRaCIS.Application.Services
|
||||
//var entity = _mapper.Map<TEntity>(from);
|
||||
|
||||
indto.CreateTime = DateTime.Now;
|
||||
var entity = await _clinicalDataTrialSetRepository.InsertOrUpdateAsync(indto);
|
||||
var entity = await _clinicalDataTrialSetRepository.InsertOrUpdateAsync(indto);
|
||||
|
||||
entity.TrialClinicalDataSetCriteriaList = indto.TrialCriterionIdList.Select(t => new TrialClinicalDataSetCriterion()
|
||||
{
|
||||
@@ -256,40 +251,40 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
await this.AddTrialClinicalDataTrialSet(inDto.TrialId);
|
||||
Expression<Func<ClinicalDataTrialSet, bool>> predicate = null;
|
||||
if (inDto.CriterionIds != null)
|
||||
if (inDto.CriterionIds != null)
|
||||
{
|
||||
|
||||
List<string> criterionTypes = (await _iReadingQuestionCriterionTrialRepository.Where(x => inDto.CriterionIds.Contains(x.Id)).Select(x => x.CriterionType).ToListAsync())
|
||||
.Select(x => ((int)x).ToString()).ToList();
|
||||
predicate = x =>x.SystemClinicalDataSetId == null;
|
||||
List<string> criterionTypes = (await _iReadingQuestionCriterionTrialRepository.Where(x => inDto.CriterionIds.Contains(x.Id)).Select(x => x.CriterionType).ToListAsync())
|
||||
.Select(x => ((int)x).ToString()).ToList();
|
||||
predicate = x => x.SystemClinicalDataSetId == null;
|
||||
foreach (var item in criterionTypes)
|
||||
{
|
||||
Expression<Func<ClinicalDataTrialSet, bool>> typeExpression = x =>x.ClinicalDataSystemSet==null|| x.ClinicalDataSystemSet.CriterionEnumListStr.Contains(item);
|
||||
Expression<Func<ClinicalDataTrialSet, bool>> typeExpression = x => x.ClinicalDataSystemSet == null || x.ClinicalDataSystemSet.CriterionEnumListStr.Contains(item);
|
||||
predicate = predicate.Or(typeExpression);
|
||||
|
||||
}
|
||||
}
|
||||
var trialClinicalDataList = await _clinicalDataTrialSetRepository.AsQueryable()
|
||||
}
|
||||
}
|
||||
var trialClinicalDataList = await _clinicalDataTrialSetRepository.AsQueryable()
|
||||
.Where(x => x.TrialId == inDto.TrialId)
|
||||
.WhereIf(inDto.CriterionIds != null, predicate)
|
||||
.WhereIf(inDto.ClinicalDataLevel != null, x => x.ClinicalDataLevel == inDto.ClinicalDataLevel)
|
||||
.WhereIf(inDto.ClinicalUploadType != null, x => x.ClinicalUploadType == inDto.ClinicalUploadType)
|
||||
.WhereIf(inDto.ClinicalDataSetName != String.Empty, x => x.ClinicalDataSetName.Contains(inDto.ClinicalDataSetName))
|
||||
.ProjectTo<ClinicalDataTrialSetView>(_mapper.ConfigurationProvider, new
|
||||
{
|
||||
CriterionIds = inDto.CriterionIds
|
||||
{
|
||||
CriterionIds = inDto.CriterionIds
|
||||
|
||||
}).ToListAsync();
|
||||
}).ToListAsync();
|
||||
return trialClinicalDataList;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 删除(项目)
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{id:guid}")]
|
||||
/// <summary>
|
||||
/// 删除(项目)
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{id:guid}")]
|
||||
public async Task<IResponseOutput> DeleteClinicalTrialSetData(Guid id)
|
||||
{
|
||||
await _clinicalDataTrialSetRepository.DeleteFromQueryAsync(x => x.Id == id, true);
|
||||
@@ -355,7 +350,7 @@ namespace IRaCIS.Application.Services
|
||||
//不存在的时候,就将系统数据同步到项目临床数据配置
|
||||
if (!await _clinicalDataTrialSetRepository.AnyAsync(x => x.TrialId == trialId && x.SystemClinicalDataSetId != null))
|
||||
{
|
||||
var systemClinicalDataList = await _clinicalDataSystemSetRepository.Where(x=>x.IsApply).AsQueryable().ToListAsync();
|
||||
var systemClinicalDataList = await _clinicalDataSystemSetRepository.Where(x => x.IsApply).AsQueryable().ToListAsync();
|
||||
var systemIds = systemClinicalDataList.Select(x => x.Id).ToList();
|
||||
|
||||
var trialSystemClinicalDataSetIds = await _clinicalDataTrialSetRepository.Where(x => x.TrialId == trialId && x.SystemClinicalDataSetId != null).Select(x => x.SystemClinicalDataSetId.Value).ToListAsync();
|
||||
@@ -365,7 +360,7 @@ namespace IRaCIS.Application.Services
|
||||
var systemDataList = systemClinicalDataList.Where(x => needAddids.Contains(x.Id)).ToList();
|
||||
|
||||
var readingCriterionList = _readingQuestionCriterionTrialRepository.Where(t => t.TrialId == trialId).Where(t => t.ReadingQuestionCriterionSystemId != null)
|
||||
.Select(t => new { t.ReadingQuestionCriterionSystemId, TrialReadingCriterionId = t.Id ,t.CriterionType}).ToList();
|
||||
.Select(t => new { t.ReadingQuestionCriterionSystemId, TrialReadingCriterionId = t.Id, t.CriterionType }).ToList();
|
||||
|
||||
|
||||
List<ClinicalDataTrialSet> dataSets = systemDataList.Select(x => new ClinicalDataTrialSet()
|
||||
@@ -375,7 +370,7 @@ namespace IRaCIS.Application.Services
|
||||
ClinicalDataSetName = x.ClinicalDataSetName,
|
||||
ClinicalDataLevel = x.ClinicalDataLevel,
|
||||
ClinicalUploadType = x.ClinicalUploadType,
|
||||
ClinicalDataSetEnName=x.ClinicalDataSetEnName,
|
||||
ClinicalDataSetEnName = x.ClinicalDataSetEnName,
|
||||
UploadRole = x.UploadRole,
|
||||
FileName = x.FileName,
|
||||
Path = x.Path,
|
||||
@@ -385,7 +380,7 @@ namespace IRaCIS.Application.Services
|
||||
//项目不采用 标准枚举字符串的方式
|
||||
//CriterionEnumListStr=x.CriterionEnumListStr
|
||||
|
||||
TrialClinicalDataSetCriteriaList = readingCriterionList.Where(t => x.CriterionEnumList.Contains( (int )t.CriterionType)).Select(c =>
|
||||
TrialClinicalDataSetCriteriaList = readingCriterionList.Where(t => x.CriterionEnumList.Contains((int)t.CriterionType)).Select(c =>
|
||||
new TrialClinicalDataSetCriterion() { TrialReadingCriterionId = c.TrialReadingCriterionId }).ToList()
|
||||
}).ToList();
|
||||
|
||||
|
||||
@@ -4,14 +4,12 @@
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using MassTransit;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
@@ -26,7 +24,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
IRepository<TrialClinicalTableQuestion> _trialClinicalTableQuestionRepository) : BaseService, IClinicalQuestionService
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取问题计算关系
|
||||
/// </summary>
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Linq.Expressions;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using System.Linq.Dynamic.Core;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using IRaCIS.Core.Infrastructure.Extention;
|
||||
using System.Linq;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
/// <summary>
|
||||
/// 阅片临床数据
|
||||
@@ -39,7 +32,7 @@ namespace IRaCIS.Application.Services
|
||||
IRepository<ReadingClinicalDataPDF> _readingClinicalDataPDFRepository,
|
||||
IRepository<ReadingConsistentClinicalDataPDF> _readingConsistentClinicalDataPDFRepository) : BaseService, IReadingClinicalDataService
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
#region 临床数据基本增删改
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
@@ -14,27 +9,27 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
}
|
||||
|
||||
|
||||
public class DeleteStudyClinicalInDto
|
||||
{
|
||||
public Guid StudyId { get; set; }
|
||||
}
|
||||
|
||||
public class AddStudyClinicalInDto
|
||||
public class DeleteStudyClinicalInDto
|
||||
{
|
||||
public Guid StudyId { get; set; }
|
||||
}
|
||||
public Guid StudyId { get; set; }
|
||||
}
|
||||
|
||||
public class AutoAddClinicalInDto
|
||||
public class AddStudyClinicalInDto
|
||||
{
|
||||
public Guid? SubjectId { get; set; }
|
||||
public Guid StudyId { get; set; }
|
||||
}
|
||||
|
||||
//public Guid? VisitId { get; set; }
|
||||
public class AutoAddClinicalInDto
|
||||
{
|
||||
public Guid? SubjectId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
}
|
||||
//public Guid? VisitId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetCRCSubjectClinicalInDto:PageInput
|
||||
public class GetCRCSubjectClinicalInDto : PageInput
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
@@ -46,25 +41,25 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public class GetCRCSubjectClinicalOutDto
|
||||
{
|
||||
public Guid SubjectId { get; set; }
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public Guid ReadingClinicalDataId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上传角色
|
||||
/// </summary>
|
||||
public UploadRole UploadRole { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
/// <summary>
|
||||
/// 上传角色
|
||||
/// </summary>
|
||||
public UploadRole UploadRole { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 访视Id 或者模块Id
|
||||
/// </summary>
|
||||
public Guid ReadingId { get; set; }
|
||||
/// <summary>
|
||||
/// 访视Id 或者模块Id
|
||||
/// </summary>
|
||||
public Guid ReadingId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
|
||||
|
||||
public Guid? BaseLineVisitId { get; set; }
|
||||
@@ -75,13 +70,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public ClinicalUploadType ClinicalUploadType { get; set; }
|
||||
|
||||
public string SubjectCode { get; set; }
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
|
||||
public string ClinicalDataSetEnName { get; set; }
|
||||
public string ClinicalDataSetEnName { get; set; }
|
||||
|
||||
public int ClinicalCount { get; set; } = 0;
|
||||
public int ClinicalCount { get; set; } = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -92,19 +87,19 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public string SubjectCode { get; set; }
|
||||
|
||||
public List<GetCRCSubjectClinicalOutDto> ClinicalDataList { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public class GetClinicalQuestionAnswerListInDto
|
||||
public class GetClinicalQuestionAnswerListInDto
|
||||
{
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -143,69 +138,69 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public string Answer { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class GetPMConfirmListInDto: PageInput
|
||||
public class GetPMConfirmListInDto : PageInput
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
}
|
||||
|
||||
public class GetCRCConfirmListInDto:PageInput
|
||||
public class GetCRCConfirmListInDto : PageInput
|
||||
{
|
||||
|
||||
public bool? IsCRCConfirm { get; set; }
|
||||
|
||||
public bool? IsPMConfirm { get; set; }
|
||||
public bool? IsPMConfirm { get; set; }
|
||||
|
||||
public Guid? TrialReadingCriterionId { get; set; }
|
||||
|
||||
public Guid? SubjectId { get; set; }
|
||||
public Guid? SubjectId { get; set; }
|
||||
|
||||
public DateTime? StartTime { get; set; }
|
||||
public DateTime? EndTime { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid? ReadModuleId { get; set; }
|
||||
public Guid? ReadModuleId { get; set; }
|
||||
|
||||
public string? SubjectCode { get; set; }
|
||||
}
|
||||
|
||||
public class CRCCancelConfirmClinicalInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid ReadModuleId { get; set; }
|
||||
}
|
||||
public Guid ReadModuleId { get; set; }
|
||||
}
|
||||
|
||||
public class GetClinicalDateListOutDto
|
||||
{
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
|
||||
|
||||
public List<GetCRCBeConfirmListOutDto> DateList { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetCRCBeConfirmListInDto
|
||||
public class GetClinicalDateListOutDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid ReadModuleId { get; set; }
|
||||
}
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
|
||||
|
||||
public class GetClinicalTableListInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid ReadModuleId { get; set; }
|
||||
}
|
||||
public List<GetCRCBeConfirmListOutDto> DateList { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetClinicalTableListOutDto: GetClinicalQuestionAnswerListOutDto
|
||||
{
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
public class GetCRCBeConfirmListInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid ReadModuleId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetClinicalTableListInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid ReadModuleId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetClinicalTableListOutDto : GetClinicalQuestionAnswerListOutDto
|
||||
{
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模块名称
|
||||
@@ -214,34 +209,34 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
}
|
||||
|
||||
|
||||
public class GetCRCBeConfirm: GetCRCBeConfirmListOutDto
|
||||
{
|
||||
public Guid ReadModuleId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetCRCBeConfirmListOutDto
|
||||
public class GetCRCBeConfirm : GetCRCBeConfirmListOutDto
|
||||
{
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
public Guid ReadModuleId { get; set; }
|
||||
}
|
||||
|
||||
public Guid ClinicalFormId { get; set; }
|
||||
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
public class GetCRCBeConfirmListOutDto
|
||||
{
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
|
||||
public string ClinicalDataSetEnName { get; set; }
|
||||
public Guid ClinicalFormId { get; set; }
|
||||
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
|
||||
public string ClinicalDataSetEnName { get; set; }
|
||||
|
||||
public DateTime CheckDate { get; set; }
|
||||
|
||||
public bool IsHaveTableQuestion { get; set; }
|
||||
}
|
||||
public bool IsHaveTableQuestion { get; set; }
|
||||
}
|
||||
|
||||
public class CRCConfirmClinicalInDto
|
||||
public class CRCConfirmClinicalInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public Guid ReadModuleId { get; set; }
|
||||
public Guid ReadModuleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临床数据是否完整
|
||||
@@ -258,39 +253,39 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
}
|
||||
|
||||
|
||||
public class CRCClinicalForm
|
||||
public class CRCClinicalForm
|
||||
{
|
||||
/// <summary>
|
||||
/// 受试者Id
|
||||
/// </summary>
|
||||
public Guid SubjectId { get; set; }
|
||||
public DateTime? CheckDate { get; set; }
|
||||
/// <summary>
|
||||
/// 受试者Id
|
||||
/// </summary>
|
||||
public Guid SubjectId { get; set; }
|
||||
public DateTime? CheckDate { get; set; }
|
||||
|
||||
public Guid ClinicalFormId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
|
||||
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
|
||||
public bool IsHaveTableQuestion { get; set; }
|
||||
public bool IsHaveTableQuestion { get; set; }
|
||||
|
||||
public string ClinicalDataSetEnName { get; set; }
|
||||
}
|
||||
public string ClinicalDataSetEnName { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetCRCConfirmListOutDto
|
||||
public class GetCRCConfirmListOutDto
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// 受试者ID
|
||||
/// </summary>
|
||||
public Guid SubjectId { get; set; }
|
||||
/// <summary>
|
||||
/// 受试者ID
|
||||
/// </summary>
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public bool IsNotNeedPMConfirm { get; set; } = false;
|
||||
public Guid ReadModuleId { get; set; }
|
||||
@@ -304,9 +299,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public bool IsPMConfirm { get; set; }
|
||||
|
||||
public ReadingSetType ReadingSetType { get; set; }
|
||||
public ReadingSetType ReadingSetType { get; set; }
|
||||
|
||||
public bool IsCRCConfirm { get; set; } = false;
|
||||
public bool IsCRCConfirm { get; set; } = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -316,17 +311,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public string SubjectCode { get; set; }
|
||||
|
||||
public bool IsHaveTableQuestion
|
||||
{
|
||||
get
|
||||
{
|
||||
return ClinicalFormList.Any(x => x.IsHaveTableQuestion);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 最晚拍片日期
|
||||
/// </summary>
|
||||
public DateTime? LatestScanDate { get; set; }
|
||||
public bool IsHaveTableQuestion
|
||||
{
|
||||
get
|
||||
{
|
||||
return ClinicalFormList.Any(x => x.IsHaveTableQuestion);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// 最晚拍片日期
|
||||
/// </summary>
|
||||
public DateTime? LatestScanDate { get; set; }
|
||||
|
||||
public List<string> ClinicalNameList
|
||||
{
|
||||
@@ -339,20 +334,20 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public List<GetCRCBeConfirmListOutDto> ClinicalFormList { get; set; }
|
||||
|
||||
public int FormCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ClinicalFormList.Count();
|
||||
}
|
||||
}
|
||||
}
|
||||
public int FormCount
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.ClinicalFormList.Count();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public class DeleteClinicalFormInDto
|
||||
{
|
||||
public Guid ClinicalFormId { get; set; }
|
||||
}
|
||||
public class SubmitClinicalFormInDto
|
||||
public Guid ClinicalFormId { get; set; }
|
||||
}
|
||||
public class SubmitClinicalFormInDto
|
||||
{
|
||||
/// <summary>
|
||||
/// VisitId
|
||||
@@ -361,13 +356,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public Guid? ClinicalFormId { get; set; }
|
||||
|
||||
public string? PicturePath { get; set; }
|
||||
public string? PicturePath { get; set; }
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
|
||||
|
||||
public List<ClinicalFormQuestionAnswer> QuestionAnswers { get; set; }
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
@@ -23,15 +18,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -44,12 +39,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public UploadRole UploadRole { get; set; }
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
public bool IsEnable { get; set; }
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 项目ID
|
||||
@@ -107,15 +102,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上传角色
|
||||
@@ -156,7 +151,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
|
||||
|
||||
public class ClinicalDataTrialSetView: ClinicalDataTrialSetAddOrEdit
|
||||
public class ClinicalDataTrialSetView : ClinicalDataTrialSetAddOrEdit
|
||||
{
|
||||
public List<string> TrialCriterionNameList { get; set; }
|
||||
|
||||
@@ -173,7 +168,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public Guid? SystemClinicalDataSetId { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否来自于系统数据
|
||||
@@ -240,12 +235,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
|
||||
}
|
||||
}
|
||||
public class GetTrialClinicalDataSystemIndto
|
||||
{
|
||||
/// <summary>
|
||||
@@ -253,15 +248,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; } = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel? ClinicalDataLevel { get; set; }
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel? ClinicalDataLevel { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -293,15 +288,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; } = String.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel? ClinicalDataLevel { get; set; }
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel? ClinicalDataLevel { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
@@ -16,74 +11,74 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public class GetTrialClinicalQuestionCalculateRelationInDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目临床数据Id
|
||||
/// </summary>
|
||||
public Guid TrialClinicalId { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 项目临床数据Id
|
||||
/// </summary>
|
||||
public Guid TrialClinicalId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetTrialClinicalQuestionCalculateRelationOutDto
|
||||
{
|
||||
public Guid QuestionId { get; set; }
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题名称
|
||||
/// </summary>
|
||||
public string QuestionName { get; set; }
|
||||
/// <summary>
|
||||
/// 问题名称
|
||||
/// </summary>
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义计算标记
|
||||
/// </summary>
|
||||
public ClinicalCalculateMark? CustomCalculateMark { get; set; }
|
||||
/// <summary>
|
||||
/// 自定义计算标记
|
||||
/// </summary>
|
||||
public ClinicalCalculateMark? CustomCalculateMark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数值类型
|
||||
/// </summary>
|
||||
public ValueOfType? ValueType { get; set; }
|
||||
/// <summary>
|
||||
/// 数值类型
|
||||
/// </summary>
|
||||
public ValueOfType? ValueType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public ValueUnit? Unit { get; set; }
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public ValueUnit? Unit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义单位
|
||||
/// </summary>
|
||||
public string CustomUnit { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 自定义单位
|
||||
/// </summary>
|
||||
public string CustomUnit { get; set; } = string.Empty;
|
||||
|
||||
public List<CalculateInfo> CalculateQuestionList { get; set; }
|
||||
}
|
||||
public List<CalculateInfo> CalculateQuestionList { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetClinicalCalculateQuestionsOutDto
|
||||
public class GetClinicalCalculateQuestionsOutDto
|
||||
{
|
||||
public Guid QuestionId { get; set; }
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
public string QuestionName { get; set; }
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
public List<CalculateQuestion> TableQuestions { get; set; }
|
||||
}
|
||||
public List<CalculateQuestion> TableQuestions { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetClinicalCalculateQuestionsInDto
|
||||
public class GetClinicalCalculateQuestionsInDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目临床数据Id
|
||||
/// </summary>
|
||||
public Guid TrialClinicalId { get; set; }
|
||||
/// <summary>
|
||||
/// 项目临床数据Id
|
||||
/// </summary>
|
||||
public Guid TrialClinicalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临床问题类型(分组,单选。)
|
||||
/// </summary>
|
||||
public string ClinicalQuestionType { get; set; } = string.Empty;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 预览
|
||||
#region 预览
|
||||
|
||||
|
||||
public class GetSystemClinicalQuestionPreviewDto
|
||||
public class GetSystemClinicalQuestionPreviewDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 系统临床数据Id
|
||||
@@ -119,17 +114,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public List<ClinicalQuestionPreviewDto> Childrens { get; set; } = new List<ClinicalQuestionPreviewDto>();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 关联问题
|
||||
/// </summary>
|
||||
public List<ClinicalQuestionPreviewDto> RelationQuestions { get; set; } = new List<ClinicalQuestionPreviewDto>();
|
||||
/// <summary>
|
||||
/// 关联问题
|
||||
/// </summary>
|
||||
public List<ClinicalQuestionPreviewDto> RelationQuestions { get; set; } = new List<ClinicalQuestionPreviewDto>();
|
||||
|
||||
/// <summary>
|
||||
/// 表格问题
|
||||
/// </summary>
|
||||
public List<ClinicalTablePreviewDto> TableQuestions { get; set; } = new List<ClinicalTablePreviewDto>();
|
||||
/// <summary>
|
||||
/// 表格问题
|
||||
/// </summary>
|
||||
public List<ClinicalTablePreviewDto> TableQuestions { get; set; } = new List<ClinicalTablePreviewDto>();
|
||||
|
||||
public List<Dictionary<Guid,string>> TableAnswer { get; set; }
|
||||
public List<Dictionary<Guid, string>> TableAnswer { get; set; }
|
||||
}
|
||||
|
||||
|
||||
@@ -226,25 +221,25 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public int ShowOrder { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 是否必填
|
||||
/// </summary>
|
||||
public IsRequired IsRequired { get; set; }
|
||||
/// <summary>
|
||||
/// 是否必填
|
||||
/// </summary>
|
||||
public IsRequired IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联Value
|
||||
/// </summary>
|
||||
public string RelevanceValue { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 关联Value
|
||||
/// </summary>
|
||||
public string RelevanceValue { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 关联ID
|
||||
/// </summary>
|
||||
public Guid? RelevanceId { get; set; }
|
||||
/// <summary>
|
||||
/// 关联ID
|
||||
/// </summary>
|
||||
public Guid? RelevanceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 父问题Id
|
||||
/// </summary>
|
||||
public Guid? ParentId { get; set; }
|
||||
/// <summary>
|
||||
/// 父问题Id
|
||||
/// </summary>
|
||||
public Guid? ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 父问题触发值
|
||||
@@ -271,36 +266,36 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string Unit { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 自定义计算标记
|
||||
/// </summary>
|
||||
public ClinicalCalculateMark? CustomCalculateMark { get; set; }
|
||||
/// <summary>
|
||||
/// 自定义计算标记
|
||||
/// </summary>
|
||||
public ClinicalCalculateMark? CustomCalculateMark { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 自定义计算问题
|
||||
/// </summary>
|
||||
public string CalculateQuestions { get; set; } = "[]";
|
||||
/// <summary>
|
||||
/// 自定义计算问题
|
||||
/// </summary>
|
||||
public string CalculateQuestions { get; set; } = "[]";
|
||||
|
||||
[NotMapped]
|
||||
public List<CalculateInfo> CalculateQuestionList
|
||||
{
|
||||
get
|
||||
{
|
||||
[NotMapped]
|
||||
public List<CalculateInfo> CalculateQuestionList
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
var result = JsonConvert.DeserializeObject<List<CalculateInfo>>(this.CalculateQuestions);
|
||||
return result == null ? new List<CalculateInfo>() : result;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
try
|
||||
{
|
||||
var result = JsonConvert.DeserializeObject<List<CalculateInfo>>(this.CalculateQuestions);
|
||||
return result == null ? new List<CalculateInfo>() : result;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
return new List<CalculateInfo>();
|
||||
}
|
||||
return new List<CalculateInfo>();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询临床数据基类
|
||||
@@ -433,15 +428,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public int ShowOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否必填
|
||||
/// </summary>
|
||||
public IsRequired IsRequired { get; set; }
|
||||
/// <summary>
|
||||
/// 是否必填
|
||||
/// </summary>
|
||||
public IsRequired IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人
|
||||
@@ -519,7 +514,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public Guid SystemClinicalId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -543,7 +538,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public class TrialClinicalTableQuestionQuery : ClinicalTableQuestionQueryBase
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -551,7 +546,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public class SystemClinicalTableQuestionQuery : ClinicalTableQuestionQueryBase
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
@@ -3,80 +3,77 @@
|
||||
// 生成时间 2023-02-13 10:38:12
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
namespace IRaCIS.Core.Application.ViewModel
|
||||
{
|
||||
/// <summary> DefaultShortcutKeyView 列表视图模型 </summary>
|
||||
public class DefaultShortcutKeyView
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Keyboardkey { get; set; }
|
||||
public int ShortcutKeyEnum { get; set; }
|
||||
public int ImageToolType { get; set; }
|
||||
public bool AltKey { get; set; }
|
||||
|
||||
public bool CtrlKey { get; set; }
|
||||
|
||||
public bool ShiftKey { get; set; }
|
||||
|
||||
public bool MetaKey { get; set; }
|
||||
{
|
||||
/// <summary> DefaultShortcutKeyView 列表视图模型 </summary>
|
||||
public class DefaultShortcutKeyView
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Keyboardkey { get; set; }
|
||||
public int ShortcutKeyEnum { get; set; }
|
||||
public int ImageToolType { get; set; }
|
||||
public bool AltKey { get; set; }
|
||||
|
||||
public string Text { get; set; }
|
||||
public bool CtrlKey { get; set; }
|
||||
|
||||
public string Code { get; set; } = string.Empty;
|
||||
}
|
||||
public bool ShiftKey { get; set; }
|
||||
|
||||
public class RestoreDefaultShortcutKeyInDto
|
||||
{
|
||||
public int ImageToolType { get; set; }
|
||||
}
|
||||
public bool MetaKey { get; set; }
|
||||
|
||||
public class SetDefaultShortcutKey
|
||||
{
|
||||
public int ImageToolType { get; set; }
|
||||
public string Text { get; set; }
|
||||
|
||||
public List<DefaultShortcutKeyItem> ShortcutKeyList { get; set; }
|
||||
}
|
||||
public string Code { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class DefaultShortcutKeyItem
|
||||
{
|
||||
public string Keyboardkey { get; set; }
|
||||
public int ShortcutKeyEnum { get; set; }
|
||||
public class RestoreDefaultShortcutKeyInDto
|
||||
{
|
||||
public int ImageToolType { get; set; }
|
||||
}
|
||||
|
||||
public bool AltKey { get; set; }
|
||||
public class SetDefaultShortcutKey
|
||||
{
|
||||
public int ImageToolType { get; set; }
|
||||
|
||||
public List<DefaultShortcutKeyItem> ShortcutKeyList { get; set; }
|
||||
}
|
||||
|
||||
public class DefaultShortcutKeyItem
|
||||
{
|
||||
public string Keyboardkey { get; set; }
|
||||
public int ShortcutKeyEnum { get; set; }
|
||||
|
||||
public bool AltKey { get; set; }
|
||||
|
||||
|
||||
public string Text { get; set; }
|
||||
public string Text { get; set; }
|
||||
|
||||
public bool CtrlKey { get; set; }
|
||||
public bool CtrlKey { get; set; }
|
||||
|
||||
public bool ShiftKey { get; set; }
|
||||
public bool ShiftKey { get; set; }
|
||||
|
||||
public bool MetaKey { get; set; }
|
||||
public string Code { get; set; } = string.Empty;
|
||||
}
|
||||
public bool MetaKey { get; set; }
|
||||
public string Code { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
///<summary>DefaultShortcutKeyQuery 列表查询参数模型</summary>
|
||||
public class DefaultShortcutKeyQuery
|
||||
{
|
||||
public int ImageToolType { get; set; }
|
||||
///<summary>DefaultShortcutKeyQuery 列表查询参数模型</summary>
|
||||
public class DefaultShortcutKeyQuery
|
||||
{
|
||||
public int ImageToolType { get; set; }
|
||||
|
||||
public int? ShortcutKeyEnum { get; set; }
|
||||
}
|
||||
public int? ShortcutKeyEnum { get; set; }
|
||||
}
|
||||
|
||||
///<summary> DefaultShortcutKeyAddOrEdit 列表查询参数模型</summary>
|
||||
public class DefaultShortcutKeyAddOrEdit
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Keyboardkey { get; set; }
|
||||
public int ShortcutKeyEnum { get; set; }
|
||||
public int ImageToolType { get; set; }
|
||||
}
|
||||
|
||||
///<summary> DefaultShortcutKeyAddOrEdit 列表查询参数模型</summary>
|
||||
public class DefaultShortcutKeyAddOrEdit
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string Keyboardkey { get; set; }
|
||||
public int ShortcutKeyEnum { get; set; }
|
||||
public int ImageToolType { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,11 +1,6 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
@@ -15,12 +10,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public Guid? SubjectId { get; set; }
|
||||
|
||||
public CompleteClinicalDataEnum? CompleteClinicalData { get; set; }
|
||||
public CompleteClinicalDataEnum? CompleteClinicalData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 项目中心Code
|
||||
/// </summary>
|
||||
public string? TrialSiteCode { get; set; }
|
||||
/// <summary>
|
||||
/// 项目中心Code
|
||||
/// </summary>
|
||||
public string? TrialSiteCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受试者Code
|
||||
@@ -221,10 +216,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
public ReadingStatusEnum Status { get; set; }
|
||||
public ReadingStatusEnum Status { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public class GetReadModuleResultDto
|
||||
@@ -302,12 +297,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
}
|
||||
|
||||
public class ReadMoudleView
|
||||
{
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
|
||||
public string Name { get; set; }
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
public ModuleTypeEnum ModuleType { get; set; }
|
||||
|
||||
@@ -331,7 +326,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public string? ReadModuleName { get; set; }
|
||||
|
||||
public DateTime CreateTime { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
public bool IsVisit { get; set; }
|
||||
|
||||
|
||||
@@ -3,9 +3,7 @@
|
||||
// 生成时间 2022-08-12 14:07:12
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace IRaCIS.Core.Application.ViewModel
|
||||
@@ -36,14 +34,14 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
public DicDataTypeEnum DataTypeEnum { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public string Value { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
public string ValueCN { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
|
||||
public string Description { get; set; } = string.Empty;
|
||||
|
||||
public int ShowOrder { get; set; }
|
||||
@@ -69,8 +67,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
{
|
||||
public Guid? SystemCriterionId { get; set; }
|
||||
|
||||
public Guid? TrialCriterionId { get; set; }
|
||||
}
|
||||
public Guid? TrialCriterionId { get; set; }
|
||||
}
|
||||
|
||||
///<summary>CriterionNidusQuery 列表查询参数模型</summary>
|
||||
public class CriterionNidusQuery
|
||||
@@ -160,14 +158,14 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
/// </summary>
|
||||
public string PartEN { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// TULOC 英文
|
||||
/// </summary>
|
||||
public string TULOCEN { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -196,18 +194,18 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
public class GetTrialSelectOrganListInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
public class CriterionNidusData : CriterionNidusSystem
|
||||
{
|
||||
{
|
||||
public Guid OriginalId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class SynchronizeSystemOrganInDto
|
||||
{
|
||||
[NotDefault]
|
||||
[NotDefault]
|
||||
public Guid FromCriterionId { get; set; }
|
||||
[NotDefault]
|
||||
public Guid ToCriterionId { get; set; }
|
||||
@@ -219,7 +217,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public Guid? SystemCriterionId { get; set; }
|
||||
}
|
||||
@@ -370,7 +368,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
/// </summary>
|
||||
public string TULOCEN { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 位置 英文
|
||||
@@ -380,7 +378,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
}
|
||||
|
||||
///<summary>OrganInfoQuery 列表查询参数模型</summary>
|
||||
public class OrganInfoQuery:PageInput
|
||||
public class OrganInfoQuery : PageInput
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -467,14 +465,14 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
/// </summary>
|
||||
public string PartEN { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// TULOC 英文
|
||||
/// </summary>
|
||||
public string TULOCEN { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
|
||||
|
||||
@@ -32,7 +26,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public Guid? TrialId { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 页码
|
||||
|
||||
@@ -3,10 +3,7 @@
|
||||
// 生成时间 2022-08-22 09:36:37
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
using System.Reflection.Metadata.Ecma335;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
@@ -14,29 +11,29 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public class GetIsSuvMaxLesionInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
public Guid RowId { get; set; }
|
||||
}
|
||||
public Guid RowId { get; set; }
|
||||
}
|
||||
|
||||
public class GetIsSuvMaxLesionOutDto
|
||||
{
|
||||
public bool IsSuvMaxLesion { get; set; }
|
||||
}
|
||||
public class GetIsSuvMaxLesionOutDto
|
||||
{
|
||||
public bool IsSuvMaxLesion { get; set; }
|
||||
}
|
||||
|
||||
public class GetCanChooseNotMergeInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
public class GetCanChooseNotMergeOutDto
|
||||
{
|
||||
public bool IsCanChooseNotMerge { get; set; }
|
||||
}
|
||||
public class GetCanChooseNotMergeOutDto
|
||||
{
|
||||
public bool IsCanChooseNotMerge { get; set; }
|
||||
}
|
||||
|
||||
public class GetPPDInfoInDto
|
||||
public class GetPPDInfoInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public Guid QuestionId { get; set; }
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
public decimal RowIndex { get; set; }
|
||||
|
||||
@@ -69,7 +66,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
|
||||
|
||||
public bool IsChangeOtherTask { get; set; }
|
||||
|
||||
public ComputationTrigger ComputationTrigger { get; set; }
|
||||
@@ -210,9 +207,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public bool IsConvertedTask { get; set; }
|
||||
|
||||
public Guid? BeforeConvertedTaskId { get; set; }
|
||||
public Guid? BeforeConvertedTaskId { get; set; }
|
||||
|
||||
public bool IsAnalysisCreate { get; set; }
|
||||
public bool IsAnalysisCreate { get; set; }
|
||||
|
||||
public bool? IsSelfAnalysis { get; set; }
|
||||
|
||||
@@ -221,7 +218,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// <summary>
|
||||
/// TrialReadingCriterionId
|
||||
/// </summary>
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
public string VisitName { get; set; }
|
||||
|
||||
@@ -243,7 +240,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public Arm ArmEnum { get; set; }
|
||||
|
||||
public ComputationTrigger ComputationTrigger { get; set; }
|
||||
public ComputationTrigger ComputationTrigger { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否修改其他任务
|
||||
@@ -306,7 +303,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public decimal FristAddTaskNum { get; set; }
|
||||
|
||||
public string? OtherMeasureData { get; set; }
|
||||
public string? OtherMeasureData { get; set; }
|
||||
public string? MeasureData { get; set; }
|
||||
|
||||
public List<TableQuestionInfo> TableQuestionList { get; set; } = new List<TableQuestionInfo>();
|
||||
@@ -374,7 +371,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public QuestionType QuestionType { get; set; }
|
||||
|
||||
|
||||
public List<ComputationTrigger> ComputationTriggerList { get; set; }=new List<ComputationTrigger>();
|
||||
public List<ComputationTrigger> ComputationTriggerList { get; set; } = new List<ComputationTrigger>();
|
||||
|
||||
public Func<ReadingCalculateDto, Task<decimal>> GetDecimalFun { get; set; }
|
||||
|
||||
@@ -384,7 +381,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public Func<ReadingCalculateDto, Task<string>> GetStringFun { get; set; }
|
||||
|
||||
public Func<ChangeAllTaskDto,Task> ChangeAllTaskFun { get; set; }
|
||||
public Func<ChangeAllTaskDto, Task> ChangeAllTaskFun { get; set; }
|
||||
|
||||
public bool? IsConvertedTask { get; set; }
|
||||
|
||||
@@ -393,7 +390,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public bool IsBeTransforming { get; set; } = false;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,23 +1,18 @@
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
public class SetTaskValidInDto
|
||||
{
|
||||
public class SetTaskValidInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class SignConsistencyAnalysisReadingClinicalDataInDto
|
||||
{
|
||||
public Guid ConsistentClinicalDataId { get; set; }
|
||||
{
|
||||
public Guid ConsistentClinicalDataId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否盲化
|
||||
@@ -33,114 +28,114 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
|
||||
public class AddOrUpdateReadingClinicalDataDto
|
||||
{
|
||||
{
|
||||
|
||||
public Guid? Id { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
public Guid? StudyId { get; set; }
|
||||
public Guid? StudyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 项目ID
|
||||
/// </summary>
|
||||
public Guid TrialId { get; set; }
|
||||
/// <summary>
|
||||
/// 项目ID
|
||||
/// </summary>
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受试者ID
|
||||
/// </summary>
|
||||
public Guid SubjectId { get; set; }
|
||||
/// <summary>
|
||||
/// 受试者ID
|
||||
/// </summary>
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 阅片ID
|
||||
/// </summary>
|
||||
public Guid ReadingId { get; set; }
|
||||
/// <summary>
|
||||
/// 阅片ID
|
||||
/// </summary>
|
||||
public Guid ReadingId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临床数据类型Id
|
||||
/// </summary>
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
/// <summary>
|
||||
/// 临床数据类型Id
|
||||
/// </summary>
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是访视
|
||||
/// </summary>
|
||||
public bool IsVisit { get; set; }
|
||||
/// <summary>
|
||||
/// 是否是访视
|
||||
/// </summary>
|
||||
public bool IsVisit { get; set; }
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// 是否盲化
|
||||
///// </summary>
|
||||
//public bool IsBlind { get; set; }
|
||||
///// <summary>
|
||||
///// 是否盲化
|
||||
///// </summary>
|
||||
//public bool IsBlind { get; set; }
|
||||
|
||||
///// <summary>
|
||||
///// 是否完整
|
||||
///// </summary>
|
||||
//public bool IsComplete { get; set; }
|
||||
///// <summary>
|
||||
///// 是否完整
|
||||
///// </summary>
|
||||
//public bool IsComplete { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 要删除的对象
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// 要删除的对象
|
||||
/// </summary>
|
||||
|
||||
public List<Guid> DeleteFileIds { get; set; } = new List<Guid>();
|
||||
public List<Guid> DeleteFileIds { get; set; } = new List<Guid>();
|
||||
|
||||
|
||||
public List<FileDto> AddFileList { get; set; } = new List<FileDto>();
|
||||
}
|
||||
public List<FileDto> AddFileList { get; set; } = new List<FileDto>();
|
||||
}
|
||||
|
||||
public class GetCRCClinicalDataOutDto
|
||||
{
|
||||
public class GetCRCClinicalDataOutDto
|
||||
{
|
||||
|
||||
public Guid Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上传方式
|
||||
/// </summary>
|
||||
public ClinicalUploadType ClinicalUploadType { get; set; }
|
||||
/// <summary>
|
||||
/// 上传方式
|
||||
/// </summary>
|
||||
public ClinicalUploadType ClinicalUploadType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上传角色
|
||||
/// </summary>
|
||||
public UploadRole UploadRole { get; set; }
|
||||
/// <summary>
|
||||
/// 上传角色
|
||||
/// </summary>
|
||||
public UploadRole UploadRole { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模板文件名称
|
||||
/// </summary>
|
||||
public string FileName { get; set; }
|
||||
/// <summary>
|
||||
/// 模板文件名称
|
||||
/// </summary>
|
||||
public string FileName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 文件路径
|
||||
/// </summary>
|
||||
public string Path { get; set; }
|
||||
/// <summary>
|
||||
/// 文件路径
|
||||
/// </summary>
|
||||
public string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否盲化
|
||||
/// </summary>
|
||||
public bool? IsBlind { get; set; }
|
||||
/// <summary>
|
||||
/// 是否盲化
|
||||
/// </summary>
|
||||
public bool? IsBlind { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否完整
|
||||
/// </summary>
|
||||
public bool? IsComplete { get; set; }
|
||||
/// <summary>
|
||||
/// 是否完整
|
||||
/// </summary>
|
||||
public bool? IsComplete { get; set; }
|
||||
|
||||
public List<ClinicalFromData> ClinicalFromList { get; set; }
|
||||
|
||||
@@ -148,29 +143,29 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public List<GetFileDto> PDFFileList { get; set; } = new List<GetFileDto>();
|
||||
|
||||
public ClinicalDataTable ClinicalTableData { get; set; }
|
||||
}
|
||||
public ClinicalDataTable ClinicalTableData { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class ClinicalDataTable
|
||||
{
|
||||
public List<PreviousHistoryView> PreviousHistoryList { get; set; }
|
||||
public class ClinicalDataTable
|
||||
{
|
||||
public List<PreviousHistoryView> PreviousHistoryList { get; set; }
|
||||
|
||||
public List<PreviousOtherView> PreviousOtherList { get; set; }
|
||||
public List<PreviousOtherView> PreviousOtherList { get; set; }
|
||||
|
||||
public List<PreviousSurgeryView> PreviousSurgeryList { get; set; }
|
||||
public List<PreviousSurgeryView> PreviousSurgeryList { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class GetStudyClinicalDataInDto
|
||||
{
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
}
|
||||
public class GetStudyClinicalDataInDto
|
||||
{
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
}
|
||||
|
||||
public class GetCRCClinicalDataInDto
|
||||
{
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
public class GetCRCClinicalDataInDto
|
||||
{
|
||||
public Guid SubjectVisitId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
@@ -181,59 +176,59 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public bool IsBaseline { get; set; }
|
||||
|
||||
public Guid? StudyId { get; set; }
|
||||
public Guid? StudyId { get; set; }
|
||||
|
||||
public bool FilterNoneForm { get; set; } = false;
|
||||
public bool FilterNoneForm { get; set; } = false;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 是否盲化
|
||||
/// </summary>
|
||||
public class SetReadingClinicalDataIsBlind
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
/// <summary>
|
||||
/// 是否盲化
|
||||
/// </summary>
|
||||
public class SetReadingClinicalDataIsBlind
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
public bool IsBlind { get; set; }
|
||||
}
|
||||
public bool IsBlind { get; set; }
|
||||
}
|
||||
|
||||
public class FileDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 文件名称
|
||||
/// </summary>
|
||||
public string FileName { get; set; }
|
||||
public class FileDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 文件名称
|
||||
/// </summary>
|
||||
public string FileName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 路径
|
||||
/// </summary>
|
||||
public string Path { get; set; }
|
||||
/// <summary>
|
||||
/// 路径
|
||||
/// </summary>
|
||||
public string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 大小
|
||||
/// </summary>
|
||||
public int Size { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// 文件类型
|
||||
/// </summary>
|
||||
public string Type { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 文件类型
|
||||
/// </summary>
|
||||
public string Type { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
|
||||
public class GetReadingOrTaskClinicalDataListInDto
|
||||
{
|
||||
public class GetReadingOrTaskClinicalDataListInDto
|
||||
{
|
||||
|
||||
public Guid? TrialReadingCriterionId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid SubjectId { get; set; }
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid? ReadingId { get; set; }
|
||||
public Guid? ReadingId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临床数据类型Id
|
||||
@@ -249,25 +244,25 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public Guid? ReadingClinicalDataId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 只获取CRC上传的阅片模块结构化录入
|
||||
/// </summary>
|
||||
public bool IsOnlyGetCRCReadModule { get; set; } = false;
|
||||
/// <summary>
|
||||
/// 只获取CRC上传的阅片模块结构化录入
|
||||
/// </summary>
|
||||
public bool IsOnlyGetCRCReadModule { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 只查询已经签名的临床数据
|
||||
/// </summary>
|
||||
public bool SelectIsSign { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// 是否查询所有的一致性分析临床数据 (为否只查询PDF)
|
||||
/// </summary>
|
||||
public bool IsGetAllConsistencyAnalysis { get; set; } = true;
|
||||
/// <summary>
|
||||
/// 是否查询所有的一致性分析临床数据 (为否只查询PDF)
|
||||
/// </summary>
|
||||
public bool IsGetAllConsistencyAnalysis { get; set; } = true;
|
||||
|
||||
}
|
||||
|
||||
public class GetConsistencyAnalysisReadingClinicalDataListInDto
|
||||
{
|
||||
public class GetConsistencyAnalysisReadingClinicalDataListInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid SubjectId { get; set; }
|
||||
[NotDefault]
|
||||
@@ -281,11 +276,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// 获取访视列表
|
||||
/// </summary>
|
||||
public class GetReadingClinicalDataListIndto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid SubjectId { get; set; }
|
||||
[NotDefault]
|
||||
public Guid ReadingId { get; set; }
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid SubjectId { get; set; }
|
||||
[NotDefault]
|
||||
public Guid ReadingId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临床数据类型Id
|
||||
@@ -298,110 +293,110 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public GetClinicalType? GetClinicalType { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是访视
|
||||
/// </summary>
|
||||
public bool IsVisit { get; set; }
|
||||
/// <summary>
|
||||
/// 是否是访视
|
||||
/// </summary>
|
||||
public bool IsVisit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是基线
|
||||
/// </summary>
|
||||
public bool IsBaseLine { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 是否是基线
|
||||
/// </summary>
|
||||
public bool IsBaseLine { get; set; }
|
||||
}
|
||||
|
||||
public class GetReadingClinicalDataPDFListIndto : PageInput
|
||||
{
|
||||
public Guid ReadingClinicalDataId { get; set; }
|
||||
}
|
||||
public class GetReadingClinicalDataPDFListIndto : PageInput
|
||||
{
|
||||
public Guid ReadingClinicalDataId { get; set; }
|
||||
}
|
||||
|
||||
public class GetReadingClinicalDataPDFListOutDto
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
public class GetReadingClinicalDataPDFListOutDto
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 阅片临床数据ID
|
||||
/// </summary>
|
||||
public Guid ReadingClinicalDataId { get; set; }
|
||||
/// <summary>
|
||||
/// 阅片临床数据ID
|
||||
/// </summary>
|
||||
public Guid ReadingClinicalDataId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Path
|
||||
/// </summary>
|
||||
public string Path { get; set; }
|
||||
/// <summary>
|
||||
/// Path
|
||||
/// </summary>
|
||||
public string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// FileName
|
||||
/// </summary>
|
||||
public string FileName { get; set; }
|
||||
/// <summary>
|
||||
/// FileName
|
||||
/// </summary>
|
||||
public string FileName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否为访视
|
||||
/// </summary>
|
||||
public bool IsVisit { get; set; }
|
||||
/// <summary>
|
||||
/// 是否为访视
|
||||
/// </summary>
|
||||
public bool IsVisit { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class AddOrUpdateReadingClinicalDataPDFDto
|
||||
{
|
||||
public class AddOrUpdateReadingClinicalDataPDFDto
|
||||
{
|
||||
|
||||
public Guid? Id { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 阅片临床数据ID
|
||||
/// </summary>
|
||||
public Guid ReadingClinicalDataId { get; set; }
|
||||
/// <summary>
|
||||
/// 阅片临床数据ID
|
||||
/// </summary>
|
||||
public Guid ReadingClinicalDataId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Path
|
||||
/// </summary>
|
||||
public string Path { get; set; }
|
||||
/// <summary>
|
||||
/// Path
|
||||
/// </summary>
|
||||
public string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// FileName
|
||||
/// </summary>
|
||||
public string FileName { get; set; }
|
||||
/// <summary>
|
||||
/// FileName
|
||||
/// </summary>
|
||||
public string FileName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否为访视
|
||||
/// </summary>
|
||||
public bool IsVisit { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 是否为访视
|
||||
/// </summary>
|
||||
public bool IsVisit { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class PMClinicalDataConfirmCommand
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public class PMClinicalDataConfirmCommand
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否盲化
|
||||
/// </summary>
|
||||
public bool? IsBlind { get; set; }
|
||||
/// <summary>
|
||||
/// 是否盲化
|
||||
/// </summary>
|
||||
public bool? IsBlind { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否完整
|
||||
/// </summary>
|
||||
public bool? IsComplete { get; set; }
|
||||
/// <summary>
|
||||
/// 是否完整
|
||||
/// </summary>
|
||||
public bool? IsComplete { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class GetReadingClinicalDataListOutDto
|
||||
{
|
||||
public class GetReadingClinicalDataListOutDto
|
||||
{
|
||||
|
||||
public Guid Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 访视Id 或者模块Id
|
||||
/// </summary>
|
||||
public Guid ReadingId { get; set; }
|
||||
/// <summary>
|
||||
/// 访视Id 或者模块Id
|
||||
/// </summary>
|
||||
public Guid ReadingId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CRC是否正在申请撤回
|
||||
@@ -416,133 +411,133 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 下拉ID
|
||||
/// </summary>
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
/// <summary>
|
||||
/// 下拉ID
|
||||
/// </summary>
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上传角色
|
||||
/// </summary>
|
||||
public UploadRole UploadRole { get; set; }
|
||||
/// <summary>
|
||||
/// 上传角色
|
||||
/// </summary>
|
||||
public UploadRole UploadRole { get; set; }
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上传方式
|
||||
/// </summary>
|
||||
public ClinicalUploadType ClinicalUploadType { get; set; }
|
||||
/// <summary>
|
||||
/// 上传方式
|
||||
/// </summary>
|
||||
public ClinicalUploadType ClinicalUploadType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 标准枚举
|
||||
/// </summary>
|
||||
public List<int> CriterionEnumList { get; set; }
|
||||
/// <summary>
|
||||
/// 标准枚举
|
||||
/// </summary>
|
||||
public List<int> CriterionEnumList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别名称
|
||||
/// </summary>
|
||||
public string ClinicalDataLevelName { get; set; }
|
||||
/// <summary>
|
||||
/// 临床级别名称
|
||||
/// </summary>
|
||||
public string ClinicalDataLevelName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上传方式名称
|
||||
/// </summary>
|
||||
public string ClinicalUploadTypeName { get; set; }
|
||||
/// <summary>
|
||||
/// 上传方式名称
|
||||
/// </summary>
|
||||
public string ClinicalUploadTypeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否为CRC上传
|
||||
/// </summary>
|
||||
public bool IsCRCUpload { get; set; }
|
||||
/// <summary>
|
||||
/// 是否为CRC上传
|
||||
/// </summary>
|
||||
public bool IsCRCUpload { get; set; }
|
||||
|
||||
public bool IsNeedMerge { get; set; } = false;
|
||||
public bool IsNeedMerge { get; set; } = false;
|
||||
|
||||
public Guid ReadModuleId { get; set; }
|
||||
public Guid ReadModuleId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否签名
|
||||
/// </summary>
|
||||
public bool IsSign { get; set; }
|
||||
/// <summary>
|
||||
/// 是否签名
|
||||
/// </summary>
|
||||
public bool IsSign { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否盲化
|
||||
/// </summary>
|
||||
public bool? IsBlind { get; set; }
|
||||
/// <summary>
|
||||
/// 是否盲化
|
||||
/// </summary>
|
||||
public bool? IsBlind { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否完整
|
||||
/// </summary>
|
||||
public bool? IsComplete { get; set; }
|
||||
/// <summary>
|
||||
/// 是否完整
|
||||
/// </summary>
|
||||
public bool? IsComplete { get; set; }
|
||||
|
||||
|
||||
//临床数据状态
|
||||
public ReadingClinicalDataStatus ReadingClinicalDataState { get; set; }
|
||||
//临床数据状态
|
||||
public ReadingClinicalDataStatus ReadingClinicalDataState { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 文件数量
|
||||
/// </summary>
|
||||
public int FileCount { get; set; }
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return this.FileList.Count();
|
||||
// }
|
||||
//}
|
||||
/// <summary>
|
||||
/// 文件数量
|
||||
/// </summary>
|
||||
public int FileCount { get; set; }
|
||||
//{
|
||||
// get
|
||||
// {
|
||||
// return this.FileList.Count();
|
||||
// }
|
||||
//}
|
||||
|
||||
public List<ClinicalFromData> ClinicalFromList { get; set; }
|
||||
public List<ClinicalFromData> ClinicalFromList { get; set; }
|
||||
|
||||
public List<GetFileDto> FileList { get; set; } = new List<GetFileDto>();
|
||||
public List<GetFileDto> FileList { get; set; } = new List<GetFileDto>();
|
||||
|
||||
|
||||
public ClinicalDataTable ClinicalTableData { get; set; }
|
||||
public ClinicalDataTable ClinicalTableData { get; set; }
|
||||
|
||||
public List<TrialClinicalDataSetCriterion> TrialClinicalDataSetCriteriaList { get; set; }
|
||||
}
|
||||
public List<TrialClinicalDataSetCriterion> TrialClinicalDataSetCriteriaList { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class ClinicalFromData
|
||||
{
|
||||
/// <summary>
|
||||
/// 表单Id
|
||||
/// </summary>
|
||||
public Guid ClinicalFormId { get; set; }
|
||||
public class ClinicalFromData
|
||||
{
|
||||
/// <summary>
|
||||
/// 表单Id
|
||||
/// </summary>
|
||||
public Guid ClinicalFormId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 检查日期
|
||||
/// </summary>
|
||||
public DateTime? CheckDate { get; set; }
|
||||
}
|
||||
/// <summary>
|
||||
/// 检查日期
|
||||
/// </summary>
|
||||
public DateTime? CheckDate { get; set; }
|
||||
}
|
||||
|
||||
public class GetFileDto
|
||||
{
|
||||
public class GetFileDto
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Id
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Id
|
||||
/// </summary>
|
||||
|
||||
public Guid Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Path
|
||||
/// </summary>
|
||||
/// <summary>
|
||||
/// Path
|
||||
/// </summary>
|
||||
|
||||
public string Path { get; set; }
|
||||
public string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// FileName
|
||||
/// </summary>
|
||||
|
||||
public string FileName { get; set; }
|
||||
/// <summary>
|
||||
/// FileName
|
||||
/// </summary>
|
||||
|
||||
public string FileName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -559,99 +554,99 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// 上传时间
|
||||
/// </summary>
|
||||
public DateTime CreateTime { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public class GetTrialClinicalDataSelectIndto
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目ID
|
||||
/// </summary>
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
public class GetTrialClinicalDataSelectIndto
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目ID
|
||||
/// </summary>
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 阅片期临床数据ID
|
||||
/// </summary>
|
||||
public Guid? ReadingClinicalDataId { get; set; }
|
||||
/// <summary>
|
||||
/// 阅片期临床数据ID
|
||||
/// </summary>
|
||||
public Guid? ReadingClinicalDataId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 对象ID
|
||||
/// </summary>
|
||||
public Guid? ReadingId { get; set; }
|
||||
/// <summary>
|
||||
/// 对象ID
|
||||
/// </summary>
|
||||
public Guid? ReadingId { get; set; }
|
||||
|
||||
public Guid? SubjectId { get; set; }
|
||||
public Guid? SubjectId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是访视
|
||||
/// </summary>
|
||||
public bool IsVisit { get; set; }
|
||||
/// <summary>
|
||||
/// 是否是访视
|
||||
/// </summary>
|
||||
public bool IsVisit { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否是基线
|
||||
/// </summary>
|
||||
public bool IsBaseLine { get; set; }
|
||||
/// <summary>
|
||||
/// 是否是基线
|
||||
/// </summary>
|
||||
public bool IsBaseLine { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上传角色
|
||||
/// </summary>
|
||||
public UploadRole? UploadRole { get; set; }
|
||||
/// <summary>
|
||||
/// 上传角色
|
||||
/// </summary>
|
||||
public UploadRole? UploadRole { get; set; }
|
||||
|
||||
|
||||
public Guid? TrialReadingCriterionId { get; set; }
|
||||
}
|
||||
public Guid? TrialReadingCriterionId { get; set; }
|
||||
}
|
||||
|
||||
public class GetTrialClinicalDataSelectOutDto
|
||||
{
|
||||
public class GetTrialClinicalDataSelectOutDto
|
||||
{
|
||||
|
||||
public Guid Id { get; set; }
|
||||
public Guid Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
/// <summary>
|
||||
/// 名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 英文名称
|
||||
/// </summary>
|
||||
public string ClinicalDataSetEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
/// <summary>
|
||||
/// 临床级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 上传方式
|
||||
/// </summary>
|
||||
public ClinicalUploadType ClinicalUploadType { get; set; }
|
||||
/// <summary>
|
||||
/// 上传方式
|
||||
/// </summary>
|
||||
public ClinicalUploadType ClinicalUploadType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 临床级别名称
|
||||
/// </summary>
|
||||
public string ClinicalDataLevelName { get; set; }
|
||||
/// <summary>
|
||||
/// 临床级别名称
|
||||
/// </summary>
|
||||
public string ClinicalDataLevelName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上传方式名称
|
||||
/// </summary>
|
||||
public string ClinicalUploadTypeName { get; set; }
|
||||
/// <summary>
|
||||
/// 上传方式名称
|
||||
/// </summary>
|
||||
public string ClinicalUploadTypeName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 模板文件名称
|
||||
/// </summary>
|
||||
public string FileName { get; set; }
|
||||
/// <summary>
|
||||
/// 模板文件名称
|
||||
/// </summary>
|
||||
public string FileName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 文件路径
|
||||
/// </summary>
|
||||
public string Path { get; set; }
|
||||
/// <summary>
|
||||
/// 文件路径
|
||||
/// </summary>
|
||||
public string Path { get; set; }
|
||||
|
||||
public List<int> CriterionEnumList { get; set; }
|
||||
public List<int> CriterionEnumList { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,11 +1,5 @@
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
@@ -34,19 +28,19 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public class GetNextIRMedicalFeedbackInDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目Id
|
||||
/// </summary>
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
/// <summary>
|
||||
/// 项目Id
|
||||
/// </summary>
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
public Guid TaskMedicalReviewId { get; set; }
|
||||
}
|
||||
public Guid TaskMedicalReviewId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class GetIRMedicalFeedbackListInDto:PageInput
|
||||
public class GetIRMedicalFeedbackListInDto : PageInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目Id
|
||||
@@ -60,7 +54,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public Guid? SubjectId { get; set; }
|
||||
|
||||
|
||||
public MedicalReviewAuditState? AuditState { get; set; }
|
||||
public MedicalReviewAuditState? AuditState { get; set; }
|
||||
|
||||
public string SubjectCode { get; set; } = string.Empty;
|
||||
|
||||
@@ -101,7 +95,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public bool IsNotHaveSigned { get; set; } = false;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class GetIRMedicalFeedbackListOutDto
|
||||
{
|
||||
@@ -182,7 +176,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// <summary>
|
||||
/// 任务展示访视 读片任务显示是否顺序
|
||||
/// </summary>
|
||||
public ReadingOrder IsReadingTaskViewInOrder { get; set; }
|
||||
public ReadingOrder IsReadingTaskViewInOrder { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -290,7 +284,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public class GetMedicalReviewDialogInDto
|
||||
{
|
||||
@@ -303,14 +297,14 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public string RequestReReadingReason { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public Guid TaskMedicalReviewId { get; set; }
|
||||
|
||||
public string Content { get; set; }=string.Empty;
|
||||
public string Content { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 阅片人是否认同
|
||||
@@ -335,7 +329,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public List<OSSImageInfo> FileList { get; set; } = new List<OSSImageInfo>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
@@ -348,7 +342,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public string Content { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否有问题
|
||||
/// </summary>
|
||||
@@ -371,7 +365,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public Guid TaskMedicalReviewId { get; set; }
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public List<MedicineQuestionAnswer> QuestionAnswerList { get; set; }
|
||||
}
|
||||
@@ -386,7 +380,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public class GetMedicalReviewReadingTaskInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
@@ -436,11 +430,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public bool IsClosedDialog { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public List<TaskInfo> TaskList { get; set; } = new List<TaskInfo>();
|
||||
|
||||
|
||||
|
||||
public List<ReadingMedicineQuestion> QuestionAnswerList { get; set; } = new List<ReadingMedicineQuestion>();
|
||||
|
||||
|
||||
@@ -507,7 +501,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public AuditAdvice AuditAdviceEnum { get; set; }
|
||||
}
|
||||
|
||||
public class MedicalReviewInfo
|
||||
public class MedicalReviewInfo
|
||||
{
|
||||
public Guid TaskMedicalReviewId { get; set; }
|
||||
|
||||
@@ -542,7 +536,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public bool IsSendMessage { get; set; }
|
||||
}
|
||||
|
||||
public class ReadingMedicineQuestion
|
||||
public class ReadingMedicineQuestion
|
||||
{
|
||||
/// <summary>
|
||||
/// 答案
|
||||
@@ -566,15 +560,15 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// </summary>
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// </summary>
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
@@ -601,13 +595,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// </summary>
|
||||
public bool? IsConfirm { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
|
||||
public List<ReadingMedicineQuestion> Childrens { get; set; }
|
||||
public List<ReadingMedicineQuestion> Childrens { get; set; }
|
||||
}
|
||||
|
||||
public class TaskInfo
|
||||
@@ -640,7 +634,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public Arm ArmEnum { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 评估结果
|
||||
@@ -694,12 +688,12 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// </summary>
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// </summary>
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
|
||||
public string Answer { get; set; }
|
||||
public string Answer { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
|
||||
@@ -1,14 +1,12 @@
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace IRaCIS.Core.Application.ViewModel
|
||||
{
|
||||
|
||||
public class ReadingMedicineSystemQuestionView: ReadingMedicineSystemQuestionAddOrEdit
|
||||
public class ReadingMedicineSystemQuestionView : ReadingMedicineSystemQuestionAddOrEdit
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
@@ -17,18 +15,18 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
}
|
||||
|
||||
///<summary>ReadingMedicineSystemQuestionQuery 列表查询参数模型</summary>
|
||||
public class ReadingMedicineSystemQuestionQuery:PageInput
|
||||
public class ReadingMedicineSystemQuestionQuery : PageInput
|
||||
{
|
||||
public string Type { get; set; } = string.Empty;
|
||||
public string ParentTriggerValue { get; set; } = string.Empty;
|
||||
public string QuestionName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType? LanguageType { get; set; }
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType? LanguageType { get; set; }
|
||||
|
||||
public string TypeValue { get; set; } = string.Empty;
|
||||
public string TypeValue { get; set; } = string.Empty;
|
||||
|
||||
|
||||
public CriterionType? CurrentCriterionType { get; set; }
|
||||
@@ -56,15 +54,15 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 任务类型
|
||||
@@ -92,17 +90,17 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
}
|
||||
|
||||
|
||||
public class AddDefaultQuestionsInDto
|
||||
public class AddDefaultQuestionsInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
[NotDefault]
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
|
||||
public LanguageType LanguageType { get; set; }
|
||||
}
|
||||
public LanguageType LanguageType { get; set; }
|
||||
}
|
||||
|
||||
public class AddTrialDataFromSystemInDto
|
||||
public class AddTrialDataFromSystemInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
@@ -193,15 +191,15 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
/// </summary>
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
/// <summary>
|
||||
/// 是否是必须
|
||||
/// </summary>
|
||||
public bool IsRequired { get; set; }
|
||||
/// <summary>
|
||||
/// 是否是必须
|
||||
/// </summary>
|
||||
public bool IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
@@ -237,12 +235,12 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
public class ReadingMedicineTrialQuestionView : ReadingMedicineSystemQuestionAddOrEdit
|
||||
{
|
||||
public DateTime CreateTime { get; set; }
|
||||
|
||||
|
||||
public Guid UpdateUserId { get; set; }
|
||||
public Guid CreateUserId { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
public DateTime UpdateTime { get; set; }
|
||||
|
||||
|
||||
public bool? IsConfirm { get; set; }
|
||||
|
||||
public int? ParentShowOrder { get; set; }
|
||||
@@ -265,10 +263,10 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
|
||||
public class VerifyIsCanConfirmInDto
|
||||
{
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
}
|
||||
public Guid TrialReadingCriterionId { get; set; }
|
||||
}
|
||||
|
||||
public class GetMedicineQuestionPreviewOutDto
|
||||
public class GetMedicineQuestionPreviewOutDto
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
|
||||
@@ -287,15 +285,15 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
/// </summary>
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; }
|
||||
|
||||
|
||||
|
||||
@@ -340,7 +338,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
}
|
||||
|
||||
///<summary>ReadingMedicineTrialQuestionQuery 列表查询参数模型</summary>
|
||||
public class ReadingMedicineTrialQuestionQuery:PageInput
|
||||
public class ReadingMedicineTrialQuestionQuery : PageInput
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目Id
|
||||
@@ -356,12 +354,12 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
|
||||
public string QuestionName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType? LanguageType { get; set; }
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType? LanguageType { get; set; }
|
||||
|
||||
public string TypeValue { get; set; } = string.Empty;
|
||||
public string TypeValue { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 任务类型
|
||||
@@ -382,11 +380,11 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||
public string? ParentTriggerValue { get; set; } = string.Empty;
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
public string TypeValue { get; set; }
|
||||
/// <summary>
|
||||
/// 语言类型
|
||||
/// </summary>
|
||||
public LanguageType LanguageType { get; set; } = LanguageType.Chinese;
|
||||
public string TypeValue { get; set; }
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
@@ -1,16 +1,11 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
public class ReadingPeriodSetAddOrEdit
|
||||
public class ReadingPeriodSetAddOrEdit
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
public Guid? Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 项目ID
|
||||
@@ -54,9 +49,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
public ReadingSetType ReadingSetType { get; set; } = ReadingSetType.ImageReading;
|
||||
|
||||
public List<Guid> SiteIds { get; set; } = new List<Guid>();
|
||||
public List<Guid> SiteIds { get; set; } = new List<Guid>();
|
||||
|
||||
public List<Guid> SubjectVisitIds { get; set; } = new List<Guid>();
|
||||
public List<Guid> SubjectVisitIds { get; set; } = new List<Guid>();
|
||||
|
||||
}
|
||||
|
||||
@@ -318,7 +313,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public ReadingPeriodStatus IsTakeEffect { get; set; }
|
||||
}
|
||||
|
||||
public class ReadingPeriodSetQuery:PageInput
|
||||
public class ReadingPeriodSetQuery : PageInput
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -3,53 +3,50 @@
|
||||
// 生成时间 2023-05-08 15:20:44
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
using System;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System.Collections.Generic;
|
||||
namespace IRaCIS.Core.Application.ViewModel
|
||||
{
|
||||
/// <summary> UserWLTemplateView 列表视图模型 </summary>
|
||||
public class UserWLTemplateView
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string TemplateName { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
public Guid CreateUserId { get; set; }
|
||||
public int WW { get; set; }
|
||||
public int WL { get; set; }
|
||||
public int ShowOrder { get; set; } = 0;
|
||||
public bool IsPitchOn { get; set; }
|
||||
}
|
||||
{
|
||||
/// <summary> UserWLTemplateView 列表视图模型 </summary>
|
||||
public class UserWLTemplateView
|
||||
{
|
||||
public Guid Id { get; set; }
|
||||
public string TemplateName { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
public Guid CreateUserId { get; set; }
|
||||
public int WW { get; set; }
|
||||
public int WL { get; set; }
|
||||
public int ShowOrder { get; set; } = 0;
|
||||
public bool IsPitchOn { get; set; }
|
||||
}
|
||||
|
||||
///<summary>UserWLTemplateQuery 列表查询参数模型</summary>
|
||||
public class UserWLTemplateQuery
|
||||
{
|
||||
///<summary> TemplateName</summary>
|
||||
///<summary>UserWLTemplateQuery 列表查询参数模型</summary>
|
||||
public class UserWLTemplateQuery
|
||||
{
|
||||
///<summary> TemplateName</summary>
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
public class SetAutoCutNextTaskInDto
|
||||
{
|
||||
public bool AutoCutNextTask { get; set; }
|
||||
}
|
||||
public class SetAutoCutNextTaskInDto
|
||||
{
|
||||
public bool AutoCutNextTask { get; set; }
|
||||
}
|
||||
|
||||
///<summary> UserWLTemplateAddOrEdit 列表查询参数模型</summary>
|
||||
public class UserWLTemplateAddOrEdit
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
public string TemplateName { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
public Guid CreateUserId { get; set; }
|
||||
public int WW { get; set; }
|
||||
public int WL { get; set; }
|
||||
//public int ShowOrder { get; set; }
|
||||
//public bool IsPitchOn { get; set; }
|
||||
}
|
||||
|
||||
///<summary> UserWLTemplateAddOrEdit 列表查询参数模型</summary>
|
||||
public class UserWLTemplateAddOrEdit
|
||||
{
|
||||
public Guid? Id { get; set; }
|
||||
public string TemplateName { get; set; }
|
||||
public Guid UserId { get; set; }
|
||||
public DateTime CreateTime { get; set; }
|
||||
public Guid CreateUserId { get; set; }
|
||||
public int WW { get; set; }
|
||||
public int WL { get; set; }
|
||||
//public int ShowOrder { get; set; }
|
||||
//public bool IsPitchOn { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,12 +1,7 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
@@ -231,7 +226,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public bool IsAnalysisCreate { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 转换之前的任务Id(转化的任务才有该值)
|
||||
@@ -241,7 +236,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
|
||||
// [Projectable]
|
||||
|
||||
public bool IsConvertedTask { get; set; }
|
||||
public bool IsConvertedTask { get; set; }
|
||||
|
||||
//[NotMapped]
|
||||
//public List<CrterionDictionaryGroup> CrterionDictionaryGroup
|
||||
@@ -296,7 +291,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
//前序任务需要签名 但是未签名
|
||||
public bool IsFrontTaskNeedSignButNotSign { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 裁判结果图片地址
|
||||
/// </summary>
|
||||
|
||||
@@ -1,23 +1,18 @@
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.Reading.Interface
|
||||
{
|
||||
public interface IClinicalAnswerService
|
||||
{
|
||||
Task<IResponseOutput> CRCSignClinicalData(CRCSignClinicalDataInDto inDto);
|
||||
public interface IClinicalAnswerService
|
||||
{
|
||||
Task<IResponseOutput> CRCSignClinicalData(CRCSignClinicalDataInDto inDto);
|
||||
|
||||
|
||||
Task DeleteStudyClinical(DeleteStudyClinicalInDto inDto);
|
||||
Task DeleteStudyClinical(DeleteStudyClinicalInDto inDto);
|
||||
|
||||
Task AddStudyClinical(AddStudyClinicalInDto inDto);
|
||||
Task AddStudyClinical(AddStudyClinicalInDto inDto);
|
||||
|
||||
|
||||
Task AutoAddCRCClinical(AutoAddClinicalInDto inDto);
|
||||
Task AutoAddCRCClinical(AutoAddClinicalInDto inDto);
|
||||
|
||||
Task<IResponseOutput> PMConfirmClinical(CRCConfirmClinicalInDto inDto);
|
||||
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
namespace IRaCIS.Core.Application.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
@@ -18,8 +17,8 @@ namespace IRaCIS.Core.Application.Interfaces
|
||||
Task SynchronizationQuestion(List<SynchronizationQuestionDto> inDto);
|
||||
|
||||
|
||||
void FindChildQuestion(ClinicalQuestionPreviewDto item, List<ClinicalQuestionPreviewDto> questions, List<ClinicalTablePreviewDto> tableQuestions, List<ClinicalFormQuestionAnswer> answers, List<ClinicalFormTableQuestionAnswer> tableAnswers);
|
||||
void FindChildQuestion(ClinicalQuestionPreviewDto item, List<ClinicalQuestionPreviewDto> questions, List<ClinicalTablePreviewDto> tableQuestions, List<ClinicalFormQuestionAnswer> answers, List<ClinicalFormTableQuestionAnswer> tableAnswers);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,25 +6,25 @@
|
||||
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
namespace IRaCIS.Core.Application.Interfaces
|
||||
{
|
||||
/// <summary>
|
||||
/// IOrganInfoService
|
||||
/// </summary>
|
||||
public interface IOrganInfoService
|
||||
{
|
||||
/// <summary>
|
||||
/// IOrganInfoService
|
||||
/// </summary>
|
||||
public interface IOrganInfoService
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
Task<List<OrganInfoView>> GetOrganInfoList(OrganInfoQuery inQuery);
|
||||
|
||||
Task<IResponseOutput> AddOrUpdateOrganInfo(OrganInfoAddOrEdit addOrEditOrganInfo);
|
||||
|
||||
Task<IResponseOutput> DeleteOrganInfo(Guid organInfoId);
|
||||
Task<List<OrganInfoView>> GetOrganInfoList(OrganInfoQuery inQuery);
|
||||
|
||||
Task<IResponseOutput> AddOrUpdateOrganInfo(OrganInfoAddOrEdit addOrEditOrganInfo);
|
||||
|
||||
Task<IResponseOutput> DeleteOrganInfo(Guid organInfoId);
|
||||
|
||||
Task<IResponseOutput> SynchronizeSystemOrganToTrial(SynchronizeSystemOrganToTrialInDto inDto);
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,13 +4,10 @@
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
public interface IReadModuleService
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
using IRaCIS.Core.Application.Service.Inspection.DTO;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
@@ -20,15 +19,15 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
Task<List<GetReadingClinicalDataListOutDto>> GetClinicalDataList(GetReadingOrTaskClinicalDataListInDto inDto);
|
||||
|
||||
|
||||
// Task<(List<GetReadingClinicalDataListOutDto>, object)> GetReadingClinicalDataList(GetReadingClinicalDataListIndto inDto);
|
||||
// Task<(List<GetReadingClinicalDataListOutDto>, object)> GetReadingClinicalDataList(GetReadingClinicalDataListIndto inDto);
|
||||
|
||||
|
||||
Task<List<GetCRCClinicalDataOutDto>> GetStudyClinicalData(GetStudyClinicalDataInDto inDto);
|
||||
|
||||
Task<List<GetCRCClinicalDataOutDto>> GetCRCClinicalData(GetCRCClinicalDataInDto inDto);
|
||||
Task<List<GetCRCClinicalDataOutDto>> GetCRCClinicalData(GetCRCClinicalDataInDto inDto);
|
||||
|
||||
|
||||
Task DealVisiTaskClinicalDataSignedAsync(Guid trialId, Guid subjectId, Guid readingId, bool isVisit, Guid trialReadingCritrialId);
|
||||
Task DealVisiTaskClinicalDataSignedAsync(Guid trialId, Guid subjectId, Guid readingId, bool isVisit, Guid trialReadingCritrialId);
|
||||
|
||||
Task<IResponseOutput> SignConsistencyAnalysisReadingClinicalData(SignConsistencyAnalysisReadingClinicalDataInDto inDto);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
Task<GetGlobalReadingInfoOutDto> GetGlobalReadingInfo(GetGlobalReadingInfoInDto inDto);
|
||||
|
||||
|
||||
Task<List<DicomReadingQuestionAnswer>> GetReadingQuestion(Guid trialReadingCriterionId, Guid? visitTaskId,QuestionClassify? questionClassify, List<GroupClassify>? groupClassifyList);
|
||||
Task<List<DicomReadingQuestionAnswer>> GetReadingQuestion(Guid trialReadingCriterionId, Guid? visitTaskId, QuestionClassify? questionClassify, List<GroupClassify>? groupClassifyList);
|
||||
|
||||
Task<GetReadingTableQuestionOutDto> GetReadingTableQuestion(GetReadingTableQuestionOrAnswerInDto inDto);
|
||||
|
||||
@@ -41,5 +41,5 @@ namespace IRaCIS.Core.Application.Contracts
|
||||
|
||||
Task<List<GetReadingPastResultListOutDto>> GetReadingPastResultList(GetReadingPastResultListInDto inDto);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
|
||||
namespace IRaCIS.Core.Application.Contracts
|
||||
{
|
||||
|
||||
+181
-182
@@ -1,24 +1,21 @@
|
||||
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using MassTransit;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using Newtonsoft.Json;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
/// <summary>
|
||||
/// 阅片医学审核
|
||||
/// </summary>
|
||||
[ ApiExplorerSettings(GroupName = "Reading")]
|
||||
{
|
||||
/// <summary>
|
||||
/// 阅片医学审核
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Reading")]
|
||||
public class ReadingMedicalReviewService(
|
||||
IRepository<ReadingMedicineTrialQuestion> _readingMedicineTrialQuestionRepository,
|
||||
IRepository<Trial> _trialRepository,
|
||||
@@ -36,19 +33,19 @@ namespace IRaCIS.Core.Application.Service
|
||||
ITrialEmailNoticeConfigService _trialEmailNoticeConfigService) : BaseService, IReadingMedicalReviewService
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取医学审核任务信息
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
|
||||
/// <summary>
|
||||
/// 获取医学审核任务信息
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<GetMedicalReviewReadingTaskOutDto> GetMedicalReviewReadingTask(GetMedicalReviewReadingTaskInDto inDto)
|
||||
{
|
||||
MedicalReviewInfo reviewInfo= await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId)
|
||||
public async Task<GetMedicalReviewReadingTaskOutDto> GetMedicalReviewReadingTask(GetMedicalReviewReadingTaskInDto inDto)
|
||||
{
|
||||
MedicalReviewInfo reviewInfo = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId)
|
||||
.ProjectTo<MedicalReviewInfo>(_mapper.ConfigurationProvider).FirstNotNullAsync();
|
||||
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == reviewInfo.VisitTaskId).Include(x=>x.DoctorUser).Include(x => x.Subject).FirstNotNullAsync();
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == reviewInfo.VisitTaskId).Include(x => x.DoctorUser).Include(x => x.Subject).FirstNotNullAsync();
|
||||
|
||||
//if (taskInfo.TaskState != TaskState.Effect)
|
||||
//{
|
||||
@@ -56,15 +53,15 @@ namespace IRaCIS.Core.Application.Service
|
||||
//}
|
||||
inDto.TrialReadingCriterionId = taskInfo.TrialReadingCriterionId;
|
||||
var medicalReviewInfo = await _readingQuestionCriterionTrial.Where(x => x.Id == taskInfo.TrialReadingCriterionId).Select(x => new GetMedicalReviewReadingTaskOutDto()
|
||||
{
|
||||
ReadingType=x.ReadingType,
|
||||
IsReadingTaskViewInOrder=x.IsReadingTaskViewInOrder,
|
||||
|
||||
}).FirstNotNullAsync();
|
||||
{
|
||||
ReadingType = x.ReadingType,
|
||||
IsReadingTaskViewInOrder = x.IsReadingTaskViewInOrder,
|
||||
|
||||
}).FirstNotNullAsync();
|
||||
|
||||
medicalReviewInfo.MedicalReviewInfo = reviewInfo;
|
||||
|
||||
|
||||
|
||||
|
||||
medicalReviewInfo.VisitTaskId = taskInfo.Id;
|
||||
|
||||
@@ -79,7 +76,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
medicalReviewInfo.IsExistsClinicalData = clinicalDataList.Count > 0;
|
||||
|
||||
medicalReviewInfo.ArmEnum = taskInfo.ArmEnum;
|
||||
medicalReviewInfo.SubjectCode = taskInfo.IsAnalysisCreate?taskInfo.BlindSubjectCode: taskInfo.Subject.Code;
|
||||
medicalReviewInfo.SubjectCode = taskInfo.IsAnalysisCreate ? taskInfo.BlindSubjectCode : taskInfo.Subject.Code;
|
||||
medicalReviewInfo.TaskBlindName = taskInfo.TaskBlindName;
|
||||
medicalReviewInfo.ReadingUser = taskInfo.DoctorUser.FirstName + taskInfo.DoctorUser.LastName;
|
||||
medicalReviewInfo.SubjectId = taskInfo.SubjectId;
|
||||
@@ -91,7 +88,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
medicalReviewInfo.QuestionAnswerList = await this.GetMedicalQuestionAnswer(inDto);
|
||||
|
||||
|
||||
|
||||
|
||||
var result = await _readingMedicineQuestionAnswerRepository.SaveChangesAsync();
|
||||
|
||||
#region 取任务
|
||||
@@ -102,7 +99,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
case ReadingCategory.Oncology:
|
||||
medicalReviewInfo.OncologyInfo = await _iReadingImageTaskService.GetOncologyReadingInfo(new GetOncologyReadingInfoInDto()
|
||||
{
|
||||
VisitTaskId= taskInfo.Id
|
||||
VisitTaskId = taskInfo.Id
|
||||
});
|
||||
break;
|
||||
case ReadingCategory.Judge:
|
||||
@@ -123,12 +120,12 @@ namespace IRaCIS.Core.Application.Service
|
||||
if (medicalReviewInfo.IsReadingTaskViewInOrder == ReadingOrder.InOrder)
|
||||
{
|
||||
medicalReviewInfo.TaskList = await _visitTaskRepository
|
||||
|
||||
|
||||
.Where(x => x.IsAnalysisCreate == taskInfo.IsAnalysisCreate)
|
||||
.Where(x => x.TaskState == TaskState.Effect || x.Id == taskInfo.Id)
|
||||
.Where(x => x.SubjectId == taskInfo.SubjectId
|
||||
&& x.ArmEnum == taskInfo.ArmEnum
|
||||
&&x.ReadingCategory== ReadingCategory.Visit
|
||||
&& x.ReadingCategory == ReadingCategory.Visit
|
||||
&& x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId
|
||||
|
||||
&& x.DoctorUserId == taskInfo.DoctorUserId &&
|
||||
@@ -137,7 +134,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
).OrderBy(x => x.VisitTaskNum).Select(x => new TaskInfo()
|
||||
{
|
||||
TaskId = x.Id,
|
||||
VisitTaskNum=x.VisitTaskNum,
|
||||
VisitTaskNum = x.VisitTaskNum,
|
||||
//JudgeTaskId=x.JudgeVisitTaskId, // 在下面赋值 要去已完成的
|
||||
IsCurrentTask = x.Id == taskInfo.Id,
|
||||
ReadingCategory = x.ReadingCategory,
|
||||
@@ -152,15 +149,15 @@ namespace IRaCIS.Core.Application.Service
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
List<TaskInfo> otherTask = await _visitTaskRepository.Where(x =>
|
||||
List<TaskInfo> otherTask = await _visitTaskRepository.Where(x =>
|
||||
x.SubjectId == taskInfo.SubjectId
|
||||
&& x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId
|
||||
&& x.TaskState == TaskState.Effect
|
||||
&&x.ReadingCategory == ReadingCategory.Visit
|
||||
&& x.ReadingCategory == ReadingCategory.Visit
|
||||
&& x.IsAnalysisCreate == taskInfo.IsAnalysisCreate
|
||||
&& x.IsSelfAnalysis == taskInfo.IsSelfAnalysis
|
||||
&& x.DoctorUserId != taskInfo.DoctorUserId
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned
|
||||
&& x.DoctorUserId != taskInfo.DoctorUserId
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned
|
||||
&& x.ReReadingApplyState != ReReadingApplyState.Agree)
|
||||
.OrderBy(x => x.VisitTaskNum).Select(x => new TaskInfo()
|
||||
{
|
||||
@@ -206,17 +203,17 @@ namespace IRaCIS.Core.Application.Service
|
||||
}).ToListAsync();
|
||||
|
||||
List<TaskInfo> otherTask = await _visitTaskRepository.Where(x =>
|
||||
x.SouceReadModuleId == taskInfo.SouceReadModuleId
|
||||
x.SouceReadModuleId == taskInfo.SouceReadModuleId
|
||||
&& x.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId
|
||||
&& x.DoctorUserId != taskInfo.DoctorUserId
|
||||
&& x.IsAnalysisCreate == taskInfo.IsAnalysisCreate
|
||||
&& x.IsSelfAnalysis == taskInfo.IsSelfAnalysis
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned
|
||||
&& x.ReReadingApplyState != ReReadingApplyState.Agree
|
||||
&& x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId
|
||||
&& x.TaskState == TaskState.Effect
|
||||
)
|
||||
|
||||
|
||||
.OrderBy(x => x.VisitTaskNum).Select(x => new TaskInfo()
|
||||
{
|
||||
TaskId = x.Id,
|
||||
@@ -241,26 +238,26 @@ namespace IRaCIS.Core.Application.Service
|
||||
});
|
||||
}
|
||||
|
||||
var taskIds = medicalReviewInfo.TaskList.Select(x => x.TaskId).ToList();
|
||||
var taskIds = medicalReviewInfo.TaskList.Select(x => x.TaskId).ToList();
|
||||
|
||||
// 找访视
|
||||
var visitTaskAnswer = await _readingTaskQuestionAnswerRepository.Where(x => taskIds.Contains(x.VisitTaskId) && x.ReadingQuestionTrial.IsJudgeQuestion).Select(x => new JudgeQuestionAnswerInfo
|
||||
{
|
||||
Answer = x.Answer,
|
||||
VisitTaskId = x.VisitTaskId,
|
||||
DictionaryCode = x.ReadingQuestionTrial.DictionaryCode,
|
||||
ShowOrder = x.ReadingQuestionTrial.ShowOrder,
|
||||
QuestionGenre = x.ReadingQuestionTrial.QuestionGenre,
|
||||
QuestionName = x.ReadingQuestionTrial.QuestionName.LanguageName(x.ReadingQuestionTrial.QuestionEnName,_userInfo.IsEn_Us)
|
||||
}).ToListAsync();
|
||||
var globalChangeAnswer = await _readingGlobalTaskInfoRepository.Where(x => taskIds.Contains(x.GlobalTaskId) && x.Answer != string.Empty && x.GlobalAnswerType == GlobalAnswerType.Question && x.GlobalVisitTask.TaskState == TaskState.Effect).ToListAsync();
|
||||
// 找访视
|
||||
var visitTaskAnswer = await _readingTaskQuestionAnswerRepository.Where(x => taskIds.Contains(x.VisitTaskId) && x.ReadingQuestionTrial.IsJudgeQuestion).Select(x => new JudgeQuestionAnswerInfo
|
||||
{
|
||||
Answer = x.Answer,
|
||||
VisitTaskId = x.VisitTaskId,
|
||||
DictionaryCode = x.ReadingQuestionTrial.DictionaryCode,
|
||||
ShowOrder = x.ReadingQuestionTrial.ShowOrder,
|
||||
QuestionGenre = x.ReadingQuestionTrial.QuestionGenre,
|
||||
QuestionName = x.ReadingQuestionTrial.QuestionName.LanguageName(x.ReadingQuestionTrial.QuestionEnName, _userInfo.IsEn_Us)
|
||||
}).ToListAsync();
|
||||
var globalChangeAnswer = await _readingGlobalTaskInfoRepository.Where(x => taskIds.Contains(x.GlobalTaskId) && x.Answer != string.Empty && x.GlobalAnswerType == GlobalAnswerType.Question && x.GlobalVisitTask.TaskState == TaskState.Effect).ToListAsync();
|
||||
// 找全局阅片 和裁判
|
||||
var globalTask = await _visitTaskRepository.Where(x =>
|
||||
x.SubjectId == taskInfo.SubjectId
|
||||
&& x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId
|
||||
&& x.TaskState == TaskState.Effect
|
||||
&& x.ArmEnum== taskInfo.ArmEnum
|
||||
&& (x.ReadingCategory == ReadingCategory.Global||x.ReadingCategory==ReadingCategory.Judge)
|
||||
&& x.ArmEnum == taskInfo.ArmEnum
|
||||
&& (x.ReadingCategory == ReadingCategory.Global || x.ReadingCategory == ReadingCategory.Judge)
|
||||
&& x.IsAnalysisCreate == taskInfo.IsAnalysisCreate
|
||||
&& x.IsSelfAnalysis == taskInfo.IsSelfAnalysis
|
||||
&& x.DoctorUserId == taskInfo.DoctorUserId
|
||||
@@ -274,27 +271,27 @@ namespace IRaCIS.Core.Application.Service
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
medicalReviewInfo.TaskList.ForEach(x =>
|
||||
medicalReviewInfo.TaskList.ForEach(x =>
|
||||
{
|
||||
|
||||
var visitGlobalInfo = globalTask.Where(y => y.VisitTaskNum == x.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global]).FirstOrDefault();
|
||||
if (visitGlobalInfo != null)
|
||||
{
|
||||
x.GlobalTaskId = visitGlobalInfo.Id;
|
||||
x.GlobalTaskName = visitGlobalInfo.TaskBlindName;
|
||||
}
|
||||
|
||||
var visitGlobalInfo = globalTask.Where(y => y.VisitTaskNum == x.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Global]).FirstOrDefault();
|
||||
if (visitGlobalInfo != null)
|
||||
{
|
||||
x.GlobalTaskId = visitGlobalInfo.Id;
|
||||
x.GlobalTaskName = visitGlobalInfo.TaskBlindName;
|
||||
}
|
||||
var visitJudgeInfo = globalTask.Where(y => y.VisitTaskNum == x.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Judge]).FirstOrDefault();
|
||||
if (visitJudgeInfo != null)
|
||||
{
|
||||
x.JudgeTaskId = visitJudgeInfo.Id;
|
||||
x.JudgeTaskName = visitJudgeInfo.TaskBlindName;
|
||||
}
|
||||
|
||||
var visitJudgeInfo = globalTask.Where(y => y.VisitTaskNum == x.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Judge]).FirstOrDefault();
|
||||
if (visitJudgeInfo != null)
|
||||
{
|
||||
x.JudgeTaskId = visitJudgeInfo.Id;
|
||||
x.JudgeTaskName = visitJudgeInfo.TaskBlindName;
|
||||
}
|
||||
|
||||
|
||||
x.IsGlobalChange = globalChangeAnswer.Any(y => y.TaskId == x.TaskId);
|
||||
x.JudgeQuestionAnswerInfoList = visitTaskAnswer.Where(y => y.VisitTaskId == x.TaskId).OrderBy(y => y.ShowOrder).ToList();
|
||||
});
|
||||
x.IsGlobalChange = globalChangeAnswer.Any(y => y.TaskId == x.TaskId);
|
||||
x.JudgeQuestionAnswerInfoList = visitTaskAnswer.Where(y => y.VisitTaskId == x.TaskId).OrderBy(y => y.ShowOrder).ToList();
|
||||
});
|
||||
|
||||
medicalReviewInfo.TaskList.ForEach(x =>
|
||||
{
|
||||
@@ -304,9 +301,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
return medicalReviewInfo;
|
||||
|
||||
@@ -319,26 +316,26 @@ namespace IRaCIS.Core.Application.Service
|
||||
var medicalReview = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).FirstNotNullAsync();
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == medicalReview.VisitTaskId).FirstNotNullAsync();
|
||||
|
||||
var questionQuery = from data in _readingMedicineTrialQuestionRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm && x.IsEnable&&x.ReadingCategory==taskInfo.ReadingCategory&&x.TrialReadingCriterionId==inDto.TrialReadingCriterionId)
|
||||
var questionQuery = from data in _readingMedicineTrialQuestionRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm && x.IsEnable && x.ReadingCategory == taskInfo.ReadingCategory && x.TrialReadingCriterionId == inDto.TrialReadingCriterionId)
|
||||
join questionAnswer in _readingMedicineQuestionAnswerRepository.Where(x => x.TaskMedicalReviewId == inDto.TaskMedicalReviewId) on data.Id equals questionAnswer.ReadingMedicineQuestionId into questionAnswerTemp
|
||||
from leftquestionAnswer in questionAnswerTemp.DefaultIfEmpty()
|
||||
select new ReadingMedicineQuestion()
|
||||
{
|
||||
Id = data.Id,
|
||||
Type = data.Type,
|
||||
ParentTriggerValue = data.ParentTriggerValue,
|
||||
LanguageType = data.LanguageType,
|
||||
IsEnable = data.IsEnable,
|
||||
IsConfirm = data.IsConfirm,
|
||||
QuestionName = data.QuestionName,
|
||||
IsRequired = data.IsRequired,
|
||||
ShowOrder = data.ShowOrder,
|
||||
ParentId = data.ParentId,
|
||||
TypeValue = data.TypeValue,
|
||||
Answer = leftquestionAnswer.Answer
|
||||
};
|
||||
Id = data.Id,
|
||||
Type = data.Type,
|
||||
ParentTriggerValue = data.ParentTriggerValue,
|
||||
LanguageType = data.LanguageType,
|
||||
IsEnable = data.IsEnable,
|
||||
IsConfirm = data.IsConfirm,
|
||||
QuestionName = data.QuestionName,
|
||||
IsRequired = data.IsRequired,
|
||||
ShowOrder = data.ShowOrder,
|
||||
ParentId = data.ParentId,
|
||||
TypeValue = data.TypeValue,
|
||||
Answer = leftquestionAnswer.Answer
|
||||
};
|
||||
|
||||
var questionList = await questionQuery.OrderBy(x=>x.ShowOrder).ToListAsync();
|
||||
var questionList = await questionQuery.OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
|
||||
List<ReadingMedicineQuestion> medicineQuestionList = questionList.Where(x => x.ParentId == null).ToList();
|
||||
medicineQuestionList.ForEach(x =>
|
||||
@@ -402,11 +399,11 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var result = await _readingMedicineQuestionAnswerRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Result(result);
|
||||
return ResponseOutput.Result(result);
|
||||
|
||||
}
|
||||
|
||||
@@ -441,20 +438,20 @@ namespace IRaCIS.Core.Application.Service
|
||||
AuditAdviceEnum = inDto.AuditAdviceEnum,
|
||||
SaveConclusionTime = DateTime.Now,
|
||||
|
||||
}); ;
|
||||
}); ;
|
||||
|
||||
if (inDto.IsSendDialog&& !medicalReview.IsSendMessage && inDto.IsHaveQuestion)
|
||||
if (inDto.IsSendDialog && !medicalReview.IsSendMessage && inDto.IsHaveQuestion)
|
||||
{
|
||||
|
||||
|
||||
await _readingMedicalReviewDialogRepository.AddAsync(new ReadingMedicalReviewDialog()
|
||||
{
|
||||
AuditAdviceEnum = inDto.AuditAdviceEnum,
|
||||
TaskMedicalReviewId = inDto.TaskMedicalReviewId,
|
||||
UserTypeShortName = _userInfo.UserTypeShortName,
|
||||
IsHaveQuestion=inDto.IsHaveQuestion,
|
||||
Questioning=inDto.Questioning,
|
||||
VisitTaskId= medicalReview.VisitTaskId,
|
||||
|
||||
IsHaveQuestion = inDto.IsHaveQuestion,
|
||||
Questioning = inDto.Questioning,
|
||||
VisitTaskId = medicalReview.VisitTaskId,
|
||||
|
||||
UserTypeEnumInt = _userInfo.UserTypeEnumInt,
|
||||
ImagePath = JsonConvert.SerializeObject(inDto.FileList),
|
||||
});
|
||||
@@ -475,10 +472,10 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview()
|
||||
{
|
||||
LatestReplyUserId=_userInfo.Id,
|
||||
LatestReplyUserId = _userInfo.Id,
|
||||
IsClosedDialog = inDto.IsClosedDialog,
|
||||
MedicalDialogCloseEnum=inDto.MedicalDialogCloseEnum,
|
||||
DialogCloseReason=inDto.DialogCloseReason,
|
||||
MedicalDialogCloseEnum = inDto.MedicalDialogCloseEnum,
|
||||
DialogCloseReason = inDto.DialogCloseReason,
|
||||
});
|
||||
|
||||
var taskMedical = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).FirstNotNullAsync();
|
||||
@@ -486,9 +483,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
ReadingMedicalReviewDialog dialog = new ReadingMedicalReviewDialog()
|
||||
{
|
||||
TaskMedicalReviewId = inDto.TaskMedicalReviewId,
|
||||
VisitTaskId= taskMedical.VisitTaskId,
|
||||
VisitTaskId = taskMedical.VisitTaskId,
|
||||
UserTypeShortName = _userInfo.UserTypeShortName,
|
||||
MedicalDialogCloseEnum= inDto.MedicalDialogCloseEnum,
|
||||
MedicalDialogCloseEnum = inDto.MedicalDialogCloseEnum,
|
||||
Content = inDto.DialogCloseReason,
|
||||
UserTypeEnumInt = _userInfo.UserTypeEnumInt,
|
||||
};
|
||||
@@ -504,7 +501,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
public async Task<IResponseOutput> SendMedicalReviewDialog(SendMedicalReviewDialogInDto inDto)
|
||||
public async Task<IResponseOutput> SendMedicalReviewDialog(SendMedicalReviewDialogInDto inDto)
|
||||
{
|
||||
var medicalReviewInfo = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).FirstNotNullAsync();
|
||||
if (medicalReviewInfo.IsInvalid)
|
||||
@@ -525,15 +522,15 @@ namespace IRaCIS.Core.Application.Service
|
||||
Content = inDto.Content,
|
||||
UserTypeEnumInt = _userInfo.UserTypeEnumInt,
|
||||
VisitTaskId = visitTaskId,
|
||||
AuditAdviceEnum=inDto.AuditAdviceEnum,
|
||||
|
||||
IsHaveQuestion=inDto.IsHaveQuestion,
|
||||
Questioning=inDto.Questioning,
|
||||
AuditAdviceEnum = inDto.AuditAdviceEnum,
|
||||
|
||||
IsHaveQuestion = inDto.IsHaveQuestion,
|
||||
Questioning = inDto.Questioning,
|
||||
};
|
||||
|
||||
await _readingMedicalReviewDialogRepository.AddAsync(dialog);
|
||||
|
||||
var result=await _readingMedicalReviewDialogRepository.SaveChangesAsync();
|
||||
var result = await _readingMedicalReviewDialogRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Result(result);
|
||||
}
|
||||
|
||||
@@ -552,25 +549,25 @@ namespace IRaCIS.Core.Application.Service
|
||||
throw new BusinessValidationFailedException(_localizer["MedicalReview_invalid"]);
|
||||
}
|
||||
var visitTaskId = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).Select(x => x.VisitTaskId).FirstOrDefaultAsync();
|
||||
if (inDto.IsApplyHeavyReading??false)
|
||||
if (inDto.IsApplyHeavyReading ?? false)
|
||||
{
|
||||
await _visitTaskService.ApplyReReading(new ApplyReReadingCommand()
|
||||
{
|
||||
IsCopyOrigenalForms = inDto.IsCopyOrigenalForms??false,
|
||||
IsCopyFollowForms=inDto.IsCopyFollowForms ?? false,
|
||||
IsCopyOrigenalForms = inDto.IsCopyOrigenalForms ?? false,
|
||||
IsCopyFollowForms = inDto.IsCopyFollowForms ?? false,
|
||||
RequestReReadingReason = inDto.RequestReReadingReason,
|
||||
RequestReReadingType = RequestReReadingType.DocotorApply,
|
||||
TrialId = inDto.TrialId,
|
||||
TaskIdList = new List<Guid>()
|
||||
{
|
||||
visitTaskId
|
||||
visitTaskId
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(x => !x.IsClosedDialog && x.Id == inDto.TaskMedicalReviewId, x => new TaskMedicalReview()
|
||||
{
|
||||
LatestReplyUserId=_userInfo.Id,
|
||||
LatestReplyUserId = _userInfo.Id,
|
||||
IsClosedDialog = true,
|
||||
MedicalDialogCloseEnum = MedicalDialogClose.IRApplyReReading,
|
||||
|
||||
@@ -578,13 +575,13 @@ namespace IRaCIS.Core.Application.Service
|
||||
IsApplyHeavyReading = true,
|
||||
FileName = inDto.FileName,
|
||||
ImagePath = JsonConvert.SerializeObject(inDto.FileList),
|
||||
DisagreeReason = inDto.DisagreeReason,
|
||||
DisagreeReason = inDto.DisagreeReason,
|
||||
});
|
||||
}
|
||||
|
||||
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview()
|
||||
{
|
||||
LatestReplyUserId=_userInfo.Id,
|
||||
LatestReplyUserId = _userInfo.Id,
|
||||
DoctorUserIdeaEnum = inDto.DoctorUserIdeaEnum,
|
||||
});
|
||||
ReadingMedicalReviewDialog dialog = new ReadingMedicalReviewDialog()
|
||||
@@ -592,10 +589,10 @@ namespace IRaCIS.Core.Application.Service
|
||||
TaskMedicalReviewId = inDto.TaskMedicalReviewId,
|
||||
UserTypeShortName = _userInfo.UserTypeShortName,
|
||||
Content = inDto.Content,
|
||||
ImagePath=JsonConvert.SerializeObject(inDto.FileList),
|
||||
ImagePath = JsonConvert.SerializeObject(inDto.FileList),
|
||||
UserTypeEnumInt = _userInfo.UserTypeEnumInt,
|
||||
VisitTaskId = visitTaskId,
|
||||
FileName=inDto.FileName,
|
||||
FileName = inDto.FileName,
|
||||
DisagreeReason = inDto.DisagreeReason,
|
||||
DoctorUserIdeaEnum = inDto.DoctorUserIdeaEnum,
|
||||
IsApplyHeavyReading = inDto.IsApplyHeavyReading,
|
||||
@@ -613,20 +610,22 @@ namespace IRaCIS.Core.Application.Service
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<(List<GetMedicalReviewDialogOutDto>,object)> GetMedicalReviewDialog(GetMedicalReviewDialogInDto inDto)
|
||||
public async Task<(List<GetMedicalReviewDialogOutDto>, object)> GetMedicalReviewDialog(GetMedicalReviewDialogInDto inDto)
|
||||
{
|
||||
var taskMedicalReview = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).FirstNotNullAsync();
|
||||
List<GetMedicalReviewDialogOutDto> result = await _readingMedicalReviewDialogRepository.Where(x => x.TaskMedicalReviewId == inDto.TaskMedicalReviewId)
|
||||
.ProjectTo<GetMedicalReviewDialogOutDto>(_mapper.ConfigurationProvider)
|
||||
.OrderBy(x => x.CreateTime).ToListAsync();
|
||||
result.ForEach(x => {
|
||||
result.ForEach(x =>
|
||||
{
|
||||
x.IsCurrentUser = x.CreateUserId == _userInfo.Id;
|
||||
});
|
||||
return (result,new {
|
||||
return (result, new
|
||||
{
|
||||
|
||||
IsIRReply= result.Any(x=>x.UserTypeEnumInt== (int)UserTypeEnum.IndependentReviewer),
|
||||
taskMedicalReview.IsClosedDialog,
|
||||
taskMedicalReview.IsHaveQuestion,
|
||||
IsIRReply = result.Any(x => x.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer),
|
||||
taskMedicalReview.IsClosedDialog,
|
||||
taskMedicalReview.IsHaveQuestion,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -653,13 +652,13 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
}).FirstNotNullAsync();
|
||||
|
||||
if (taskmedicalReview.SaveQuestionTime == null || taskmedicalReview.SaveConclusionTime==null)
|
||||
if (taskmedicalReview.SaveQuestionTime == null || taskmedicalReview.SaveConclusionTime == null)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["MedicalReview_NeedSave"]);
|
||||
|
||||
}
|
||||
|
||||
if (taskmedicalReview.IsHaveQuestion&&!taskmedicalReview.IsClosedDialog)
|
||||
if (taskmedicalReview.IsHaveQuestion && !taskmedicalReview.IsClosedDialog)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["MedicalReview_NotClosed"]);
|
||||
|
||||
@@ -668,7 +667,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview()
|
||||
{
|
||||
AuditState = MedicalReviewAuditState.HaveSigned,
|
||||
AuditSignTime=DateTime.Now,
|
||||
AuditSignTime = DateTime.Now,
|
||||
});
|
||||
|
||||
var result = await _taskMedicalReviewRepository.SaveChangesAsync();
|
||||
@@ -677,9 +676,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
if (medicalReviewInfo.IsAutoGenerate)
|
||||
{
|
||||
|
||||
var allMedicalAuditList= await _taskMedicalReviewRepository.Where(x => medicalReviewInfo.PDRelationTaskIdList.Contains(x.VisitTaskId) && x.IsAutoGenerate && x.IsInvalid==false).ToListAsync();
|
||||
var allMedicalAuditList = await _taskMedicalReviewRepository.Where(x => medicalReviewInfo.PDRelationTaskIdList.Contains(x.VisitTaskId) && x.IsAutoGenerate && x.IsInvalid == false).ToListAsync();
|
||||
|
||||
if (allMedicalAuditList.All(t => t.IsApplyHeavyReading == false && t.AuditSignTime!=null && t.AuditState == MedicalReviewAuditState.HaveSigned))
|
||||
if (allMedicalAuditList.All(t => t.IsApplyHeavyReading == false && t.AuditSignTime != null && t.AuditState == MedicalReviewAuditState.HaveSigned))
|
||||
{
|
||||
//自动发送
|
||||
await _trialEmailNoticeConfigService.BaseBusinessScenarioSendEmailAsync(medicalReviewInfo.VisitTaskId, false);
|
||||
@@ -721,7 +720,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
var visitTaskId = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).Select(x => x.VisitTaskId).FirstOrDefaultAsync();
|
||||
await _readingMedicalReviewDialogRepository.AddAsync(new ReadingMedicalReviewDialog()
|
||||
{
|
||||
|
||||
|
||||
TaskMedicalReviewId = inDto.TaskMedicalReviewId,
|
||||
UserTypeShortName = _userInfo.UserTypeShortName,
|
||||
DoctorUserIdeaEnum = inDto.DoctorUserIdeaEnum,
|
||||
@@ -746,54 +745,54 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
var list = await GetIRMedicalFeedbackList(new GetIRMedicalFeedbackListInDto()
|
||||
{
|
||||
TrialId=inDto.TrialId,
|
||||
TrialReadingCriterionId=inDto.TrialReadingCriterionId,
|
||||
PageIndex=1,
|
||||
AuditState= MedicalReviewAuditState.Auditing,
|
||||
PageSize =99999,
|
||||
TrialId = inDto.TrialId,
|
||||
TrialReadingCriterionId = inDto.TrialReadingCriterionId,
|
||||
PageIndex = 1,
|
||||
AuditState = MedicalReviewAuditState.Auditing,
|
||||
PageSize = 99999,
|
||||
});
|
||||
|
||||
var index = list.CurrentPageData.ToList().FindIndex(x => x.Id == inDto.TaskMedicalReviewId);
|
||||
var index = list.CurrentPageData.ToList().FindIndex(x => x.Id == inDto.TaskMedicalReviewId);
|
||||
|
||||
var result = new GetIRMedicalFeedbackListOutDto() { };
|
||||
var result = new GetIRMedicalFeedbackListOutDto() { };
|
||||
|
||||
if (index + 1 == list.CurrentPageData.Count()) // 最后一个
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["MedicalReview_IRFinish"]);
|
||||
}
|
||||
else if (index == -1 || list.CurrentPageData.Count == 1) // 第一个或者只有一个
|
||||
{
|
||||
if (list.CurrentPageData[0].Id == inDto.TaskMedicalReviewId)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["MedicalReview_IRFinish"]);
|
||||
}
|
||||
result = list.CurrentPageData[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
result = list.CurrentPageData.Skip(index + 1).Take(1).First();
|
||||
if (index + 1 == list.CurrentPageData.Count()) // 最后一个
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["MedicalReview_IRFinish"]);
|
||||
}
|
||||
else if (index == -1 || list.CurrentPageData.Count == 1) // 第一个或者只有一个
|
||||
{
|
||||
if (list.CurrentPageData[0].Id == inDto.TaskMedicalReviewId)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["MedicalReview_IRFinish"]);
|
||||
}
|
||||
result = list.CurrentPageData[0];
|
||||
}
|
||||
else
|
||||
{
|
||||
result = list.CurrentPageData.Skip(index + 1).Take(1).First();
|
||||
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取IR医学审核信息
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
/// <summary>
|
||||
/// 获取IR医学审核信息
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<GetIRMedicalFeedbackListOutDto>> GetIRMedicalFeedbackList(GetIRMedicalFeedbackListInDto inDto)
|
||||
{
|
||||
var taskMedicalReviewquery = _taskMedicalReviewRepository.Where(x => x.TrialId == inDto.TrialId).Include(x => x.VisitTask)
|
||||
.Where(x => x.VisitTask.DoctorUserId == _userInfo.Id)
|
||||
.Where(x => x.IsHaveQuestion)
|
||||
.WhereIf(!inDto.TaskBlindName.IsNullOrEmpty(), x => x.VisitTask.TaskBlindName == inDto.TaskBlindName)
|
||||
.WhereIf(inDto.SubjectId != null, x => x.VisitTask.SubjectId == inDto.SubjectId!)
|
||||
.WhereIf(inDto.IsUrgent != null, x => x.VisitTask.IsUrgent == inDto.IsUrgent!)
|
||||
.WhereIf(inDto.SubjectId != null, x => x.VisitTask.SubjectId == inDto.SubjectId!)
|
||||
.WhereIf(inDto.IsUrgent != null, x => x.VisitTask.IsUrgent == inDto.IsUrgent!)
|
||||
.WhereIf(inDto.AuditState != null, x => x.AuditState == inDto.AuditState!)
|
||||
.WhereIf(inDto.IsNotHaveSigned, x => x.AuditState != MedicalReviewAuditState.HaveSigned)
|
||||
.WhereIf(inDto.ReadingCategory != null, x => x.VisitTask.ReadingCategory == inDto.ReadingCategory!)
|
||||
.WhereIf(inDto.IsNotHaveSigned, x => x.AuditState != MedicalReviewAuditState.HaveSigned)
|
||||
.WhereIf(inDto.ReadingCategory != null, x => x.VisitTask.ReadingCategory == inDto.ReadingCategory!)
|
||||
.WhereIf(inDto.AuditAdviceEnum != null, x => x.AuditAdviceEnum == inDto.AuditAdviceEnum!)
|
||||
.WhereIf(inDto.DoctorUserIdeaEnum != null, x => x.DoctorUserIdeaEnum == inDto.DoctorUserIdeaEnum!)
|
||||
.WhereIf(inDto.IsClosedDialog != null, x => x.IsClosedDialog == inDto.IsClosedDialog!)
|
||||
@@ -803,9 +802,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.VisitTask.TrialReadingCriterionId == inDto.TrialReadingCriterionId!)
|
||||
.Select(x => new GetIRMedicalFeedbackListOutDto
|
||||
{
|
||||
TaskState=x.VisitTask.TaskState,
|
||||
TaskState = x.VisitTask.TaskState,
|
||||
Id = x.Id,
|
||||
VisitTaskId=x.VisitTaskId,
|
||||
VisitTaskId = x.VisitTaskId,
|
||||
IsUrgent = x.VisitTask.IsUrgent,
|
||||
AuditState = x.AuditState,
|
||||
SubjectCode = x.VisitTask.BlindSubjectCode == string.Empty ? x.VisitTask.Subject.Code : x.VisitTask.BlindSubjectCode,
|
||||
@@ -815,16 +814,16 @@ namespace IRaCIS.Core.Application.Service
|
||||
LastReplyTime = x.ReadingMedicalReviewDialogList.Max(x => x.CreateTime),
|
||||
AuditAdviceEnum = x.AuditAdviceEnum,
|
||||
DoctorUserIdeaEnum = x.DoctorUserIdeaEnum,
|
||||
SaveConclusionTime=x.SaveConclusionTime,
|
||||
IsClosedDialog=x.IsClosedDialog,
|
||||
IsHaveQuestion=x.IsHaveQuestion,
|
||||
MedicalDialogCloseEnum=x.MedicalDialogCloseEnum,
|
||||
IsInvalid=x.IsInvalid,
|
||||
SaveConclusionTime = x.SaveConclusionTime,
|
||||
IsClosedDialog = x.IsClosedDialog,
|
||||
IsHaveQuestion = x.IsHaveQuestion,
|
||||
MedicalDialogCloseEnum = x.MedicalDialogCloseEnum,
|
||||
IsInvalid = x.IsInvalid,
|
||||
|
||||
SubjectId=x.VisitTask.SubjectId,
|
||||
SubjectId = x.VisitTask.SubjectId,
|
||||
TrialReadingCriterionId = x.VisitTask.TrialReadingCriterion.Id,
|
||||
TrialReadingCriterionName =x.VisitTask.TrialReadingCriterion.CriterionName,
|
||||
ReadingTool= x.VisitTask.TrialReadingCriterion.ReadingTool,
|
||||
TrialReadingCriterionName = x.VisitTask.TrialReadingCriterion.CriterionName,
|
||||
ReadingTool = x.VisitTask.TrialReadingCriterion.ReadingTool,
|
||||
|
||||
IsReadingTaskViewInOrder = x.VisitTask.TrialReadingCriterion.IsReadingTaskViewInOrder,
|
||||
IsReadingShowSubjectInfo = x.VisitTask.TrialReadingCriterion.IsReadingShowSubjectInfo,
|
||||
@@ -835,9 +834,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
}).WhereIf(!inDto.SubjectCode.IsNullOrEmpty(), x => x.SubjectCode == inDto.SubjectCode);
|
||||
|
||||
var result=await taskMedicalReviewquery.ToPagedListAsync(inDto, nameof(GetIRMedicalFeedbackListOutDto.AuditState));
|
||||
var result = await taskMedicalReviewquery.ToPagedListAsync(inDto, nameof(GetIRMedicalFeedbackListOutDto.AuditState));
|
||||
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+531
-531
File diff suppressed because it is too large
Load Diff
@@ -4,14 +4,12 @@
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using MassTransit;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
@@ -30,7 +28,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystemRepository) : BaseService, IOrganInfoService
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#region 系统器官
|
||||
@@ -53,8 +51,8 @@ namespace IRaCIS.Core.Application.Service
|
||||
.Where(x => x.SystemCriterionId == inQuery.SystemCriterionId)
|
||||
.WhereIf(inQuery.LesionType != null, x => organs.Contains(x.OrganType))
|
||||
.WhereIf(inQuery.OrganType != null, x => x.OrganType == inQuery.OrganType)
|
||||
.OrderBy(x=>x.OrganType)
|
||||
.ThenBy(x=>x.ShowOrder)
|
||||
.OrderBy(x => x.OrganType)
|
||||
.ThenBy(x => x.ShowOrder)
|
||||
.ProjectTo<OrganInfoView>(_mapper.ConfigurationProvider);
|
||||
return await organInfoQueryable.ToListAsync();
|
||||
}
|
||||
@@ -80,14 +78,14 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
var organInfoQueryable = _organInfoRepository
|
||||
.Where(x => x.SystemCriterionId == inQuery.SystemCriterionId)
|
||||
.WhereIf(!inQuery.Part.IsNullOrEmpty() , x => x.Part.Contains(inQuery.Part))
|
||||
.WhereIf(!inQuery.Part.IsNullOrEmpty(), x => x.Part.Contains(inQuery.Part))
|
||||
.WhereIf(!inQuery.TULOC.IsNullOrEmpty(), x => x.TULOC.Contains(inQuery.TULOC))
|
||||
.WhereIf(!inQuery.TULAT.IsNullOrEmpty(), x => x.TULAT.Contains(inQuery.TULAT))
|
||||
.WhereIf(inQuery.LesionType != null, x => organs.Contains(x.OrganType))
|
||||
.WhereIf(inQuery.OrganType != null, x => x.OrganType == inQuery.OrganType)
|
||||
.ProjectTo<OrganInfoView>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await organInfoQueryable.ToPagedListAsync(inQuery,new string[] { nameof(OrganInfoView.OrganType) , nameof(OrganInfoView.ShowOrder) });
|
||||
return await organInfoQueryable.ToPagedListAsync(inQuery, new string[] { nameof(OrganInfoView.OrganType), nameof(OrganInfoView.ShowOrder) });
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -125,26 +123,26 @@ namespace IRaCIS.Core.Application.Service
|
||||
[HttpPost]
|
||||
public async Task<List<GetReadingOrganListOutDto>> GetReadingOrganList(GetReadingOrganListInDto inDto)
|
||||
{
|
||||
var trialReadingCriterionId = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||
var trialReadingCriterionId = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||
|
||||
var isEn = _userInfo.IsEn_Us;
|
||||
|
||||
var organInfoQueryable = from data in _organInfoRepository.AsQueryable()
|
||||
|
||||
join trialData in _organTrialInfoRepository.AsQueryable().Where( x => x.IsEnable&&x.TrialCriterionId== trialReadingCriterionId)
|
||||
|
||||
join trialData in _organTrialInfoRepository.AsQueryable().Where(x => x.IsEnable && x.TrialCriterionId == trialReadingCriterionId)
|
||||
on data.Id equals trialData.OrganInfoId
|
||||
join criterionNidus in _criterionNidusTrialRepository.AsQueryable().Where(x=>x.CriterionId== trialReadingCriterionId)
|
||||
join criterionNidus in _criterionNidusTrialRepository.AsQueryable().Where(x => x.CriterionId == trialReadingCriterionId)
|
||||
on data.OrganType equals criterionNidus.OrganType
|
||||
select new ReadingOrganDto()
|
||||
{
|
||||
Id = trialData.Id,
|
||||
OrganInfoId= data.Id,
|
||||
Part =isEn?data.PartEN: data.Part,
|
||||
TULAT =isEn?data.TULATEN: data.TULAT,
|
||||
ShowOrder=data.ShowOrder,
|
||||
Classification= isEn? data.ClassificationEN:data.Classification,
|
||||
ClassificationEN=data.ClassificationEN,
|
||||
TULOC =isEn?data.TULOCEN: data.TULOC,
|
||||
OrganInfoId = data.Id,
|
||||
Part = isEn ? data.PartEN : data.Part,
|
||||
TULAT = isEn ? data.TULATEN : data.TULAT,
|
||||
ShowOrder = data.ShowOrder,
|
||||
Classification = isEn ? data.ClassificationEN : data.Classification,
|
||||
ClassificationEN = data.ClassificationEN,
|
||||
TULOC = isEn ? data.TULOCEN : data.TULOC,
|
||||
Remark = data.Remark,
|
||||
IsLymphNodes = data.IsLymphNodes,
|
||||
IsCanEditPosition = data.IsCanEditPosition,
|
||||
@@ -153,7 +151,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
PartEN = data.PartEN,
|
||||
TULATEN = data.TULATEN,
|
||||
TULOCEN = data.TULOCEN,
|
||||
LesionType= criterionNidus.LesionType
|
||||
LesionType = criterionNidus.LesionType
|
||||
};
|
||||
|
||||
var organList = await organInfoQueryable.ToListAsync();
|
||||
@@ -161,7 +159,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
List<GetReadingOrganListOutDto> result = organList.GroupBy(x => new { x.LesionType }).Select(x => new GetReadingOrganListOutDto()
|
||||
{
|
||||
LesionType = x.Key.LesionType,
|
||||
OrganList = x.OrderBy(y=>y.ShowOrder).ToList()
|
||||
OrganList = x.OrderBy(y => y.ShowOrder).ToList()
|
||||
}).ToList();
|
||||
|
||||
return result;
|
||||
@@ -198,9 +196,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
.WhereIf(inDto.OrganType != null, x => x.OrganType == inDto.OrganType)
|
||||
.WhereIf(inDto.IsLymphNodes != null, x => x.IsLymphNodes == inDto.IsLymphNodes)
|
||||
.WhereIf(inDto.LesionType != null, x => organs.Contains(x.OrganType))
|
||||
.WhereIf(!inDto.Part.IsNullOrEmpty(), x => x.Part.Contains(inDto.Part)||x.PartEN.Contains(inDto.Part))
|
||||
.WhereIf(!inDto.TULOC.IsNullOrEmpty(), x => x.TULOC.Contains(inDto.TULOC)|| x.TULOCEN.Contains(inDto.TULOC))
|
||||
.WhereIf(!inDto.TULAT.IsNullOrEmpty(), x => x.TULAT.Contains(inDto.TULAT)||x.TULATEN.Contains(inDto.TULAT))
|
||||
.WhereIf(!inDto.Part.IsNullOrEmpty(), x => x.Part.Contains(inDto.Part) || x.PartEN.Contains(inDto.Part))
|
||||
.WhereIf(!inDto.TULOC.IsNullOrEmpty(), x => x.TULOC.Contains(inDto.TULOC) || x.TULOCEN.Contains(inDto.TULOC))
|
||||
.WhereIf(!inDto.TULAT.IsNullOrEmpty(), x => x.TULAT.Contains(inDto.TULAT) || x.TULATEN.Contains(inDto.TULAT))
|
||||
join trialData in _organTrialInfoRepository.WhereIf(inDto.IsEnable != null, x => x.IsEnable == inDto.IsEnable)
|
||||
|
||||
.WhereIf(inDto.IsEnable != null, x => x.IsEnable == inDto.IsEnable)
|
||||
@@ -213,9 +211,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
TULAT = data.TULAT,
|
||||
TULOC = data.TULOC,
|
||||
Remark = data.Remark,
|
||||
ShowOrder=data.ShowOrder,
|
||||
Classification=data.Classification,
|
||||
ClassificationEN=data.ClassificationEN,
|
||||
ShowOrder = data.ShowOrder,
|
||||
Classification = data.Classification,
|
||||
ClassificationEN = data.ClassificationEN,
|
||||
IsLymphNodes = data.IsLymphNodes,
|
||||
IsCanEditPosition = data.IsCanEditPosition,
|
||||
IsEnable = trialData.IsEnable,
|
||||
@@ -226,7 +224,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
};
|
||||
|
||||
|
||||
return await organInfoQueryable.OrderBy(x=>x.OrganType).ThenBy(x=>x.ShowOrder).ToListAsync();
|
||||
return await organInfoQueryable.OrderBy(x => x.OrganType).ThenBy(x => x.ShowOrder).ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
@@ -308,9 +306,9 @@ namespace IRaCIS.Core.Application.Service
|
||||
}
|
||||
else
|
||||
{
|
||||
dicNums = await _criterionNidusRepository.Where(x => x.CriterionId == inDto.SystemCriterionId).Select(x => ((int)x.LesionType).ToString()).Distinct().ToListAsync();
|
||||
}
|
||||
|
||||
dicNums = await _criterionNidusRepository.Where(x => x.CriterionId == inDto.SystemCriterionId).Select(x => ((int)x.LesionType).ToString()).Distinct().ToListAsync();
|
||||
}
|
||||
|
||||
var dictionaryId = await _dictionaryRepository.Where(x => x.Code == "LesionType").Select(x => x.Id).FirstOrDefaultAsync();
|
||||
|
||||
var result = await _dictionaryRepository.Where(x => x.ParentId == dictionaryId && dicNums.Contains(x.Code)).ProjectTo<OrganDictionary>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
@@ -329,17 +327,17 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
if (await _readingQuestionCriterionSystemRepository.AnyAsync(x => x.Id == inQuery.CriterionId))
|
||||
{
|
||||
return await _criterionNidusRepository
|
||||
return await _criterionNidusRepository
|
||||
.Where(x => x.CriterionId == inQuery.CriterionId)
|
||||
.ProjectTo<CriterionNidusView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return await _criterionNidusTrialRepository
|
||||
.Where(x => x.CriterionId == inQuery.CriterionId)
|
||||
.ProjectTo<CriterionNidusView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
|
||||
return await _criterionNidusTrialRepository
|
||||
.Where(x => x.CriterionId == inQuery.CriterionId)
|
||||
.ProjectTo<CriterionNidusView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -384,7 +382,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SynchronizeSystemOrgan(SynchronizeSystemOrganInDto inDto)
|
||||
{
|
||||
var organList= await _organInfoRepository.Where(x => x.SystemCriterionId == inDto.FromCriterionId).ToListAsync();
|
||||
var organList = await _organInfoRepository.Where(x => x.SystemCriterionId == inDto.FromCriterionId).ToListAsync();
|
||||
|
||||
organList.ForEach(x =>
|
||||
{
|
||||
@@ -411,7 +409,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
public async Task<IResponseOutput> SynchronizeSystemOrganToTrial(SynchronizeSystemOrganToTrialInDto inDto)
|
||||
{
|
||||
// 选中的标准进行修改
|
||||
var readingQuestionCriterionTrial = await _readingQuestionCriterionTrial.Where(x => x.Id==inDto.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||
var readingQuestionCriterionTrial = await _readingQuestionCriterionTrial.Where(x => x.Id == inDto.TrialReadingCriterionId).FirstOrDefaultAsync();
|
||||
|
||||
if (readingQuestionCriterionTrial != null)
|
||||
{
|
||||
@@ -423,52 +421,52 @@ namespace IRaCIS.Core.Application.Service
|
||||
inDto.SystemCriterionId = readingQuestionCriterionTrial.ReadingQuestionCriterionSystemId;
|
||||
}
|
||||
await _criterionNidusTrialRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == trialCriterionId);
|
||||
|
||||
|
||||
List<CriterionNidusTrial> criterionNidusList = await _criterionNidusRepository.Where(x => x.CriterionId == inDto.SystemCriterionId).Select(x => new CriterionNidusTrial()
|
||||
|
||||
List<CriterionNidusTrial> criterionNidusList = await _criterionNidusRepository.Where(x => x.CriterionId == inDto.SystemCriterionId).Select(x => new CriterionNidusTrial()
|
||||
{
|
||||
Id = x.Id,
|
||||
CriterionId = trialCriterionId,
|
||||
LesionType = x.LesionType,
|
||||
|
||||
OrganType=x.OrganType,
|
||||
|
||||
|
||||
OrganType = x.OrganType,
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
criterionNidusList.ForEach(x => x.Id = NewId.NextGuid());
|
||||
|
||||
await _criterionNidusTrialRepository.AddRangeAsync(criterionNidusList);
|
||||
await _organTrialInfoRepository.BatchDeleteNoTrackingAsync(x => x.TrialCriterionId == readingQuestionCriterionTrial.Id);
|
||||
List<OrganTrialInfo> organTrialInfoList = await _organInfoRepository.Where(x =>x.SystemCriterionId== inDto.SystemCriterionId).Select(x => new OrganTrialInfo()
|
||||
List<OrganTrialInfo> organTrialInfoList = await _organInfoRepository.Where(x => x.SystemCriterionId == inDto.SystemCriterionId).Select(x => new OrganTrialInfo()
|
||||
{
|
||||
//OrganType=x.OrganType,
|
||||
Id = x.Id,
|
||||
IsEnable = true,
|
||||
TrialCriterionId= readingQuestionCriterionTrial.Id,
|
||||
TrialCriterionId = readingQuestionCriterionTrial.Id,
|
||||
OrganInfoId = x.Id,
|
||||
TrialId = readingQuestionCriterionTrial.TrialId,
|
||||
TULAT=x.TULAT,
|
||||
Classification=x.Classification,
|
||||
ClassificationEN=x.ClassificationEN,
|
||||
IsCanEditPosition=x.IsCanEditPosition,
|
||||
Part=x.Part,
|
||||
IsLymphNodes=x.IsLymphNodes,
|
||||
PartEN=x.PartEN,
|
||||
ShowOrder=x.ShowOrder,
|
||||
TULATEN=x.TULATEN,
|
||||
TULOC=x.TULOC,
|
||||
TULOCEN=x.TULOCEN,
|
||||
OrganType=x.OrganType,
|
||||
|
||||
TULAT = x.TULAT,
|
||||
Classification = x.Classification,
|
||||
ClassificationEN = x.ClassificationEN,
|
||||
IsCanEditPosition = x.IsCanEditPosition,
|
||||
Part = x.Part,
|
||||
IsLymphNodes = x.IsLymphNodes,
|
||||
PartEN = x.PartEN,
|
||||
ShowOrder = x.ShowOrder,
|
||||
TULATEN = x.TULATEN,
|
||||
TULOC = x.TULOC,
|
||||
TULOCEN = x.TULOCEN,
|
||||
OrganType = x.OrganType,
|
||||
|
||||
}).ToListAsync();
|
||||
|
||||
organTrialInfoList.ForEach(x => x.Id = NewId.NextGuid());
|
||||
await _organTrialInfoRepository.AddRangeAsync(organTrialInfoList);
|
||||
|
||||
|
||||
await _organTrialInfoRepository.SaveChangesAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
|
||||
|
||||
+36
-35
@@ -1,12 +1,11 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using MassTransit;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Application.Interfaces;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.RC
|
||||
{
|
||||
@@ -29,7 +28,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
IRepository<ReadingTableQuestionTrial> _readingTableQuestionTrialRepository) : BaseService
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -40,7 +39,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> DeleteSystemCriterionDictionary(DeleteSystemCriterionDictionaryIndto inDto)
|
||||
{
|
||||
var criterionDictionaryCode= await _systemCriterionDictionaryCodeRepository.Where(x => x.Id == inDto.Id).FirstNotNullAsync();
|
||||
var criterionDictionaryCode = await _systemCriterionDictionaryCodeRepository.Where(x => x.Id == inDto.Id).FirstNotNullAsync();
|
||||
|
||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.ParentCode == criterionDictionaryCode.Code && x.CriterionId == criterionDictionaryCode.SystemCriterionId);
|
||||
|
||||
@@ -66,7 +65,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
|
||||
await _systemCriterionDictionaryCodeRepository.BatchDeleteNoTrackingAsync(x => x.SystemCriterionId == inDto.SystemCriterionId);
|
||||
|
||||
await _systemCriterionDictionaryCodeRepository.AddRangeAsync(inDto.CodeList.Select(x=> new SystemCriterionDictionaryCode()
|
||||
await _systemCriterionDictionaryCodeRepository.AddRangeAsync(inDto.CodeList.Select(x => new SystemCriterionDictionaryCode()
|
||||
{
|
||||
SystemCriterionId = inDto.SystemCriterionId,
|
||||
Code = x
|
||||
@@ -89,8 +88,8 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
{
|
||||
SynchronizeOriginalTime = null,
|
||||
SynchronizeTime = DateTime.Now.AddYears(-20),
|
||||
IsSigned=false,
|
||||
ReadingInfoSignTime=null,
|
||||
IsSigned = false,
|
||||
ReadingInfoSignTime = null,
|
||||
|
||||
});
|
||||
|
||||
@@ -99,12 +98,12 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设置系统全局阅片阅片信息
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
/// <summary>
|
||||
/// 设置系统全局阅片阅片信息
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
[UnitOfWork]
|
||||
public async Task<IResponseOutput> SetSystemGlobalInfo(SetSystemGlobalInfoInDto inDto)
|
||||
{
|
||||
@@ -112,13 +111,13 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.SystemCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.GlobalAssess);
|
||||
|
||||
await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.DictionaryList.Select(x => new ReadingSystemCriterionDictionary
|
||||
{
|
||||
{
|
||||
CriterionId = inDto.SystemCriterionId,
|
||||
DictionaryId = x.DictionaryId,
|
||||
IsSystemCriterion = true,
|
||||
ParentCode = ReadingCommon.CriterionDictionary.GlobalAssess,
|
||||
IsBaseLineUse=x.IsBaseLineUse,
|
||||
IsFollowVisitUse=x.IsFollowVisitUse,
|
||||
IsBaseLineUse = x.IsBaseLineUse,
|
||||
IsFollowVisitUse = x.IsFollowVisitUse,
|
||||
}));
|
||||
|
||||
await _readingQuestionCriterionSystemRepository.UpdatePartialFromQueryAsync(inDto.SystemCriterionId, x => new ReadingQuestionCriterionSystem()
|
||||
@@ -160,7 +159,8 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
public async Task<GetSystemOncologyInfoOutDto> GetSystemOncologyInfo(GetSystemOncologyInfoInDto inDto)
|
||||
{
|
||||
|
||||
GetSystemOncologyInfoOutDto result = new GetSystemOncologyInfoOutDto() {
|
||||
GetSystemOncologyInfoOutDto result = new GetSystemOncologyInfoOutDto()
|
||||
{
|
||||
IsOncologyReading = await _readingQuestionCriterionSystemRepository.Where(x => x.Id == inDto.SystemCriterionId).Select(x => x.IsOncologyReading).FirstOrDefaultAsync(),
|
||||
DictionaryList = await _readingCriterionDictionaryRepository.AsQueryable().Where(x => x.CriterionId == inDto.SystemCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.OncologyAssess)
|
||||
.ProjectTo<CriterionDictionaryInfo>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync()
|
||||
@@ -183,7 +183,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
await _readingCriterionDictionaryRepository.BatchDeleteNoTrackingAsync(x => x.CriterionId == inDto.SystemCriterionId && x.ParentCode == ReadingCommon.CriterionDictionary.OncologyAssess);
|
||||
|
||||
await _readingCriterionDictionaryRepository.AddRangeAsync(inDto.DictionaryIds.Select(x => new ReadingSystemCriterionDictionary
|
||||
{
|
||||
{
|
||||
CriterionId = inDto.SystemCriterionId,
|
||||
DictionaryId = x,
|
||||
IsSystemCriterion = true,
|
||||
@@ -312,7 +312,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
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(_localizer["ReadingCriterion_InUse"]);
|
||||
}
|
||||
}
|
||||
@@ -558,13 +558,13 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
}
|
||||
else
|
||||
{
|
||||
return await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialCriterionId
|
||||
)
|
||||
.WhereIf(!inDto.ParentCode.IsNullOrEmpty(), x => x.ParentCode == inDto.ParentCode)
|
||||
.ProjectTo<CriterionDictionaryInfo>(_mapper.ConfigurationProvider).OrderBy(x => x.ParentCode).ThenBy(x => x.ShowOrder).ToListAsync();
|
||||
}
|
||||
return await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == inDto.TrialCriterionId
|
||||
)
|
||||
.WhereIf(!inDto.ParentCode.IsNullOrEmpty(), x => x.ParentCode == inDto.ParentCode)
|
||||
.ProjectTo<CriterionDictionaryInfo>(_mapper.ConfigurationProvider).OrderBy(x => x.ParentCode).ThenBy(x => x.ShowOrder).ToListAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -576,8 +576,9 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
[HttpPost]
|
||||
public async Task<bool> EditCriterionDictionary(EditCriterionDictionaryInDto inDto)
|
||||
{
|
||||
await _readingCriterionDictionaryRepository.UpdatePartialFromQueryAsync(inDto.Id,x=>new ReadingSystemCriterionDictionary() {
|
||||
CrterionDictionaryGroup=inDto.CrterionDictionaryGroup
|
||||
await _readingCriterionDictionaryRepository.UpdatePartialFromQueryAsync(inDto.Id, x => new ReadingSystemCriterionDictionary()
|
||||
{
|
||||
CrterionDictionaryGroup = inDto.CrterionDictionaryGroup
|
||||
});
|
||||
|
||||
return await _readingCriterionDictionaryRepository.SaveChangesAsync();
|
||||
@@ -601,7 +602,7 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
IsSystemCriterion = true,
|
||||
ParentCode = inDto.ParentCode
|
||||
}));
|
||||
|
||||
|
||||
|
||||
await _readingCriterionDictionaryRepository.SaveChangesAsync();
|
||||
|
||||
@@ -656,8 +657,8 @@ namespace IRaCIS.Core.Application.Service.RC
|
||||
x.TrialId = trialId;
|
||||
x.ReadingQuestionCriterionSystemId = x.Id;
|
||||
x.Id = NewId.NextGuid();
|
||||
|
||||
x.IsAutoCreate=x.CriterionType==CriterionType.RECIST1Pointt1_MB?false:true;
|
||||
|
||||
x.IsAutoCreate = x.CriterionType == CriterionType.RECIST1Pointt1_MB ? false : true;
|
||||
// 同步问题暂时注释
|
||||
//List<ReadingQuestionTrial> readingQuestionTrialList = new List<ReadingQuestionTrial>();
|
||||
//SetChildParentQuestion(criterion.Id, trialId, systemQuestionList, readingQuestionTrialList);
|
||||
|
||||
+78
-77
@@ -1,15 +1,14 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using MassTransit;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
/// <summary>
|
||||
/// 阅片问题.标准
|
||||
@@ -51,7 +50,7 @@ namespace IRaCIS.Application.Services
|
||||
//}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -59,7 +58,7 @@ namespace IRaCIS.Application.Services
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<(GetReadingTableQuestionOutDto,bool)> GetCustomTableQuestionPreview(GetCustomQuestionPreviewInDto inDto)
|
||||
public async Task<(GetReadingTableQuestionOutDto, bool)> GetCustomTableQuestionPreview(GetCustomQuestionPreviewInDto inDto)
|
||||
{
|
||||
List<ReadingTableQuestionAnswerInfo> tableAnswers = new List<ReadingTableQuestionAnswerInfo>();
|
||||
List<TableAnsweRowInfo> tableAnsweRowInfos = new List<TableAnsweRowInfo>();
|
||||
@@ -71,7 +70,7 @@ namespace IRaCIS.Application.Services
|
||||
TableAnswers = tableAnswers,
|
||||
TableAnsweRowInfos = tableAnsweRowInfos,
|
||||
IsGetallQuestion = true,
|
||||
IsGetPreview=true
|
||||
IsGetPreview = true
|
||||
}
|
||||
|
||||
), true);
|
||||
@@ -92,13 +91,14 @@ namespace IRaCIS.Application.Services
|
||||
[HttpPost]
|
||||
public async Task<List<GetCalculateQuestionsOutDto>> GetCalculateQuestions(GetCalculateQuestionsInDto inDto)
|
||||
{
|
||||
var result =await _readingQuestionTrialRepository
|
||||
var result = await _readingQuestionTrialRepository
|
||||
|
||||
.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialCriterionId)
|
||||
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type == inDto.Type)
|
||||
.OrderBy(x => x.ShowOrder)
|
||||
.Select(x => new GetCalculateQuestionsOutDto
|
||||
(){
|
||||
()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us)
|
||||
|
||||
@@ -107,9 +107,9 @@ namespace IRaCIS.Application.Services
|
||||
var tablequestion = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == inDto.TrialCriterionId && x.Type == "number").Select(x =>
|
||||
new
|
||||
{
|
||||
QuestionId= x.Id,
|
||||
QuestionId = x.Id,
|
||||
x.ReadingQuestionId,
|
||||
QuestionName=x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us)
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us)
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
@@ -154,7 +154,7 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
@@ -169,12 +169,13 @@ namespace IRaCIS.Application.Services
|
||||
[HttpPost]
|
||||
public async Task<List<GetTrialGroupNameOutDto>> GetSystemGroupNameList(GetTrialGroupNameListInDto inDto)
|
||||
{
|
||||
var result = await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.CriterionId && x.Type == ReadingQestionType.Group).OrderBy(t=>t.ShowOrder)
|
||||
.Select(x => new GetTrialGroupNameOutDto() {
|
||||
GroupId=x.Id,
|
||||
GroupName=x.GroupName,
|
||||
|
||||
} ).ToListAsync();
|
||||
var result = await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.CriterionId && x.Type == ReadingQestionType.Group).OrderBy(t => t.ShowOrder)
|
||||
.Select(x => new GetTrialGroupNameOutDto()
|
||||
{
|
||||
GroupId = x.Id,
|
||||
GroupName = x.GroupName,
|
||||
|
||||
}).ToListAsync();
|
||||
return result;
|
||||
|
||||
}
|
||||
@@ -212,12 +213,12 @@ namespace IRaCIS.Application.Services
|
||||
.Select(x => new CriterionOtherQuestionOutDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
DictionaryCode=x.DictionaryCode,
|
||||
QuestionGenre=x.QuestionGenre,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName,_userInfo.IsEn_Us),
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
TypeValue = x.TypeValue,
|
||||
GroupName = x.GroupName,
|
||||
GroupId=x.GroupId,
|
||||
GroupId = x.GroupId,
|
||||
}).ToListAsync();
|
||||
|
||||
return questionList;
|
||||
@@ -233,7 +234,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList);
|
||||
indto.RelevanceValue = string.Join(',', indto.RelevanceValueList);
|
||||
indto.HighlightAnswer=JsonConvert.SerializeObject(indto.HighlightAnswerList);
|
||||
indto.HighlightAnswer = JsonConvert.SerializeObject(indto.HighlightAnswerList);
|
||||
if (indto.Id != null)
|
||||
{
|
||||
var trialIdList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionSystemId == indto.Id && x.IsJudgeQuestion && x.JudgeType != JudgeTypeEnum.None)
|
||||
@@ -270,12 +271,12 @@ namespace IRaCIS.Application.Services
|
||||
return ResponseOutput.NotOk(_localizer["ReadingQuestion_ChildrenExist"]);
|
||||
}
|
||||
|
||||
if (await _readingQuestionSystemRepository.AnyAsync(x => x.GroupId == id))
|
||||
{
|
||||
if (await _readingQuestionSystemRepository.AnyAsync(x => x.GroupId == id))
|
||||
{
|
||||
//---此分组已被引用,请先删除被引用的问题
|
||||
return ResponseOutput.NotOk(_localizer["ReadingQuestion_GroupReferenced"]);
|
||||
}
|
||||
await _readingQuestionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
return ResponseOutput.NotOk(_localizer["ReadingQuestion_GroupReferenced"]);
|
||||
}
|
||||
await _readingQuestionSystemRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
var success = await _readingQuestionSystemRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
@@ -319,8 +320,8 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
.Select(x => new CriterionOtherQuestionOutDto()
|
||||
{
|
||||
DictionaryCode=x.DictionaryCode,
|
||||
QuestionGenre=x.TableQuestionType,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
QuestionGenre = x.TableQuestionType,
|
||||
QuestionId = x.Id,
|
||||
QuestionName = x.QuestionName,
|
||||
TypeValue = x.TypeValue,
|
||||
@@ -380,7 +381,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (await _readingQuestionTrialRepository.AnyAsync(x => x.Id == indto.Id && x.IsJudgeQuestion && x.JudgeType != JudgeTypeEnum.None))
|
||||
{
|
||||
//---当前问题已经设置了裁判标准了,修改失败
|
||||
//---当前问题已经设置了裁判标准了,修改失败
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_JudgmentSet"]);
|
||||
}
|
||||
}
|
||||
@@ -399,13 +400,13 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
indto.ParentTriggerValue = string.Join(',', indto.ParentTriggerValueList);
|
||||
indto.RelevanceValue = string.Join(',', indto.RelevanceValueList);
|
||||
indto.HighlightAnswer =JsonConvert.SerializeObject(indto.HighlightAnswerList);
|
||||
indto.HighlightAnswer = JsonConvert.SerializeObject(indto.HighlightAnswerList);
|
||||
|
||||
if (indto.Id != null)
|
||||
{
|
||||
var relationList = await GetQuestionCalculateRelation(new GetQuestionCalculateRelationInDto()
|
||||
{
|
||||
IsGetAll=true,
|
||||
IsGetAll = true,
|
||||
TrialReadingCriterionId = indto.ReadingQuestionCriterionTrialId,
|
||||
});
|
||||
|
||||
@@ -425,7 +426,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
relation.CalculateQuestionList = calculateInfoList;
|
||||
}
|
||||
|
||||
|
||||
this.VerifyCalculateRelation(relationList, indto.Id.Value, indto.Id.Value);
|
||||
}
|
||||
|
||||
@@ -442,7 +443,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
var query = _readingQuestionTrialRepository.AsQueryable()
|
||||
.Where(x => x.ReadingQuestionCriterionTrialId == inDto.ReadingQuestionCriterionTrialId)
|
||||
.WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName)||x.QuestionEnName.Contains(x.QuestionEnName))
|
||||
.WhereIf(!inDto.QuestionName.IsNullOrEmpty(), x => x.QuestionName.Contains(inDto.QuestionName) || x.QuestionEnName.Contains(x.QuestionEnName))
|
||||
.WhereIf(!inDto.Type.IsNullOrEmpty(), x => x.Type.Contains(inDto.Type))
|
||||
.Where(x => x.ReadingCriterionPageId == inDto.ReadingCriterionPageId)
|
||||
.ProjectTo<ReadingQuestionTrialView>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder);
|
||||
@@ -457,7 +458,7 @@ namespace IRaCIS.Application.Services
|
||||
/// <param name="originalId"></param>
|
||||
/// <param name="count"></param>
|
||||
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||
private void VerifyCalculateRelation(List<CalculateRelationDto> relationList,Guid QuestionId,Guid originalId,int count=1)
|
||||
private void VerifyCalculateRelation(List<CalculateRelationDto> relationList, Guid QuestionId, Guid originalId, int count = 1)
|
||||
{
|
||||
// 防止有脏数据 循环验证 最多10000次
|
||||
if (count >= 10000)
|
||||
@@ -466,7 +467,7 @@ namespace IRaCIS.Application.Services
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_CircularDependency"]);
|
||||
}
|
||||
|
||||
var relation = relationList.Where(x=>x.CalculateQuestionList.Any(y=>y.QuestionId== QuestionId||y.TableQuestionId==QuestionId)).ToList();
|
||||
var relation = relationList.Where(x => x.CalculateQuestionList.Any(y => y.QuestionId == QuestionId || y.TableQuestionId == QuestionId)).ToList();
|
||||
|
||||
if (relation.Select(x => x.QuestionId).ToList().Contains(originalId))
|
||||
{
|
||||
@@ -476,11 +477,11 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
else
|
||||
{
|
||||
|
||||
|
||||
relation.ForEach(x =>
|
||||
{
|
||||
|
||||
VerifyCalculateRelation(relationList, x.QuestionId, originalId,count++);
|
||||
VerifyCalculateRelation(relationList, x.QuestionId, originalId, count++);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -497,11 +498,11 @@ namespace IRaCIS.Application.Services
|
||||
if (inDto.TrialReadingCriterionId != null)
|
||||
{
|
||||
return await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialReadingCriterionId)
|
||||
.WhereIf(!inDto.IsGetAll,x=>x.DataSource== DataSources.Automatic&&x.Type== "number")
|
||||
.WhereIf(!inDto.IsGetAll, x => x.DataSource == DataSources.Automatic && x.Type == "number")
|
||||
.Select(x => new CalculateRelationDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
QuestionName= x.QuestionName,
|
||||
QuestionName = x.QuestionName,
|
||||
CustomCalculateMark = x.CustomCalculateMark,
|
||||
CalculateQuestionList = x.CalculateQuestionList,
|
||||
ValueType = x.ValueType,
|
||||
@@ -549,8 +550,8 @@ namespace IRaCIS.Application.Services
|
||||
.Select(x => new CriterionOtherQuestionOutDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
DictionaryCode=x.DictionaryCode,
|
||||
QuestionGenre=x.QuestionGenre,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
TypeValue = x.TypeValue,
|
||||
GroupName = x.GroupName,
|
||||
@@ -573,12 +574,12 @@ namespace IRaCIS.Application.Services
|
||||
return ResponseOutput.NotOk(_localizer["ReadingQuestion_ChildrenExist"]);
|
||||
}
|
||||
|
||||
if (await _readingQuestionTrialRepository.AnyAsync(x => x.GroupId == id))
|
||||
{
|
||||
if (await _readingQuestionTrialRepository.AnyAsync(x => x.GroupId == id))
|
||||
{
|
||||
//---此分组已被引用,请先删除被引用的问题
|
||||
return ResponseOutput.NotOk(_localizer["ReadingQuestion_GroupReferenced"]);
|
||||
}
|
||||
await _readingQuestionTrialRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
return ResponseOutput.NotOk(_localizer["ReadingQuestion_GroupReferenced"]);
|
||||
}
|
||||
await _readingQuestionTrialRepository.DeleteFromQueryAsync(t => t.Id == id);
|
||||
var success = await _readingQuestionTrialRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Result(success);
|
||||
}
|
||||
@@ -595,8 +596,8 @@ namespace IRaCIS.Application.Services
|
||||
.Where(x => x.ReadingCriterionPageId == inDto.ReadingCriterionPageId).OrderBy(t => t.ShowOrder)
|
||||
.Select(x => new GetTrialGroupNameOutDto
|
||||
{
|
||||
GroupId=x.Id,
|
||||
GroupName=x.GroupName,
|
||||
GroupId = x.Id,
|
||||
GroupName = x.GroupName,
|
||||
}).ToListAsync();
|
||||
|
||||
return result;
|
||||
@@ -614,7 +615,7 @@ namespace IRaCIS.Application.Services
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<(List<ReadingTableQuestionTrialView>,bool)> GetReadingTableQuestionTrialList(ReadingTableQuestionSystemQuery inDto)
|
||||
public async Task<(List<ReadingTableQuestionTrialView>, bool)> GetReadingTableQuestionTrialList(ReadingTableQuestionSystemQuery inDto)
|
||||
{
|
||||
|
||||
var readingTableQuestionSystemQueryable = _readingTableQuestionTrialRepository
|
||||
@@ -622,7 +623,7 @@ namespace IRaCIS.Application.Services
|
||||
.Where(x => x.ReadingQuestionId == inDto.ReadingQuestionId).ProjectTo<ReadingTableQuestionTrialView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var result = await readingTableQuestionSystemQueryable.OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
return (result,true);
|
||||
return (result, true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -645,7 +646,7 @@ namespace IRaCIS.Application.Services
|
||||
.Select(x => new CriterionOtherQuestionOutDto()
|
||||
{
|
||||
QuestionId = x.Id,
|
||||
QuestionGenre=x.TableQuestionType,
|
||||
QuestionGenre = x.TableQuestionType,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
TypeValue = x.TypeValue,
|
||||
@@ -667,7 +668,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
|
||||
var list = await _readingTableQuestionTrialRepository.Where(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder && x.ReadingQuestionId == indto.ReadingQuestionId).ToListAsync();
|
||||
if (await _readingTableQuestionTrialRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder && x.ReadingQuestionId==indto.ReadingQuestionId))
|
||||
if (await _readingTableQuestionTrialRepository.AnyAsync(x => x.Id != indto.Id && x.ShowOrder == indto.ShowOrder && x.ReadingQuestionId == indto.ReadingQuestionId))
|
||||
{
|
||||
//---问题编号重复
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingQuestion_IdDup"]);
|
||||
@@ -682,7 +683,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
IsGetAll = true,
|
||||
ReadingQuestionId = indto.ReadingQuestionId,
|
||||
}) ;
|
||||
});
|
||||
|
||||
var relation = relationList.FirstOrDefault(x => x.QuestionId == indto.Id);
|
||||
List<CalculateInfo> calculateInfoList = new List<CalculateInfo>();
|
||||
@@ -700,10 +701,10 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
relation.CalculateQuestionList = calculateInfoList;
|
||||
}
|
||||
|
||||
|
||||
this.VerifyCalculateRelation(relationList, indto.Id.Value, indto.Id.Value);
|
||||
}
|
||||
|
||||
|
||||
|
||||
var entity = await _readingTableQuestionTrialRepository.InsertOrUpdateAsync(indto, true);
|
||||
|
||||
@@ -712,7 +713,7 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
@@ -842,7 +843,7 @@ namespace IRaCIS.Application.Services
|
||||
x => x.Id,
|
||||
x => NewId.NextGuid()
|
||||
);
|
||||
|
||||
|
||||
|
||||
var newQuestionList = await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == inDto.FromSystemCriterionId).ProjectTo<AddOrUpdateReadingQuestionSystemInDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
var copyNewQuestionList = newQuestionList.Clone();
|
||||
@@ -879,8 +880,8 @@ namespace IRaCIS.Application.Services
|
||||
);
|
||||
|
||||
|
||||
var newtableQuestion =await _readingTableQuestionSystemRepository.Where(x => x.SystemCriterionId == inDto.FromSystemCriterionId).ToListAsync();
|
||||
|
||||
var newtableQuestion = await _readingTableQuestionSystemRepository.Where(x => x.SystemCriterionId == inDto.FromSystemCriterionId).ToListAsync();
|
||||
|
||||
|
||||
var copyNewTableQuestionList = newtableQuestion.Clone();
|
||||
|
||||
@@ -889,7 +890,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
var tableQuestion = x.Clone();
|
||||
|
||||
|
||||
|
||||
tableQuestion.SystemCriterionId = inDto.ToSystemCriterionId;
|
||||
tableQuestion.Id = tableQuestionRelation[tableQuestion.Id];
|
||||
tableQuestion.ReadingQuestionId = questionRelation[tableQuestion.ReadingQuestionId];
|
||||
@@ -924,18 +925,18 @@ namespace IRaCIS.Application.Services
|
||||
/// <returns></returns>
|
||||
public async Task SynchronizeCriterion(SynchronizeCriterionInDto inDto)
|
||||
{
|
||||
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id==inDto.TrialReadingCriterionId).AsNoTracking().FirstOrDefaultAsync();
|
||||
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.TrialReadingCriterionId).AsNoTracking().FirstOrDefaultAsync();
|
||||
|
||||
if (trialCriterion != null)
|
||||
{
|
||||
if (trialCriterion.ReadingQuestionCriterionSystemId != null)
|
||||
{
|
||||
// 先找到项目系统问题Id和项目问题Id的对应关系
|
||||
var questionRelation = _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialCriterion.Id).ToDictionary(
|
||||
x => x.ReadingQuestionSystemId??default(Guid),
|
||||
var questionRelation = _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialCriterion.Id).ToDictionary(
|
||||
x => x.ReadingQuestionSystemId ?? default(Guid),
|
||||
x => x.Id
|
||||
);
|
||||
|
||||
|
||||
// 将系统里面的问题转为项目问题
|
||||
var newTrialQuestionList = await _readingQuestionSystemRepository.Where(x => x.ReadingQuestionCriterionSystemId == trialCriterion.ReadingQuestionCriterionSystemId)
|
||||
.ProjectTo<ReadingQuestionTrial>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
@@ -947,7 +948,7 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
else
|
||||
{
|
||||
var newid= NewId.NextGuid();
|
||||
var newid = NewId.NextGuid();
|
||||
questionRelation.Add(x.Id, newid);
|
||||
x.Id = newid;
|
||||
}
|
||||
@@ -964,7 +965,7 @@ namespace IRaCIS.Application.Services
|
||||
var question = x.Clone();
|
||||
if (question.ParentId != null)
|
||||
{
|
||||
question.ParentId = questionRelation[question.ParentId??default(Guid)];
|
||||
question.ParentId = questionRelation[question.ParentId ?? default(Guid)];
|
||||
}
|
||||
if (question.GroupId != null)
|
||||
{
|
||||
@@ -981,17 +982,17 @@ namespace IRaCIS.Application.Services
|
||||
needAddDatas.Add(question);
|
||||
};
|
||||
|
||||
await _readingQuestionTrialRepository.BatchDeleteNoTrackingAsync(x => x.ReadingQuestionCriterionTrialId == trialCriterion.Id&&!x.IsAdditional);
|
||||
await _readingQuestionTrialRepository.BatchDeleteNoTrackingAsync(x => x.ReadingQuestionCriterionTrialId == trialCriterion.Id && !x.IsAdditional);
|
||||
await _readingQuestionTrialRepository.AddRangeAsync(needAddDatas);
|
||||
var systemCriterion = await _readingQuestionCriterionSystemRepository.Where(x => x.Id == trialCriterion.ReadingQuestionCriterionSystemId).FirstNotNullAsync();
|
||||
await _readingQuestionCriterionTrialRepository.BatchUpdateNoTrackingAsync(x => x.Id == trialCriterion.Id, x => new ReadingQuestionCriterionTrial()
|
||||
{
|
||||
SynchronizeTime = DateTime.Now,
|
||||
IsMustGlobalReading = systemCriterion.IsMustGlobalReading,
|
||||
IseCRFShowInDicomReading=systemCriterion.IseCRFShowInDicomReading,
|
||||
IseCRFShowInDicomReading = systemCriterion.IseCRFShowInDicomReading,
|
||||
IsGlobalReading = systemCriterion.IsMustGlobalReading ? true : trialCriterion.IsGlobalReading,
|
||||
IsReadingPeriod = systemCriterion.IsMustGlobalReading ? true : trialCriterion.IsReadingPeriod,
|
||||
}) ;
|
||||
});
|
||||
|
||||
|
||||
#region 表格问题
|
||||
@@ -1001,7 +1002,7 @@ namespace IRaCIS.Application.Services
|
||||
var questionIds = needAddDatas.Select(x => x.Id).ToList();
|
||||
|
||||
|
||||
var tableQuestionRelation = _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId== trialCriterion.Id&&x.SystemTableQuestionId!=null).ToDictionary(
|
||||
var tableQuestionRelation = _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == trialCriterion.Id && x.SystemTableQuestionId != null).ToDictionary(
|
||||
x => x.SystemTableQuestionId ?? default(Guid),
|
||||
x => x.Id
|
||||
);
|
||||
@@ -1055,9 +1056,9 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
await _readingTableQuestionTrialRepository.BatchDeleteNoTrackingAsync(x => x.TrialCriterionId == trialCriterion.Id);
|
||||
await _readingTableQuestionTrialRepository.AddRangeAsync(_mapper.Map<List<ReadingTableQuestionTrial>>(needAddTableDatas));
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,6 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using MassTransit;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service.TA
|
||||
{
|
||||
@@ -18,7 +12,7 @@ namespace IRaCIS.Core.Application.Service.TA
|
||||
IRepository<TumorAssessment_IRECIST1Point1> _tumorAssessmentIRepository1Point1,
|
||||
IRepository<TumorAssessment_RECIST1Point1BM> _tumorAssessmentRepository1Point1BM) : BaseService
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
+107
-114
@@ -1,22 +1,15 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using MassTransit;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using AutoMapper;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using Newtonsoft.Json;
|
||||
using IRaCIS.Core.Application.Service;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Linq.Dynamic.Core;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 全局阅片
|
||||
/// </summary>
|
||||
@@ -34,8 +27,8 @@ namespace IRaCIS.Application.Services
|
||||
await VerifyTaskIsSign(inDto.GlobalTaskId);
|
||||
await this.SubmitTaskChangeState(inDto.GlobalTaskId);
|
||||
|
||||
var globalAnswerList = await _readingGlobalTaskInfoRepository.Where(x =>
|
||||
x.QuestionId!=null &&x.Answer!=string.Empty&& x.Answer != null &&
|
||||
var globalAnswerList = await _readingGlobalTaskInfoRepository.Where(x =>
|
||||
x.QuestionId != null && x.Answer != string.Empty && x.Answer != null &&
|
||||
x.GlobalTaskId == inDto.GlobalTaskId).ToListAsync();
|
||||
|
||||
foreach (var item in globalAnswerList)
|
||||
@@ -80,16 +73,16 @@ namespace IRaCIS.Application.Services
|
||||
&& x.Answer != answer.Answer && answer.Answer != string.Empty && answer.Answer != null
|
||||
, x => new ReadingTaskQuestionAnswer()
|
||||
{
|
||||
Answer= answer.Answer,
|
||||
GlobalChangeAnswer = answer.Answer,
|
||||
IsGlobalChange = true,
|
||||
Answer = answer.Answer,
|
||||
GlobalChangeAnswer = answer.Answer,
|
||||
IsGlobalChange = true,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
var answers= inDto.VisitTaskAnswerList.SelectMany(x => x.AnswerList.Select(y => new ReadingGlobalTaskInfo()
|
||||
var answers = inDto.VisitTaskAnswerList.SelectMany(x => x.AnswerList.Select(y => new ReadingGlobalTaskInfo()
|
||||
{
|
||||
Answer = y.Answer,
|
||||
QuestionId = y.QuestionId,
|
||||
@@ -144,7 +137,7 @@ namespace IRaCIS.Application.Services
|
||||
GlobalAnswerType = x.GlobalAnswerType,
|
||||
TaskId = x.VisitTaskId,
|
||||
TrialId = inDto.TrialId,
|
||||
CreateTime= createtime,
|
||||
CreateTime = createtime,
|
||||
}).ToList());
|
||||
|
||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == inDto.GlobalTaskId, u => new VisitTask() { ReadingTaskState = ReadingTaskState.Reading });
|
||||
@@ -163,7 +156,7 @@ namespace IRaCIS.Application.Services
|
||||
[HttpPost]
|
||||
public async Task<GetGlobalReadingInfoOutDto> GetGlobalReadingInfo(GetGlobalReadingInfoInDto inDto)
|
||||
{
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x=>x.Subject).FirstNotNullAsync();
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.Subject).FirstNotNullAsync();
|
||||
if (taskInfo.ReadingCategory != ReadingCategory.Global)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingGlobal_NotGlobal"]);
|
||||
@@ -174,15 +167,15 @@ namespace IRaCIS.Application.Services
|
||||
ReadingTaskState = taskInfo.ReadingTaskState,
|
||||
|
||||
};
|
||||
|
||||
|
||||
var otherGlobalTask = await _visitTaskRepository.Where(x => x.SouceReadModuleId == taskInfo.SouceReadModuleId && x.IsAnalysisCreate == taskInfo.IsAnalysisCreate
|
||||
&& x.IsSelfAnalysis == taskInfo.IsSelfAnalysis && x.TaskState == TaskState.Effect && x.DoctorUserId != taskInfo.DoctorUserId
|
||||
).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
var otherGlobalTask = await _visitTaskRepository.Where(x => x.SouceReadModuleId == taskInfo.SouceReadModuleId && x.IsAnalysisCreate == taskInfo.IsAnalysisCreate
|
||||
&& x.IsSelfAnalysis == taskInfo.IsSelfAnalysis && x.TaskState == TaskState.Effect && x.DoctorUserId != taskInfo.DoctorUserId
|
||||
).FirstOrDefaultAsync();
|
||||
if (otherGlobalTask != null)
|
||||
{
|
||||
result.OtherGlobalTaskId = otherGlobalTask.Id;
|
||||
}
|
||||
}
|
||||
|
||||
result.TaskBlindName = taskInfo.TaskBlindName;
|
||||
if (taskInfo.IsAnalysisCreate)
|
||||
@@ -195,18 +188,18 @@ namespace IRaCIS.Application.Services
|
||||
result.SubjectCode = taskInfo.Subject.Code;
|
||||
}
|
||||
|
||||
var judgeInfo = await _visitTaskRepository.Where(x =>
|
||||
x.SubjectId == taskInfo.SubjectId
|
||||
&& x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId
|
||||
&& x.TaskState == TaskState.Effect
|
||||
&& x.ArmEnum == taskInfo.ArmEnum
|
||||
&& x.ReadingCategory == ReadingCategory.Judge
|
||||
&& x.IsAnalysisCreate == taskInfo.IsAnalysisCreate
|
||||
&& x.IsSelfAnalysis == taskInfo.IsSelfAnalysis
|
||||
&& x.DoctorUserId == taskInfo.DoctorUserId
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned
|
||||
&& x.VisitTaskNum == taskInfo.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Judge]
|
||||
&& x.ReReadingApplyState != ReReadingApplyState.Agree).FirstOrDefaultAsync();
|
||||
var judgeInfo = await _visitTaskRepository.Where(x =>
|
||||
x.SubjectId == taskInfo.SubjectId
|
||||
&& x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId
|
||||
&& x.TaskState == TaskState.Effect
|
||||
&& x.ArmEnum == taskInfo.ArmEnum
|
||||
&& x.ReadingCategory == ReadingCategory.Judge
|
||||
&& x.IsAnalysisCreate == taskInfo.IsAnalysisCreate
|
||||
&& x.IsSelfAnalysis == taskInfo.IsSelfAnalysis
|
||||
&& x.DoctorUserId == taskInfo.DoctorUserId
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned
|
||||
&& x.VisitTaskNum == taskInfo.VisitTaskNum + ReadingCommon.TaskNumDic[ReadingCategory.Judge]
|
||||
&& x.ReReadingApplyState != ReReadingApplyState.Agree).FirstOrDefaultAsync();
|
||||
if (judgeInfo != null)
|
||||
{
|
||||
result.JudgeTaskId = judgeInfo.Id;
|
||||
@@ -217,7 +210,7 @@ namespace IRaCIS.Application.Services
|
||||
// 一致性分析按照doctorId 其他按照分组
|
||||
|
||||
|
||||
var queruTask = _visitTaskRepository.Where(x =>
|
||||
var queruTask = _visitTaskRepository.Where(x =>
|
||||
x.TrialId == taskInfo.TrialId &&
|
||||
x.SubjectId == taskInfo.SubjectId &&
|
||||
x.ReadingCategory == ReadingCategory.Visit &&
|
||||
@@ -248,37 +241,37 @@ namespace IRaCIS.Application.Services
|
||||
VisitNum = x.SourceSubjectVisit.VisitNum,
|
||||
IsBaseLine = x.SourceSubjectVisit.IsBaseLine,
|
||||
VisitId = x.SourceSubjectVisitId!.Value,
|
||||
LesionCountList=x.LesionList.GroupBy(y=>y.ReadingQuestionTrial.LesionType).Select(x => new LesionDto
|
||||
{
|
||||
LesionType = x.Key!.Value,
|
||||
Count = x.ToList().Count()
|
||||
}).ToList(),
|
||||
//CrterionDictionaryGroup= x.CrterionDictionaryGroup,
|
||||
BeforeQuestionList = x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.GlobalReadingShowType!=GlobalReadingShowType.NotShow).OrderBy(y => y.ReadingQuestionTrial.ShowOrder)
|
||||
LesionCountList = x.LesionList.GroupBy(y => y.ReadingQuestionTrial.LesionType).Select(x => new LesionDto
|
||||
{
|
||||
LesionType = x.Key!.Value,
|
||||
Count = x.ToList().Count()
|
||||
}).ToList(),
|
||||
//CrterionDictionaryGroup= x.CrterionDictionaryGroup,
|
||||
BeforeQuestionList = x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.GlobalReadingShowType != GlobalReadingShowType.NotShow).OrderBy(y => y.ReadingQuestionTrial.ShowOrder)
|
||||
.Select(y => new GlobalQuestionInfo()
|
||||
{
|
||||
|
||||
JudgeDifferenceValue= y.ReadingQuestionTrial.JudgeDifferenceValue,
|
||||
|
||||
QuestionId = y.ReadingQuestionTrialId,
|
||||
JudgeDifferenceValue = y.ReadingQuestionTrial.JudgeDifferenceValue,
|
||||
|
||||
QuestionId = y.ReadingQuestionTrialId,
|
||||
QuestionName = y.ReadingQuestionTrial.QuestionName.LanguageName(y.ReadingQuestionTrial.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionEnName=y.ReadingQuestionTrial.QuestionEnName,
|
||||
QuestionEnName = y.ReadingQuestionTrial.QuestionEnName,
|
||||
AnswerGroup = y.ReadingQuestionTrial.AnswerGroup,
|
||||
QuestionType = y.ReadingQuestionTrial.QuestionType,
|
||||
LimitEdit= y.ReadingQuestionTrial.LimitEdit,
|
||||
MaxAnswerLength=y.ReadingQuestionTrial.MaxAnswerLength,
|
||||
FileType=y.ReadingQuestionTrial.FileType,
|
||||
LimitEdit = y.ReadingQuestionTrial.LimitEdit,
|
||||
MaxAnswerLength = y.ReadingQuestionTrial.MaxAnswerLength,
|
||||
FileType = y.ReadingQuestionTrial.FileType,
|
||||
QuestionGenre = y.ReadingQuestionTrial.QuestionGenre,
|
||||
DictionaryCode = y.ReadingQuestionTrial.DictionaryCode,
|
||||
GlobalReadingShowType=y.ReadingQuestionTrial.GlobalReadingShowType,
|
||||
GlobalReadingShowType = y.ReadingQuestionTrial.GlobalReadingShowType,
|
||||
AnswerCombination = y.ReadingQuestionTrial.AnswerCombination,
|
||||
JudgeType = y.ReadingQuestionTrial.JudgeType,
|
||||
ShowOrder= y.ReadingQuestionTrial.ShowOrder,
|
||||
Type = y.ReadingQuestionTrial.Type,
|
||||
ShowOrder = y.ReadingQuestionTrial.ShowOrder,
|
||||
Type = y.ReadingQuestionTrial.Type,
|
||||
TypeValue = y.ReadingQuestionTrial.TypeValue,
|
||||
ValueType = y.ReadingQuestionTrial.ValueType,
|
||||
IsJudgeQuestion =y.ReadingQuestionTrial.IsJudgeQuestion,
|
||||
Answer =y.Answer,
|
||||
IsJudgeQuestion = y.ReadingQuestionTrial.IsJudgeQuestion,
|
||||
Answer = y.Answer,
|
||||
}).ToList()
|
||||
}).ToListAsync();
|
||||
var globalQuestionList = await _readingQuestionTrialRepository.Where(x => x.GlobalReadingShowType != GlobalReadingShowType.NotShow && x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId).IgnoreAutoIncludes().ToListAsync();
|
||||
@@ -299,40 +292,40 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
x.BeforeQuestionList.Add(new GlobalQuestionInfo()
|
||||
{
|
||||
QuestionId = y.Id,
|
||||
JudgeDifferenceValue=y.JudgeDifferenceValue,
|
||||
QuestionName = y.QuestionName.LanguageName(y.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionEnName = y.QuestionEnName,
|
||||
AnswerGroup = y.AnswerGroup,
|
||||
QuestionType = y.QuestionType,
|
||||
LimitEdit = y.LimitEdit,
|
||||
MaxAnswerLength = y.MaxAnswerLength,
|
||||
FileType = y.FileType,
|
||||
QuestionGenre = y.QuestionGenre,
|
||||
ShowOrder=y.ShowOrder,
|
||||
DictionaryCode = y.DictionaryCode,
|
||||
GlobalReadingShowType = y.GlobalReadingShowType,
|
||||
AnswerCombination = y.AnswerCombination,
|
||||
JudgeType = y.JudgeType,
|
||||
Type = y.Type,
|
||||
TypeValue = y.TypeValue,
|
||||
ValueType = y.ValueType,
|
||||
IsJudgeQuestion = y.IsJudgeQuestion,
|
||||
Answer = string.Empty,
|
||||
QuestionId = y.Id,
|
||||
JudgeDifferenceValue = y.JudgeDifferenceValue,
|
||||
QuestionName = y.QuestionName.LanguageName(y.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionEnName = y.QuestionEnName,
|
||||
AnswerGroup = y.AnswerGroup,
|
||||
QuestionType = y.QuestionType,
|
||||
LimitEdit = y.LimitEdit,
|
||||
MaxAnswerLength = y.MaxAnswerLength,
|
||||
FileType = y.FileType,
|
||||
QuestionGenre = y.QuestionGenre,
|
||||
ShowOrder = y.ShowOrder,
|
||||
DictionaryCode = y.DictionaryCode,
|
||||
GlobalReadingShowType = y.GlobalReadingShowType,
|
||||
AnswerCombination = y.AnswerCombination,
|
||||
JudgeType = y.JudgeType,
|
||||
Type = y.Type,
|
||||
TypeValue = y.TypeValue,
|
||||
ValueType = y.ValueType,
|
||||
IsJudgeQuestion = y.IsJudgeQuestion,
|
||||
Answer = string.Empty,
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
x.BeforeQuestionList = x.BeforeQuestionList.OrderBy(y => y.ShowOrder).ToList();
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
var globalReadingQuestion = await _readingGlobalTaskInfoRepository.Where(x => x.GlobalTaskId == inDto.VisitTaskId).ToListAsync();
|
||||
var globalReadingQuestion = await _readingGlobalTaskInfoRepository.Where(x => x.GlobalTaskId == inDto.VisitTaskId).ToListAsync();
|
||||
var criterionType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == taskInfo.TrialReadingCriterionId).Select(x => x.CriterionType).FirstOrDefaultAsync();
|
||||
|
||||
// Before的Answer取自于 上一次全局阅片的结果, 如果没有上一次全局阅片的结果 取访视的答案
|
||||
@@ -341,7 +334,7 @@ namespace IRaCIS.Application.Services
|
||||
x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId &&
|
||||
x.SubjectId == taskInfo.SubjectId && x.IsAnalysisCreate == taskInfo.IsAnalysisCreate && x.TaskState == TaskState.Effect && x.VisitTaskNum < taskInfo.VisitTaskNum)
|
||||
.Where(x => x.DoctorUserId == taskInfo.DoctorUserId)
|
||||
.OrderByDescending(x=>x.VisitTaskNum)
|
||||
.OrderByDescending(x => x.VisitTaskNum)
|
||||
.FirstOrDefaultAsync();
|
||||
|
||||
List<ReadingGlobalTaskInfo>? globalAnswers = new List<ReadingGlobalTaskInfo>();
|
||||
@@ -358,13 +351,13 @@ namespace IRaCIS.Application.Services
|
||||
x.BeforeQuestionList.ForEach(y =>
|
||||
{
|
||||
|
||||
var globalAnswer = globalAnswers.Where(z => z.QuestionId == y.QuestionId&&z.TaskId==x.VisitTaskId).Select(z => z.Answer).FirstOrDefault();
|
||||
var globalAnswer = globalAnswers.Where(z => z.QuestionId == y.QuestionId && z.TaskId == x.VisitTaskId).Select(z => z.Answer).FirstOrDefault();
|
||||
if (!globalAnswer.IsNullOrEmpty())
|
||||
{
|
||||
y.Answer = globalAnswer??string.Empty;
|
||||
y.Answer = globalAnswer ?? string.Empty;
|
||||
y.IsGlobalAnswer = true;
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
@@ -372,7 +365,7 @@ namespace IRaCIS.Application.Services
|
||||
result.TaskList.ForEach(x =>
|
||||
{
|
||||
x.AfterQuestionList = x.BeforeQuestionList
|
||||
.GroupJoin(
|
||||
.GroupJoin(
|
||||
globalReadingQuestion
|
||||
, l => new { a = l.QuestionId, b = x.VisitTaskId }
|
||||
, r => new { a = r.QuestionId, b = r.TaskId }
|
||||
@@ -384,15 +377,15 @@ namespace IRaCIS.Application.Services
|
||||
(lr.global.Select(x => x.Answer).FirstOrDefault().IsNullOrEmpty() && inDto.UsingOriginalData ?
|
||||
lr.question.Answer : lr.global.Select(x => x.Answer).FirstOrDefault()
|
||||
),
|
||||
JudgeDifferenceValue= lr.question.JudgeDifferenceValue,
|
||||
VisitAnswer = lr.question.Answer,
|
||||
IsHaveChange = lr.global.Any(x=>x.QuestionId!=null&&!x.Answer.IsNullOrEmpty()) ? true : false,
|
||||
JudgeDifferenceValue = lr.question.JudgeDifferenceValue,
|
||||
VisitAnswer = lr.question.Answer,
|
||||
IsHaveChange = lr.global.Any(x => x.QuestionId != null && !x.Answer.IsNullOrEmpty()) ? true : false,
|
||||
QuestionId = lr.question.QuestionId,
|
||||
QuestionName = lr.question.QuestionName.LanguageName(lr.question.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionType = lr.question.QuestionType,
|
||||
LimitEdit=lr.question.LimitEdit,
|
||||
MaxAnswerLength=lr.question.MaxAnswerLength,
|
||||
FileType=lr.question.FileType,
|
||||
LimitEdit = lr.question.LimitEdit,
|
||||
MaxAnswerLength = lr.question.MaxAnswerLength,
|
||||
FileType = lr.question.FileType,
|
||||
QuestionGenre = lr.question.QuestionGenre,
|
||||
DictionaryCode = lr.question.DictionaryCode,
|
||||
GlobalReadingShowType = lr.question.GlobalReadingShowType,
|
||||
@@ -400,10 +393,10 @@ namespace IRaCIS.Application.Services
|
||||
GlobalAnswerType = GlobalAnswerType.Question,
|
||||
AnswerGroup = lr.question.AnswerGroup,
|
||||
AnswerCombination = lr.question.AnswerCombination,
|
||||
IsJudgeQuestion=lr.question.IsJudgeQuestion,
|
||||
IsJudgeQuestion = lr.question.IsJudgeQuestion,
|
||||
JudgeType = lr.question.JudgeType,
|
||||
TypeValue = lr.question.TypeValue,
|
||||
ValueType= lr.question.ValueType,
|
||||
ValueType = lr.question.ValueType,
|
||||
|
||||
}).ToList();
|
||||
|
||||
@@ -415,7 +408,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
var agreeOrNotAnswer = globalReadingQuestion.Where(y => y.TaskId == x.VisitTaskId && y.GlobalAnswerType == GlobalAnswerType.AgreeOrNot).Select(x => x.Answer).FirstOrDefault() ?? string.Empty;
|
||||
|
||||
if (agreeOrNotAnswer.IsNullOrEmpty()&& lastGlobalTask!=null&& lastGlobalTask.RelatedVisitTaskIdList.Contains(x.VisitTaskId))
|
||||
if (agreeOrNotAnswer.IsNullOrEmpty() && lastGlobalTask != null && lastGlobalTask.RelatedVisitTaskIdList.Contains(x.VisitTaskId))
|
||||
{
|
||||
agreeOrNotAnswer = "1";
|
||||
}
|
||||
@@ -430,7 +423,7 @@ namespace IRaCIS.Application.Services
|
||||
GlobalAnswerType=GlobalAnswerType.AgreeOrNot,
|
||||
GlobalReadingShowType= GlobalReadingShowType.AllShow,
|
||||
}
|
||||
|
||||
|
||||
};
|
||||
|
||||
questionTypes.Add(new GetGlobalQuestionType() { GlobalAnswerType = GlobalAnswerType.UpdateType, QuestionName = "评估更新类型" });
|
||||
@@ -443,8 +436,8 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
questionTypes.Add(new GetGlobalQuestionType() { GlobalAnswerType = GlobalAnswerType.Reason, QuestionName = "全局阅片备注" });
|
||||
foreach (var item in questionTypes)
|
||||
{
|
||||
@@ -454,7 +447,7 @@ namespace IRaCIS.Application.Services
|
||||
QuestionName = item.QuestionName,
|
||||
Type = "input",
|
||||
GlobalAnswerType = item.GlobalAnswerType,
|
||||
GlobalReadingShowType= GlobalReadingShowType.AllShow,
|
||||
GlobalReadingShowType = GlobalReadingShowType.AllShow,
|
||||
|
||||
});
|
||||
}
|
||||
@@ -469,8 +462,8 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
// 找到上一个全局阅片
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
result.TaskList.ForEach(x =>
|
||||
{
|
||||
foreach (var item in x.AfterQuestionList.Where(x => x.QuestionType == QuestionType.SiteVisitForTumorEvaluation))
|
||||
@@ -502,7 +495,7 @@ namespace IRaCIS.Application.Services
|
||||
x.BeforeQuestionList = x.BeforeQuestionList.Where(x => x.QuestionType != QuestionType.SiteVisitForTumorEvaluation).ToList();
|
||||
|
||||
|
||||
x.AfterQuestionList = x.AfterQuestionList.Where(x => x.QuestionType == QuestionType.SiteVisitForTumorEvaluation|| x.GlobalAnswerType != GlobalAnswerType.Question).ToList();
|
||||
x.AfterQuestionList = x.AfterQuestionList.Where(x => x.QuestionType == QuestionType.SiteVisitForTumorEvaluation || x.GlobalAnswerType != GlobalAnswerType.Question).ToList();
|
||||
|
||||
});
|
||||
}
|
||||
@@ -514,16 +507,16 @@ namespace IRaCIS.Application.Services
|
||||
List<CriterionDictionaryInfo> assessTypeList = await _readingTrialCriterionDictionaryRepository.Where(x => x.CriterionId == taskInfo.TrialReadingCriterionId
|
||||
&& x.ParentCode == ReadingCommon.CriterionDictionary.GlobalAssess
|
||||
)
|
||||
//.WhereIf(isBaseLine,x=>x.IsBaseLineUse)
|
||||
//.WhereIf(!isBaseLine,x=>x.IsFollowVisitUse)
|
||||
//.WhereIf(isBaseLine,x=>x.IsBaseLineUse)
|
||||
//.WhereIf(!isBaseLine,x=>x.IsFollowVisitUse)
|
||||
.Select(x => new CriterionDictionaryInfo()
|
||||
{
|
||||
Id = x.Id,
|
||||
|
||||
|
||||
DictionaryId = x.DictionaryId,
|
||||
ChildGroup = x.Dictionary.ChildGroup,
|
||||
IsBaseLineUse=x.IsBaseLineUse,
|
||||
IsFollowVisitUse=x.IsFollowVisitUse,
|
||||
IsBaseLineUse = x.IsBaseLineUse,
|
||||
IsFollowVisitUse = x.IsFollowVisitUse,
|
||||
Code = x.Dictionary.Code,
|
||||
Description = x.Dictionary.Description,
|
||||
ShowOrder = x.Dictionary.ShowOrder,
|
||||
|
||||
+58
-69
@@ -1,33 +1,22 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using MassTransit;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using AutoMapper;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using IRaCIS.Core.Application.Service;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.Service.ReadingCalculate.Interface;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using DocumentFormat.OpenXml.Drawing;
|
||||
using DocumentFormat.OpenXml.Drawing.Charts;
|
||||
using IRaCIS.Core.Application.Service.ReadingCalculate.Interface;
|
||||
using AutoMapper.QueryableExtensions;
|
||||
using IRaCIS.Application.Contracts;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.Extensions.Options;
|
||||
using System.Linq;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using static Microsoft.EntityFrameworkCore.DbLoggerCategory;
|
||||
using IRaCIS.Core.Application.Helper;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using ZiggyCreatures.Caching.Fusion;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
/// <summary>
|
||||
/// IR影像阅片
|
||||
@@ -74,7 +63,7 @@ namespace IRaCIS.Application.Services
|
||||
ITrialEmailNoticeConfigService _trialEmailNoticeConfigService) : BaseService, IReadingImageTaskService
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
#region 计算
|
||||
|
||||
@@ -504,10 +493,10 @@ namespace IRaCIS.Application.Services
|
||||
x.TaskState == TaskState.Effect &&
|
||||
x.IsAnalysisCreate == taskInfo.IsAnalysisCreate &&
|
||||
x.ReadingCategory == ReadingCategory.Visit) || x.Id == inDto.VisitTaskId)
|
||||
.WhereIf(taskInfo.TrialReadingCriterion.IsReadingTaskViewInOrder != ReadingOrder.SubjectRandom,x=> (x.VisitTaskNum <= taskInfo.VisitTaskNum && x.ReadingTaskState == ReadingTaskState.HaveSigned)|| x.Id == inDto.VisitTaskId);
|
||||
.WhereIf(taskInfo.TrialReadingCriterion.IsReadingTaskViewInOrder != ReadingOrder.SubjectRandom, x => (x.VisitTaskNum <= taskInfo.VisitTaskNum && x.ReadingTaskState == ReadingTaskState.HaveSigned) || x.Id == inDto.VisitTaskId);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
if (taskInfo.ReadingTaskState == ReadingTaskState.HaveSigned)
|
||||
{
|
||||
@@ -546,7 +535,7 @@ namespace IRaCIS.Application.Services
|
||||
var self = result.Where(x => x.VisitTaskId == inDto.VisitTaskId).FirstOrDefault();
|
||||
Random random = new Random();
|
||||
var otherList = result.Where(x => x.VisitTaskId != inDto.VisitTaskId).OrderBy(x => random.Next()).ToList();
|
||||
var newList = new List<GetRelatedVisitTaskOutDto>() { };
|
||||
var newList = new List<GetRelatedVisitTaskOutDto>() { };
|
||||
newList.AddRange(otherList);
|
||||
newList.Add(self);
|
||||
result = newList;
|
||||
@@ -803,7 +792,7 @@ namespace IRaCIS.Application.Services
|
||||
var questions = await _readingQuestionTrialRepository
|
||||
.Where(x=> !questionIds.Contains(x.Id))
|
||||
.WhereIf(questionClassify != null, x => x.QuestionClassify == questionClassify)
|
||||
.WhereIf(criterionIdInfo.IseCRFShowInDicomReading, x => x.ReadingQuestionCriterionTrialId == trialReadingCriterionId && x.Type != ReadingQestionType.Table&& x.Type != ReadingQestionType.BasicTable)
|
||||
.WhereIf(criterionIdInfo.IseCRFShowInDicomReading, x => x.ReadingQuestionCriterionTrialId == trialReadingCriterionId && x.Type != ReadingQestionType.Table && x.Type != ReadingQestionType.BasicTable)
|
||||
.WhereIf(!criterionIdInfo.IseCRFShowInDicomReading, x => x.IsShowInDicom && x.ReadingQuestionCriterionTrialId == trialReadingCriterionId && x.Type != ReadingQestionType.Table && x.Type != ReadingQestionType.BasicTable)
|
||||
|
||||
.ProjectTo<DicomReadingQuestionAnswer>(_mapper.ConfigurationProvider, new
|
||||
@@ -1169,7 +1158,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
}
|
||||
|
||||
var usedGuropIds = qusetionList.Where(x => x.Type == ReadingQestionType.Table|| x.Type== ReadingQestionType.BasicTable).Select(x => x.GroupId).ToList();
|
||||
var usedGuropIds = qusetionList.Where(x => x.Type == ReadingQestionType.Table || x.Type == ReadingQestionType.BasicTable).Select(x => x.GroupId).ToList();
|
||||
qusetionList = qusetionList.Where(x => usedGuropIds.Contains(x.Id) || usedGuropIds.Contains(x.GroupId)).ToList();
|
||||
}
|
||||
break;
|
||||
@@ -1181,7 +1170,7 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -2712,10 +2701,10 @@ namespace IRaCIS.Application.Services
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<bool> SetSkipReadingCache(SetSkipReadingCacheInDto inDto )
|
||||
public async Task<bool> SetSkipReadingCache(SetSkipReadingCacheInDto inDto)
|
||||
{
|
||||
var clearSkipReadingCache = await _fusionCache.GetOrDefaultAsync<string>(CacheKeys.SkipReadingCacheKey(_userInfo.Id));
|
||||
if (clearSkipReadingCache == null|| clearSkipReadingCache==string.Empty)
|
||||
if (clearSkipReadingCache == null || clearSkipReadingCache == string.Empty)
|
||||
{
|
||||
List<Guid> cacheIds = new List<Guid>();
|
||||
cacheIds.Add(inDto.VisitTaskId);
|
||||
@@ -2723,7 +2712,7 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
else
|
||||
{
|
||||
List<Guid>? cacheIds=JsonConvert.DeserializeObject<List<Guid>>(clearSkipReadingCache);
|
||||
List<Guid>? cacheIds = JsonConvert.DeserializeObject<List<Guid>>(clearSkipReadingCache);
|
||||
cacheIds.Add(inDto.VisitTaskId);
|
||||
await _fusionCache.SetAsync<string>(CacheKeys.SkipReadingCacheKey(_userInfo.Id), JsonConvert.SerializeObject(cacheIds), TimeSpan.FromHours(24));
|
||||
}
|
||||
@@ -2758,7 +2747,7 @@ namespace IRaCIS.Application.Services
|
||||
#region 跳过阅片
|
||||
var clearSkipReadingCache = await _fusionCache.GetOrDefaultAsync<string>(CacheKeys.SkipReadingCacheKey(_userInfo.Id));
|
||||
|
||||
|
||||
|
||||
List<Guid> cacheSkipIds = new List<Guid>();
|
||||
if (clearSkipReadingCache != null && clearSkipReadingCache != string.Empty)
|
||||
{
|
||||
@@ -2808,7 +2797,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
var currentSubject = subjectTaskList.Where(x => x.Index >= subjectIndex && !x.ExistReadingApply)
|
||||
// 排除跳过的
|
||||
.Where(x=> x.UnReadCanReadTaskList.Select(y => y.Id).Intersect(cacheSkipIds).Count()==0)
|
||||
.Where(x => x.UnReadCanReadTaskList.Select(y => y.Id).Intersect(cacheSkipIds).Count() == 0)
|
||||
.OrderBy(x => x.Index).FirstOrDefault();
|
||||
|
||||
|
||||
@@ -2819,17 +2808,17 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
task = currentSubject.UnReadCanReadTaskList
|
||||
.Select(x => new GetReadingTaskDto()
|
||||
{
|
||||
ReadingCategory = x.ReadingCategory,
|
||||
SubjectCode = currentSubject.SubjectCode,
|
||||
SubjectId = currentSubject.SubjectId,
|
||||
TaskBlindName = x.TaskBlindName,
|
||||
VisitNum = x.VisitNum,
|
||||
ArmEnum = x.ArmEnum,
|
||||
VisistId = x.VisistId ?? default(Guid),
|
||||
VisitTaskId = x.Id,
|
||||
TrialReadingCriterionId = x.TrialReadingCriterionId,
|
||||
}).FirstOrDefault();
|
||||
{
|
||||
ReadingCategory = x.ReadingCategory,
|
||||
SubjectCode = currentSubject.SubjectCode,
|
||||
SubjectId = currentSubject.SubjectId,
|
||||
TaskBlindName = x.TaskBlindName,
|
||||
VisitNum = x.VisitNum,
|
||||
ArmEnum = x.ArmEnum,
|
||||
VisistId = x.VisistId ?? default(Guid),
|
||||
VisitTaskId = x.Id,
|
||||
TrialReadingCriterionId = x.TrialReadingCriterionId,
|
||||
}).FirstOrDefault();
|
||||
|
||||
|
||||
|
||||
@@ -2841,7 +2830,7 @@ namespace IRaCIS.Application.Services
|
||||
TrialId = inDto.TrialId,
|
||||
SubjectId = inDto.SubjectId,
|
||||
TrialReadingCriterionId = trialReadingCriterionId!.Value,
|
||||
SubjectCode=inDto.SubjectCode,
|
||||
SubjectCode = inDto.SubjectCode,
|
||||
PageIndex = 1,
|
||||
PageSize = 99999,
|
||||
|
||||
@@ -2866,23 +2855,23 @@ namespace IRaCIS.Application.Services
|
||||
Random random = new Random();
|
||||
//返回的范围是 0- taskList.Count-1
|
||||
int randomIndex = random.Next(taskList.Count);
|
||||
|
||||
|
||||
var visitTaskId = taskList[randomIndex].Id;
|
||||
|
||||
task = await _visitTaskRepository.Where(x=>x.Id== visitTaskId).Select(x => new GetReadingTaskDto()
|
||||
{
|
||||
VisitTaskId = x.Id,
|
||||
ArmEnum = x.ArmEnum,
|
||||
TaskBlindName = x.TaskBlindName,
|
||||
ReadingCategory = x.ReadingCategory,
|
||||
VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule == null ? default(Guid) : x.ReadModule.SubjectVisitId,
|
||||
VisitNum = x.VisitTaskNum,
|
||||
SubjectId = x.SubjectId,
|
||||
SubjectCode = x.Subject.Code,
|
||||
TrialReadingCriterionId = x.TrialReadingCriterionId,
|
||||
}).FirstOrDefaultAsync();
|
||||
task = await _visitTaskRepository.Where(x => x.Id == visitTaskId).Select(x => new GetReadingTaskDto()
|
||||
{
|
||||
VisitTaskId = x.Id,
|
||||
ArmEnum = x.ArmEnum,
|
||||
TaskBlindName = x.TaskBlindName,
|
||||
ReadingCategory = x.ReadingCategory,
|
||||
VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule == null ? default(Guid) : x.ReadModule.SubjectVisitId,
|
||||
VisitNum = x.VisitTaskNum,
|
||||
SubjectId = x.SubjectId,
|
||||
SubjectCode = x.Subject.Code,
|
||||
TrialReadingCriterionId = x.TrialReadingCriterionId,
|
||||
}).FirstOrDefaultAsync();
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var query = _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.TrialReadingCriterionId == trialReadingCriterionId && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.DoctorUserId == _userInfo.Id
|
||||
@@ -2925,7 +2914,7 @@ namespace IRaCIS.Application.Services
|
||||
task.SubjectCode = await _subjectRepository.Where(x => x.Id == task.SubjectId).Select(x => x.Code).FirstNotNullAsync();
|
||||
}
|
||||
|
||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.Id == task.VisitTaskId&&x.TaskState==TaskState.Effect&&x.ReadingTaskState!=ReadingTaskState.HaveSigned , x => new VisitTask()
|
||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.Id == task.VisitTaskId && x.TaskState == TaskState.Effect && x.ReadingTaskState != ReadingTaskState.HaveSigned, x => new VisitTask()
|
||||
{
|
||||
FirstReadingTime = DateTime.Now,
|
||||
});
|
||||
@@ -3047,7 +3036,7 @@ namespace IRaCIS.Application.Services
|
||||
[HttpPost]
|
||||
public async Task<bool> VerifyReadingRestTime()
|
||||
{
|
||||
var userTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt;
|
||||
var userTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt;
|
||||
if (userTypeEnum != UserTypeEnum.IndependentReviewer)
|
||||
{
|
||||
return true;
|
||||
@@ -3290,7 +3279,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
if (taskInfo.ReadingCategory == ReadingCategory.Visit)
|
||||
{
|
||||
switch(isReadingTaskViewInOrder)
|
||||
switch (isReadingTaskViewInOrder)
|
||||
{
|
||||
case ReadingOrder.SubjectRandom:
|
||||
|
||||
@@ -3303,7 +3292,7 @@ namespace IRaCIS.Application.Services
|
||||
x.IsAnalysisCreate == taskInfo.IsAnalysisCreate &&
|
||||
x.ArmEnum == taskInfo.ArmEnum &&
|
||||
x.IsSelfAnalysis == taskInfo.IsSelfAnalysis &&
|
||||
x.BlindSubjectCode==taskInfo.BlindSubjectCode &&
|
||||
x.BlindSubjectCode == taskInfo.BlindSubjectCode &&
|
||||
x.DoctorUserId == taskInfo.DoctorUserId &&
|
||||
x.TaskState == TaskState.Effect && x.Id != taskInfo.Id).Select(x => x.Id).ToListAsync();
|
||||
|
||||
@@ -3312,7 +3301,7 @@ namespace IRaCIS.Application.Services
|
||||
relatedVisitTaskIdList.Add(taskInfo.Id);
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+97
-99
@@ -1,21 +1,17 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using MassTransit;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using AutoMapper;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using Newtonsoft.Json;
|
||||
using IRaCIS.Core.Application.Service;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 裁判
|
||||
/// </summary>
|
||||
@@ -43,14 +39,14 @@ namespace IRaCIS.Application.Services
|
||||
QuestionName = x.QuestionName.LanguageName(x.QuestionEnName, _userInfo.IsEn_Us),
|
||||
PageName = x.ReadingCriterionPage.PageName,
|
||||
TypeValue = x.TypeValue,
|
||||
QuestionGenre=x.QuestionGenre,
|
||||
DictionaryCode=x.DictionaryCode,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
JudgeType = x.JudgeType,
|
||||
Type=x.Type,
|
||||
Unit= x.Unit,
|
||||
Type = x.Type,
|
||||
Unit = x.Unit,
|
||||
ReadingQuestionTrialId = x.Id,
|
||||
JudgeDifferenceValue= x.JudgeDifferenceValue,
|
||||
JudgeDifferenceType=x.JudgeDifferenceType,
|
||||
JudgeDifferenceValue = x.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.JudgeDifferenceType,
|
||||
}).ToListAsync();
|
||||
|
||||
|
||||
@@ -74,9 +70,9 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
AnswerGroup = JsonConvert.SerializeObject(inDto.AnswerGroup),
|
||||
AnswerCombination = JsonConvert.SerializeObject(inDto.AnswerCombination),
|
||||
JudgeDifferenceValue= inDto.JudgeDifferenceValue,
|
||||
JudgeDifferenceType=inDto.JudgeDifferenceType,
|
||||
JudgeType = inDto.JudgeType,
|
||||
JudgeDifferenceValue = inDto.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = inDto.JudgeDifferenceType,
|
||||
JudgeType = inDto.JudgeType,
|
||||
});
|
||||
|
||||
var result = await _readingQuestionTrialRepository.SaveChangesAsync();
|
||||
@@ -134,21 +130,11 @@ namespace IRaCIS.Application.Services
|
||||
if (await VerifyIsGlobalVisitTask(taskList[0].Id))
|
||||
{
|
||||
|
||||
var globalVisitTaskIds = await _visitTaskRepository.Where(x=>x.Id== taskList[0].Id).Select(x=>x.RelatedVisitTaskIdList).FirstNotNullAsync();
|
||||
var globalVisitTaskIds = await _visitTaskRepository.Where(x => x.Id == taskList[0].Id).Select(x => x.RelatedVisitTaskIdList).FirstNotNullAsync();
|
||||
|
||||
// 找到所有的的任务
|
||||
var globalVisitTasks = await _visitTaskRepository.Where(x => globalVisitTaskIds.Contains(x.Id)||x.Id== taskList[0].Id).Select(x => new {
|
||||
x.Id,
|
||||
x.ArmEnum,
|
||||
x.VisitTaskNum,
|
||||
x.SourceSubjectVisitId,
|
||||
x.TaskBlindName,
|
||||
} ).ToListAsync();
|
||||
|
||||
var globalVisitTwoTaskIds = await _visitTaskRepository.Where(x => x.Id == taskList[1].Id).Select(x => x.RelatedVisitTaskIdList).FirstNotNullAsync();
|
||||
|
||||
// 找到所有的的任务
|
||||
var globalVisitTwoTasks = await _visitTaskRepository.Where(x => globalVisitTwoTaskIds.Contains(x.Id) || x.Id == taskList[1].Id).Select(x => new {
|
||||
var globalVisitTasks = await _visitTaskRepository.Where(x => globalVisitTaskIds.Contains(x.Id) || x.Id == taskList[0].Id).Select(x => new
|
||||
{
|
||||
x.Id,
|
||||
x.ArmEnum,
|
||||
x.VisitTaskNum,
|
||||
@@ -156,7 +142,19 @@ namespace IRaCIS.Application.Services
|
||||
x.TaskBlindName,
|
||||
}).ToListAsync();
|
||||
|
||||
var taskNum = globalVisitTasks.Select(x => x.VisitTaskNum).Distinct().OrderBy(x=>x).ToList();
|
||||
var globalVisitTwoTaskIds = await _visitTaskRepository.Where(x => x.Id == taskList[1].Id).Select(x => x.RelatedVisitTaskIdList).FirstNotNullAsync();
|
||||
|
||||
// 找到所有的的任务
|
||||
var globalVisitTwoTasks = await _visitTaskRepository.Where(x => globalVisitTwoTaskIds.Contains(x.Id) || x.Id == taskList[1].Id).Select(x => new
|
||||
{
|
||||
x.Id,
|
||||
x.ArmEnum,
|
||||
x.VisitTaskNum,
|
||||
x.SourceSubjectVisitId,
|
||||
x.TaskBlindName,
|
||||
}).ToListAsync();
|
||||
|
||||
var taskNum = globalVisitTasks.Select(x => x.VisitTaskNum).Distinct().OrderBy(x => x).ToList();
|
||||
|
||||
|
||||
var judgeQuestionAnswer = await _readingTaskQuestionAnswerRepository.Where(x => globalVisitTaskIds.Contains(x.VisitTaskId) && x.ReadingQuestionTrial.IsJudgeQuestion).OrderBy(x => x.ReadingQuestionTrial.ShowOrder)
|
||||
@@ -267,7 +265,7 @@ namespace IRaCIS.Application.Services
|
||||
judgeInfo.VisitInfoList.Add(judgeReadingInfoDto);
|
||||
}
|
||||
|
||||
|
||||
|
||||
break;
|
||||
|
||||
case ReadingCategory.Global:
|
||||
@@ -300,14 +298,14 @@ namespace IRaCIS.Application.Services
|
||||
ArmEnum = item.ArmEnum,
|
||||
VisitTaskId = item.VisitTaskId,
|
||||
GlobalVisitTaskId = taskList[0].Id,
|
||||
JudgeQuestionList = item.AfterQuestionList.Where(x => x.GlobalAnswerType== GlobalAnswerType.Question).Select(x => new JudgeQuestion()
|
||||
JudgeQuestionList = item.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Question).Select(x => new JudgeQuestion()
|
||||
{
|
||||
|
||||
Answer = x.Answer,
|
||||
QuestionId = x.QuestionId!.Value,
|
||||
QuestionName = x.QuestionName,
|
||||
QuestionGenre=x.QuestionGenre,
|
||||
DictionaryCode=x.DictionaryCode,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
}).ToList()
|
||||
};
|
||||
|
||||
@@ -322,11 +320,11 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
judgeReadingQuestion.JudgeQuestionList.Add(new JudgeQuestion()
|
||||
{
|
||||
Answer = item.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Reason).Select(x => x.Answer).FirstOrDefault()??string.Empty,
|
||||
Answer = item.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Reason).Select(x => x.Answer).FirstOrDefault() ?? string.Empty,
|
||||
QuestionType = JudgeReadingQuestionType.VisitRemark,
|
||||
QuestionName = "",
|
||||
});
|
||||
@@ -337,14 +335,14 @@ namespace IRaCIS.Application.Services
|
||||
var rTwoJudge = new JudgeReadingQuestion()
|
||||
{
|
||||
ArmEnum = twoItem.ArmEnum,
|
||||
|
||||
|
||||
VisitTaskId = twoItem.VisitTaskId,
|
||||
GlobalVisitTaskId = taskList[1].Id,
|
||||
JudgeQuestionList = twoItem.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Question).Select(x => new JudgeQuestion()
|
||||
{
|
||||
|
||||
Answer = x.Answer,
|
||||
QuestionId = x.QuestionId==null?default(Guid): x.QuestionId.Value,
|
||||
QuestionId = x.QuestionId == null ? default(Guid) : x.QuestionId.Value,
|
||||
QuestionName = x.QuestionName,
|
||||
QuestionGenre = x.QuestionGenre,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
@@ -365,11 +363,11 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
rTwoJudge.JudgeQuestionList.Add(new JudgeQuestion()
|
||||
{
|
||||
Answer = twoItem.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Reason).Select(x => x.Answer).FirstOrDefault()??string.Empty,
|
||||
Answer = twoItem.AfterQuestionList.Where(x => x.GlobalAnswerType == GlobalAnswerType.Reason).Select(x => x.Answer).FirstOrDefault() ?? string.Empty,
|
||||
QuestionType = JudgeReadingQuestionType.VisitRemark,
|
||||
QuestionName = "",
|
||||
});
|
||||
@@ -405,7 +403,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
JudgeResultTaskId = inDto.JudgeResultTaskId,
|
||||
JudgeResultRemark = inDto.JudgeResultRemark,
|
||||
JudgeResultImagePath = string.Join(',',inDto.JudgeResultImagePathList),
|
||||
JudgeResultImagePath = string.Join(',', inDto.JudgeResultImagePathList),
|
||||
|
||||
});
|
||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||
@@ -432,19 +430,19 @@ namespace IRaCIS.Application.Services
|
||||
SignTime = DateTime.Now,
|
||||
JudgeResultImagePath = string.Join(',', inDto.JudgeResultImagePathList),
|
||||
});
|
||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||
|
||||
// 需要判断是否添加肿瘤学任务
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.JudgeVisitTaskId == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
// 需要判断是否添加肿瘤学任务
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.JudgeVisitTaskId == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
|
||||
if (taskInfo.ReadingCategory == ReadingCategory.Visit)
|
||||
{
|
||||
var oncologModule = await _readModuleRepository
|
||||
.Where(x => x.SubjectVisitId == taskInfo.SourceSubjectVisitId &&x.TrialReadingCriterionId==taskInfo.TrialReadingCriterionId&& x.ModuleType == ModuleTypeEnum.Oncology).FirstOrDefaultAsync();
|
||||
if (!taskInfo.TrialReadingCriterion.IsGlobalReading&&oncologModule != null)
|
||||
var oncologModule = await _readModuleRepository
|
||||
.Where(x => x.SubjectVisitId == taskInfo.SourceSubjectVisitId && x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId && x.ModuleType == ModuleTypeEnum.Oncology).FirstOrDefaultAsync();
|
||||
if (!taskInfo.TrialReadingCriterion.IsGlobalReading && oncologModule != null)
|
||||
{
|
||||
await AddOncologyTask(oncologModule.Id);
|
||||
}
|
||||
await AddOncologyTask(oncologModule.Id);
|
||||
}
|
||||
}
|
||||
|
||||
else if (taskInfo.ReadingCategory == ReadingCategory.Global)
|
||||
@@ -457,15 +455,15 @@ namespace IRaCIS.Application.Services
|
||||
var visitId = await _readModuleRepository.Where(x => x.Id == taskInfo.SouceReadModuleId).Select(x => x.SubjectVisitId).FirstOrDefaultAsync();
|
||||
|
||||
var oncologModule = await _readModuleRepository.Where(x => x.SubjectVisitId == visitId && x.ModuleType == ModuleTypeEnum.Oncology
|
||||
&&x.TrialReadingCriterionId== taskInfo.TrialReadingCriterionId
|
||||
&& x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId
|
||||
).FirstOrDefaultAsync();
|
||||
|
||||
if (oncologModule != null)
|
||||
{
|
||||
await AddOncologyTask(oncologModule.Id);
|
||||
}
|
||||
if (oncologModule != null)
|
||||
{
|
||||
await AddOncologyTask(oncologModule.Id);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -534,12 +532,12 @@ namespace IRaCIS.Application.Services
|
||||
else
|
||||
{
|
||||
isGroupAnalysis = true;
|
||||
visitTaskids = await _visitTaskRepository.Where(x => x.TaskState == TaskState.Effect && x.SourceSubjectVisitId == visitTask.SourceSubjectVisitId
|
||||
visitTaskids = await _visitTaskRepository.Where(x => x.TaskState == TaskState.Effect && x.SourceSubjectVisitId == visitTask.SourceSubjectVisitId
|
||||
&& x.TrialReadingCriterionId == visitTask.TrialReadingCriterionId
|
||||
&& x.SouceReadModuleId == visitTask.SouceReadModuleId && x.ReadingCategory != ReadingCategory.Judge && x.ReadingTaskState == ReadingTaskState.HaveSigned).Select(x => x.Id).ToListAsync();
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
@@ -559,13 +557,13 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach (var item in visitTaskids.Where(x=>x!=visitTask.Id))
|
||||
foreach (var item in visitTaskids.Where(x => x != visitTask.Id))
|
||||
{
|
||||
var armEnum = await _visitTaskRepository.Where(x => x.Id == item).Select(x=>x.ArmEnum).FirstNotNullAsync();
|
||||
var armEnum = await _visitTaskRepository.Where(x => x.Id == item).Select(x => x.ArmEnum).FirstNotNullAsync();
|
||||
await VerifyJudgeResult(visitTask, new List<Guid>() { visitTask.Id, item }, armEnum);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -573,7 +571,7 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
|
||||
|
||||
private async Task VerifyJudgeResult(VisitTask visitTask,List<Guid> visitTaskids,Arm? groupArm = null)
|
||||
private async Task VerifyJudgeResult(VisitTask visitTask, List<Guid> visitTaskids, Arm? groupArm = null)
|
||||
{
|
||||
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == visitTask.TrialReadingCriterionId).Select(x => new
|
||||
{
|
||||
@@ -605,8 +603,8 @@ namespace IRaCIS.Application.Services
|
||||
&& x.TaskState == TaskState.Effect
|
||||
&& x.TrialReadingCriterionId == visitTask.TrialReadingCriterionId
|
||||
&& x.IsAnalysisCreate == false
|
||||
&& x.SubjectId == visitTask.SubjectId
|
||||
&& x.ReadingCategory == ReadingCategory.Visit && x.VisitTaskNum <= visitTask.VisitTaskNum).Select(x => x.Id).ToListAsync();
|
||||
&& x.SubjectId == visitTask.SubjectId
|
||||
&& x.ReadingCategory == ReadingCategory.Visit && x.VisitTaskNum <= visitTask.VisitTaskNum).Select(x => x.Id).ToListAsync();
|
||||
|
||||
|
||||
var globalVisitQuestionQuery = from questionAnswer in _readingTaskQuestionAnswerRepository.Where(x => GlobalVisitTaskIds.Contains(x.VisitTaskId))
|
||||
@@ -619,8 +617,8 @@ namespace IRaCIS.Application.Services
|
||||
AnswerCombination = question.AnswerCombination,
|
||||
JudgeType = question.JudgeType,
|
||||
QuestionId = question.Id,
|
||||
JudgeDifferenceValue=question.JudgeDifferenceValue,
|
||||
JudgeDifferenceType=question.JudgeDifferenceType,
|
||||
JudgeDifferenceValue = question.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = question.JudgeDifferenceType,
|
||||
VisitTaskId = questionAnswer.VisitTaskId,
|
||||
};
|
||||
var globalVisitAnswerlist = await globalVisitQuestionQuery.ToListAsync();
|
||||
@@ -629,15 +627,15 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
foreach (var item in taskNums)
|
||||
{
|
||||
List<GroupTaskAnswerDto> groupTasks = globalVisitAnswerlist.Where(x => x.VisitTaskNum == item).GroupBy(x => new {x.JudgeDifferenceValue,x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
|
||||
List<GroupTaskAnswerDto> groupTasks = globalVisitAnswerlist.Where(x => x.VisitTaskNum == item).GroupBy(x => new { x.JudgeDifferenceValue, x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
|
||||
{
|
||||
QuestionId = x.Key.QuestionId,
|
||||
AnswerGroup = x.Key.AnswerGroup,
|
||||
AnswerCombination = x.Key.AnswerCombination,
|
||||
JudgeType = x.Key.JudgeType,
|
||||
JudgeDifferenceValue=x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
JudgeDifferenceValue = x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
}).ToList();
|
||||
noteEqual = noteEqual || ComputeJudgeResult(groupTasks);
|
||||
}
|
||||
@@ -654,22 +652,22 @@ namespace IRaCIS.Application.Services
|
||||
AnswerCombination = question.AnswerCombination,
|
||||
JudgeType = question.JudgeType,
|
||||
QuestionId = question.Id,
|
||||
JudgeDifferenceValue=question.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = question.JudgeDifferenceType,
|
||||
VisitTaskId = questionAnswet.VisitTaskId,
|
||||
JudgeDifferenceValue = question.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = question.JudgeDifferenceType,
|
||||
VisitTaskId = questionAnswet.VisitTaskId,
|
||||
};
|
||||
var questionAnswerlist = await query.ToListAsync();
|
||||
|
||||
// 将答案进行分组
|
||||
List<GroupTaskAnswerDto> groupTasks = questionAnswerlist.GroupBy(x => new {x.JudgeDifferenceValue,x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
|
||||
List<GroupTaskAnswerDto> groupTasks = questionAnswerlist.GroupBy(x => new { x.JudgeDifferenceValue, x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
|
||||
{
|
||||
QuestionId = x.Key.QuestionId,
|
||||
AnswerGroup = x.Key.AnswerGroup,
|
||||
AnswerCombination = x.Key.AnswerCombination,
|
||||
JudgeType = x.Key.JudgeType,
|
||||
JudgeDifferenceValue=x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
JudgeDifferenceValue = x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
}).ToList();
|
||||
noteEqual = ComputeJudgeResult(groupTasks);
|
||||
}
|
||||
@@ -710,16 +708,16 @@ namespace IRaCIS.Application.Services
|
||||
twoItem.AfterQuestionList.Where(x => x.QuestionId != null && x.IsJudgeQuestion).ToList()
|
||||
).ToList();
|
||||
|
||||
List<GroupTaskAnswerDto> globalGroupTasks = newlist.GroupBy(x => new { x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination,x.JudgeDifferenceValue,x.JudgeDifferenceType }).Select(x => new GroupTaskAnswerDto
|
||||
List<GroupTaskAnswerDto> globalGroupTasks = newlist.GroupBy(x => new { x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination, x.JudgeDifferenceValue, x.JudgeDifferenceType }).Select(x => new GroupTaskAnswerDto
|
||||
{
|
||||
QuestionId = x.Key.QuestionId!.Value,
|
||||
AnswerGroup = x.Key.AnswerGroup,
|
||||
AnswerCombination = x.Key.AnswerCombination,
|
||||
JudgeType = x.Key.JudgeType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
JudgeDifferenceValue= x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
}).ToList();
|
||||
JudgeDifferenceValue = x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
}).ToList();
|
||||
noteEqual = noteEqual || ComputeJudgeResult(globalGroupTasks);
|
||||
}
|
||||
|
||||
@@ -762,9 +760,9 @@ namespace IRaCIS.Application.Services
|
||||
AnswerCombination = question.AnswerCombination,
|
||||
JudgeType = question.JudgeType,
|
||||
QuestionId = question.Id,
|
||||
JudgeDifferenceValue=question.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = question.JudgeDifferenceType,
|
||||
};
|
||||
JudgeDifferenceValue = question.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = question.JudgeDifferenceType,
|
||||
};
|
||||
|
||||
var visitTaskQuestions = await query.ToListAsync();
|
||||
|
||||
@@ -772,15 +770,15 @@ namespace IRaCIS.Application.Services
|
||||
lastTask.AfterQuestionList.Where(x => x.QuestionId != null).ToList()
|
||||
).ToList();
|
||||
|
||||
List<GroupTaskAnswerDto> globalGroupTasks = newlist.GroupBy(x => new {x.JudgeDifferenceValue,x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
|
||||
List<GroupTaskAnswerDto> globalGroupTasks = newlist.GroupBy(x => new { x.JudgeDifferenceValue, x.JudgeDifferenceType, x.QuestionId, x.AnswerGroup, x.JudgeType, x.AnswerCombination }).Select(x => new GroupTaskAnswerDto
|
||||
{
|
||||
QuestionId = x.Key.QuestionId!.Value,
|
||||
AnswerGroup = x.Key.AnswerGroup,
|
||||
AnswerCombination = x.Key.AnswerCombination,
|
||||
JudgeType = x.Key.JudgeType,
|
||||
JudgeDifferenceValue=x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
JudgeDifferenceValue = x.Key.JudgeDifferenceValue,
|
||||
JudgeDifferenceType = x.Key.JudgeDifferenceType,
|
||||
TaskAnswerList = x.Select(y => y.Answer).ToList(),
|
||||
}).ToList();
|
||||
noteEqual = noteEqual || ComputeJudgeResult(globalGroupTasks);
|
||||
}
|
||||
@@ -822,7 +820,7 @@ namespace IRaCIS.Application.Services
|
||||
IsGroupDiffArm2 = true
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
await _visitTaskRepository.SaveChangesAsync();
|
||||
|
||||
}
|
||||
@@ -853,7 +851,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (visitTask.IsAnalysisCreate)
|
||||
{
|
||||
|
||||
|
||||
|
||||
if (groupArm == null)
|
||||
{
|
||||
@@ -902,8 +900,8 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
else if (noteEqual)
|
||||
{
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
var taskAnswer1 = item.TaskAnswerList[0];
|
||||
|
||||
+7
-10
@@ -1,15 +1,12 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using MassTransit;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using DocumentFormat.OpenXml.EMMA;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
|
||||
+153
-156
@@ -1,21 +1,17 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using MassTransit;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using AutoMapper;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using Newtonsoft.Json;
|
||||
using IRaCIS.Core.Application.Service;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 肿瘤学
|
||||
/// </summary>
|
||||
@@ -32,7 +28,7 @@ namespace IRaCIS.Application.Services
|
||||
[HttpPost]
|
||||
public async Task<GetOncologyReadingInfoOutDto> GetOncologyReadingInfo(GetOncologyReadingInfoInDto inDto)
|
||||
{
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x=>x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
|
||||
if (taskInfo.ReadingCategory != ReadingCategory.Oncology)
|
||||
{
|
||||
@@ -58,16 +54,16 @@ namespace IRaCIS.Application.Services
|
||||
Guid? judgeResultTaskId = null;
|
||||
if (taskInfo.ReadingTaskState == ReadingTaskState.HaveSigned && relatedVisitTaskIdList.Count() > 0)
|
||||
{
|
||||
judgeResultTaskId = await _visitTaskRepository.Where(x => x.Id == relatedVisitTaskIdList[0]).Select(x => x.JudgeResultTaskId).FirstOrDefaultAsync();
|
||||
judgeResultTaskId = await _visitTaskRepository.Where(x => x.Id == relatedVisitTaskIdList[0]).Select(x => x.JudgeResultTaskId).FirstOrDefaultAsync();
|
||||
|
||||
// 说明是裁判 取裁判结果
|
||||
if (judgeResultTaskId != null)
|
||||
{
|
||||
globalOrVisitTaskInfo = await _visitTaskRepository.Where(x =>x.Id== judgeResultTaskId).FirstNotNullAsync();
|
||||
globalOrVisitTaskInfo = await _visitTaskRepository.Where(x => x.Id == judgeResultTaskId).FirstNotNullAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
globalOrVisitTaskInfo = await _visitTaskRepository.Where(x => x.Id == relatedVisitTaskIdList[0]).FirstNotNullAsync();
|
||||
globalOrVisitTaskInfo = await _visitTaskRepository.Where(x => x.Id == relatedVisitTaskIdList[0]).FirstNotNullAsync();
|
||||
}
|
||||
|
||||
|
||||
@@ -80,26 +76,26 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
// 访视
|
||||
(decimal)(taskInfo.VisitTaskNum - ReadingCommon.TaskNumDic[ReadingCategory.Oncology])
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
|
||||
globalOrVisitTaskInfo = await _visitTaskRepository
|
||||
|
||||
globalOrVisitTaskInfo = await _visitTaskRepository
|
||||
.Where(x => x.SubjectId == taskInfo.SubjectId &&
|
||||
x.TaskState == TaskState.Effect &&
|
||||
x.TrialReadingCriterionId == taskInfo.TrialReadingCriterionId &&
|
||||
taskNums.Contains(x.VisitTaskNum) &&
|
||||
taskNums.Contains(x.VisitTaskNum) &&
|
||||
x.IsAnalysisCreate == taskInfo.IsAnalysisCreate &&
|
||||
x.IsSelfAnalysis == taskInfo.IsSelfAnalysis &&
|
||||
x.VisitTaskNum < taskInfo.VisitTaskNum
|
||||
)
|
||||
.WhereIf(taskInfo.TrialReadingCriterion.IsGlobalReading, x=>x.ReadingCategory == ReadingCategory.Global)
|
||||
.WhereIf(!taskInfo.TrialReadingCriterion.IsGlobalReading, x => x.ReadingCategory == ReadingCategory.Visit)
|
||||
.OrderByDescending(x=>x.VisitTaskNum).ThenBy(x => x.ArmEnum)
|
||||
.WhereIf(taskInfo.TrialReadingCriterion.IsGlobalReading, x => x.ReadingCategory == ReadingCategory.Global)
|
||||
.WhereIf(!taskInfo.TrialReadingCriterion.IsGlobalReading, x => x.ReadingCategory == ReadingCategory.Visit)
|
||||
.OrderByDescending(x => x.VisitTaskNum).ThenBy(x => x.ArmEnum)
|
||||
.FirstNotNullAsync();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 最后取哪组的数据
|
||||
@@ -125,23 +121,23 @@ namespace IRaCIS.Application.Services
|
||||
throw new BusinessValidationFailedException(_localizer["ReadingOncology_Abnormal"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//visitTask = await _visitTaskRepository.Where(x => x.Id == judgeResultTaskId).FirstNotNullAsync();
|
||||
visitTaskIdList= await _visitTaskRepository.Where(x => x.Id == judgeResultTaskId).Select(x=>x.RelatedVisitTaskIdList).FirstNotNullAsync();
|
||||
visitTaskIdList = await _visitTaskRepository.Where(x => x.Id == judgeResultTaskId).Select(x => x.RelatedVisitTaskIdList).FirstNotNullAsync();
|
||||
globalOrVisitTaskInfo = await _visitTaskRepository.Where(x => x.Id == judgeResultTaskId).FirstNotNullAsync();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
result.RelatedTaskId = globalOrVisitTaskInfo!.JudgeVisitTaskId ?? globalOrVisitTaskInfo.Id;
|
||||
result.RelatedTaskId = globalOrVisitTaskInfo!.JudgeVisitTaskId ?? globalOrVisitTaskInfo.Id;
|
||||
result.ReadingCategory = globalOrVisitTaskInfo.ReadingCategory;
|
||||
|
||||
result.GlobalOrVisitTaskId = globalOrVisitTaskInfo.Id;
|
||||
result.GlobalOrVisitTaskId = globalOrVisitTaskInfo.Id;
|
||||
result.SubjectId = globalOrVisitTaskInfo.SubjectId;
|
||||
|
||||
|
||||
List<GlobalVisitInfo> globalVisits=new List<GlobalVisitInfo>();
|
||||
List<GlobalVisitInfo> globalVisits = new List<GlobalVisitInfo>();
|
||||
|
||||
if (result.ReadingCategory == ReadingCategory.Global)
|
||||
{
|
||||
@@ -155,61 +151,61 @@ namespace IRaCIS.Application.Services
|
||||
else
|
||||
{
|
||||
// 按照全局那边的查询法
|
||||
globalVisits =await _visitTaskRepository.Where(x =>
|
||||
x.TrialId == globalOrVisitTaskInfo.TrialId &&
|
||||
x.SubjectId == globalOrVisitTaskInfo.SubjectId &&
|
||||
x.ReadingCategory == ReadingCategory.Visit &&
|
||||
x.TrialReadingCriterionId == globalOrVisitTaskInfo.TrialReadingCriterionId &&
|
||||
x.ReadingTaskState == ReadingTaskState.HaveSigned &&
|
||||
x.IsAnalysisCreate == globalOrVisitTaskInfo.IsAnalysisCreate &&
|
||||
x.ArmEnum == globalOrVisitTaskInfo.ArmEnum &&
|
||||
x.IsSelfAnalysis == globalOrVisitTaskInfo.IsSelfAnalysis &&
|
||||
x.DoctorUserId == globalOrVisitTaskInfo.DoctorUserId &&
|
||||
x.TaskState == TaskState.Effect &&
|
||||
x.VisitTaskNum <= globalOrVisitTaskInfo.VisitTaskNum)
|
||||
.OrderBy(x => x.VisitTaskNum).Select(x => new GlobalVisitInfo()
|
||||
{
|
||||
VisitName = x.TaskName,
|
||||
BlindName = x.TaskBlindName,
|
||||
VisitTaskId = x.Id,
|
||||
IsConvertedTask = x.IsConvertedTask,
|
||||
IsFirstChangeTask = x.IsConvertedTask && x.BeforeConvertedTaskId != null,
|
||||
ArmEnum = globalOrVisitTaskInfo.ArmEnum,
|
||||
VisitNum = x.SourceSubjectVisit.VisitNum,
|
||||
IsBaseLine = x.SourceSubjectVisit.IsBaseLine,
|
||||
VisitId = x.SourceSubjectVisitId!.Value,
|
||||
LesionCountList = x.LesionList.GroupBy(y => y.ReadingQuestionTrial.LesionType).Select(x => new LesionDto
|
||||
{
|
||||
LesionType = x.Key!.Value,
|
||||
Count = x.ToList().Count()
|
||||
}).ToList(),
|
||||
//CrterionDictionaryGroup= x.CrterionDictionaryGroup,
|
||||
AfterQuestionList = x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.GlobalReadingShowType != GlobalReadingShowType.NotShow).OrderBy(y => y.ReadingQuestionTrial.ShowOrder)
|
||||
.Select(y => new GlobalQuestionInfo()
|
||||
{
|
||||
globalVisits = await _visitTaskRepository.Where(x =>
|
||||
x.TrialId == globalOrVisitTaskInfo.TrialId &&
|
||||
x.SubjectId == globalOrVisitTaskInfo.SubjectId &&
|
||||
x.ReadingCategory == ReadingCategory.Visit &&
|
||||
x.TrialReadingCriterionId == globalOrVisitTaskInfo.TrialReadingCriterionId &&
|
||||
x.ReadingTaskState == ReadingTaskState.HaveSigned &&
|
||||
x.IsAnalysisCreate == globalOrVisitTaskInfo.IsAnalysisCreate &&
|
||||
x.ArmEnum == globalOrVisitTaskInfo.ArmEnum &&
|
||||
x.IsSelfAnalysis == globalOrVisitTaskInfo.IsSelfAnalysis &&
|
||||
x.DoctorUserId == globalOrVisitTaskInfo.DoctorUserId &&
|
||||
x.TaskState == TaskState.Effect &&
|
||||
x.VisitTaskNum <= globalOrVisitTaskInfo.VisitTaskNum)
|
||||
.OrderBy(x => x.VisitTaskNum).Select(x => new GlobalVisitInfo()
|
||||
{
|
||||
VisitName = x.TaskName,
|
||||
BlindName = x.TaskBlindName,
|
||||
VisitTaskId = x.Id,
|
||||
IsConvertedTask = x.IsConvertedTask,
|
||||
IsFirstChangeTask = x.IsConvertedTask && x.BeforeConvertedTaskId != null,
|
||||
ArmEnum = globalOrVisitTaskInfo.ArmEnum,
|
||||
VisitNum = x.SourceSubjectVisit.VisitNum,
|
||||
IsBaseLine = x.SourceSubjectVisit.IsBaseLine,
|
||||
VisitId = x.SourceSubjectVisitId!.Value,
|
||||
LesionCountList = x.LesionList.GroupBy(y => y.ReadingQuestionTrial.LesionType).Select(x => new LesionDto
|
||||
{
|
||||
LesionType = x.Key!.Value,
|
||||
Count = x.ToList().Count()
|
||||
}).ToList(),
|
||||
//CrterionDictionaryGroup= x.CrterionDictionaryGroup,
|
||||
AfterQuestionList = x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.GlobalReadingShowType != GlobalReadingShowType.NotShow).OrderBy(y => y.ReadingQuestionTrial.ShowOrder)
|
||||
.Select(y => new GlobalQuestionInfo()
|
||||
{
|
||||
|
||||
QuestionId = y.ReadingQuestionTrialId,
|
||||
QuestionName = y.ReadingQuestionTrial.QuestionName.LanguageName(y.ReadingQuestionTrial.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionEnName = y.ReadingQuestionTrial.QuestionEnName,
|
||||
AnswerGroup = y.ReadingQuestionTrial.AnswerGroup,
|
||||
QuestionType = y.ReadingQuestionTrial.QuestionType,
|
||||
LimitEdit = y.ReadingQuestionTrial.LimitEdit,
|
||||
MaxAnswerLength = y.ReadingQuestionTrial.MaxAnswerLength,
|
||||
FileType = y.ReadingQuestionTrial.FileType,
|
||||
QuestionGenre = y.ReadingQuestionTrial.QuestionGenre,
|
||||
DictionaryCode = y.ReadingQuestionTrial.DictionaryCode,
|
||||
GlobalReadingShowType = y.ReadingQuestionTrial.GlobalReadingShowType,
|
||||
AnswerCombination = y.ReadingQuestionTrial.AnswerCombination,
|
||||
JudgeType = y.ReadingQuestionTrial.JudgeType,
|
||||
ShowOrder = y.ReadingQuestionTrial.ShowOrder,
|
||||
Type = y.ReadingQuestionTrial.Type,
|
||||
TypeValue = y.ReadingQuestionTrial.TypeValue,
|
||||
ValueType = y.ReadingQuestionTrial.ValueType,
|
||||
IsJudgeQuestion = y.ReadingQuestionTrial.IsJudgeQuestion,
|
||||
Answer = y.Answer,
|
||||
}).ToList()
|
||||
}).ToListAsync();
|
||||
}
|
||||
QuestionId = y.ReadingQuestionTrialId,
|
||||
QuestionName = y.ReadingQuestionTrial.QuestionName.LanguageName(y.ReadingQuestionTrial.QuestionEnName, _userInfo.IsEn_Us),
|
||||
QuestionEnName = y.ReadingQuestionTrial.QuestionEnName,
|
||||
AnswerGroup = y.ReadingQuestionTrial.AnswerGroup,
|
||||
QuestionType = y.ReadingQuestionTrial.QuestionType,
|
||||
LimitEdit = y.ReadingQuestionTrial.LimitEdit,
|
||||
MaxAnswerLength = y.ReadingQuestionTrial.MaxAnswerLength,
|
||||
FileType = y.ReadingQuestionTrial.FileType,
|
||||
QuestionGenre = y.ReadingQuestionTrial.QuestionGenre,
|
||||
DictionaryCode = y.ReadingQuestionTrial.DictionaryCode,
|
||||
GlobalReadingShowType = y.ReadingQuestionTrial.GlobalReadingShowType,
|
||||
AnswerCombination = y.ReadingQuestionTrial.AnswerCombination,
|
||||
JudgeType = y.ReadingQuestionTrial.JudgeType,
|
||||
ShowOrder = y.ReadingQuestionTrial.ShowOrder,
|
||||
Type = y.ReadingQuestionTrial.Type,
|
||||
TypeValue = y.ReadingQuestionTrial.TypeValue,
|
||||
ValueType = y.ReadingQuestionTrial.ValueType,
|
||||
IsJudgeQuestion = y.ReadingQuestionTrial.IsJudgeQuestion,
|
||||
Answer = y.Answer,
|
||||
}).ToList()
|
||||
}).ToListAsync();
|
||||
}
|
||||
|
||||
// 找到对应的访视
|
||||
List<OncologyVisitTaskInfo> oncologyVisits = await _visitTaskRepository.Where(x => visitTaskIdList.Contains(x.Id))
|
||||
@@ -217,9 +213,9 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
VisitName = x.SourceSubjectVisit.VisitName,
|
||||
IsBaseLine = x.SourceSubjectVisit.IsBaseLine,
|
||||
VisitNum=x.SourceSubjectVisit.VisitNum,
|
||||
VisitNum = x.SourceSubjectVisit.VisitNum,
|
||||
|
||||
VisitTaskId = x.Id,
|
||||
VisitTaskId = x.Id,
|
||||
// QuestionList = x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.IsJudgeQuestion).OrderBy(y => y.ReadingQuestionTrial.ShowOrder)
|
||||
//.Select(y => new OncologyQuestion()
|
||||
//{
|
||||
@@ -229,7 +225,7 @@ namespace IRaCIS.Application.Services
|
||||
//}).ToList()
|
||||
}).ToListAsync();
|
||||
|
||||
var oncologyReadingQuestions = await _readingOncologyTaskInfoRepository.Where(x => x.OncologyTaskId == inDto.VisitTaskId).Include(x=>x.VisitTask).ToListAsync();
|
||||
var oncologyReadingQuestions = await _readingOncologyTaskInfoRepository.Where(x => x.OncologyTaskId == inDto.VisitTaskId).Include(x => x.VisitTask).ToListAsync();
|
||||
// 上一次肿瘤学阅片
|
||||
|
||||
var lastOncologyTask = await _visitTaskRepository.Where(x =>
|
||||
@@ -241,56 +237,56 @@ namespace IRaCIS.Application.Services
|
||||
&& x.VisitTaskNum < taskInfo.VisitTaskNum
|
||||
).OrderByDescending(x => x.VisitTaskNum).FirstOrDefaultAsync();
|
||||
|
||||
List<ReadingOncologyTaskInfo> lastOncologyAnswerList= new List<ReadingOncologyTaskInfo>();
|
||||
List<ReadingOncologyTaskInfo> lastOncologyAnswerList = new List<ReadingOncologyTaskInfo>();
|
||||
|
||||
if (lastOncologyTask != null&& taskInfo.TaskState==TaskState.Effect&&taskInfo.ReadingTaskState!=ReadingTaskState.HaveSigned)
|
||||
if (lastOncologyTask != null && taskInfo.TaskState == TaskState.Effect && taskInfo.ReadingTaskState != ReadingTaskState.HaveSigned)
|
||||
{
|
||||
lastOncologyAnswerList= await _readingOncologyTaskInfoRepository.Where(x => x.OncologyTaskId == lastOncologyTask.Id).Include(x => x.VisitTask).ToListAsync();
|
||||
lastOncologyAnswerList = await _readingOncologyTaskInfoRepository.Where(x => x.OncologyTaskId == lastOncologyTask.Id).Include(x => x.VisitTask).ToListAsync();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
oncologyVisits.ForEach(x =>
|
||||
oncologyVisits.ForEach(x =>
|
||||
{
|
||||
var oncologyData = oncologyReadingQuestions.Where(y => y.VisitTaskId == x.VisitTaskId).FirstOrDefault();
|
||||
/// 根据任务编号匹配 不区分 r1 r2
|
||||
var lastOncologyData = lastOncologyAnswerList.Where(y => y.VisitTask.VisitTaskNum == x.VisitNum).FirstOrDefault();
|
||||
|
||||
var evaluationResult = string.Empty;
|
||||
var evaluationReason = string.Empty;
|
||||
if (oncologyData != null && !oncologyData.EvaluationResult.IsNullOrEmpty())
|
||||
var evaluationReason = string.Empty;
|
||||
if (oncologyData != null && !oncologyData.EvaluationResult.IsNullOrEmpty())
|
||||
{
|
||||
evaluationResult = oncologyData.EvaluationResult;
|
||||
}
|
||||
else if (lastOncologyData != null && !lastOncologyData.EvaluationResult.IsNullOrEmpty())
|
||||
{
|
||||
evaluationResult = lastOncologyData.EvaluationResult;
|
||||
}
|
||||
evaluationResult = lastOncologyData.EvaluationResult;
|
||||
}
|
||||
|
||||
|
||||
if (oncologyData != null && !oncologyData.EvaluationReason.IsNullOrEmpty())
|
||||
{
|
||||
evaluationReason = oncologyData.EvaluationReason;
|
||||
}
|
||||
else if (lastOncologyData != null && !lastOncologyData.EvaluationReason.IsNullOrEmpty())
|
||||
{
|
||||
evaluationReason = lastOncologyData.EvaluationReason;
|
||||
}
|
||||
if (oncologyData != null && !oncologyData.EvaluationReason.IsNullOrEmpty())
|
||||
{
|
||||
evaluationReason = oncologyData.EvaluationReason;
|
||||
}
|
||||
else if (lastOncologyData != null && !lastOncologyData.EvaluationReason.IsNullOrEmpty())
|
||||
{
|
||||
evaluationReason = lastOncologyData.EvaluationReason;
|
||||
}
|
||||
|
||||
|
||||
x.EvaluationResult = evaluationResult;
|
||||
x.EvaluationReason = evaluationReason;
|
||||
x.EvaluationResult = evaluationResult;
|
||||
x.EvaluationReason = evaluationReason;
|
||||
|
||||
x.QuestionList = globalVisits.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Where(x => x.GlobalAnswerType == GlobalAnswerType.Question)
|
||||
x.QuestionList = globalVisits.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Where(x => x.GlobalAnswerType == GlobalAnswerType.Question)
|
||||
.Select(y => new OncologyQuestion
|
||||
{
|
||||
QuestionId = y.QuestionId ?? default(Guid),
|
||||
QuestionName = y.QuestionName,
|
||||
QuestionGenre=y.QuestionGenre,
|
||||
DictionaryCode=y.DictionaryCode,
|
||||
QuestionGenre = y.QuestionGenre,
|
||||
DictionaryCode = y.DictionaryCode,
|
||||
Answer = y.Answer
|
||||
}).ToList();
|
||||
x.IsHaveChange = result.ReadingCategory == ReadingCategory.Visit?false: globalVisits.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Any(y => y.IsHaveChange);
|
||||
x.IsHaveChange = result.ReadingCategory == ReadingCategory.Visit ? false : globalVisits.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Any(y => y.IsHaveChange);
|
||||
x.VisitRemark = result.ReadingCategory == ReadingCategory.Visit ? string.Empty : globalVisits.Where(y => x.VisitTaskId == y.VisitTaskId).SelectMany(y => y.AfterQuestionList).Where(y => y.GlobalAnswerType == GlobalAnswerType.Reason).Select(x => x.Answer).FirstOrDefault() ?? string.Empty;
|
||||
|
||||
});
|
||||
@@ -343,7 +339,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
await _readingOncologyTaskInfoRepository.AddRangeAsync(readingOncologies);
|
||||
|
||||
var relatedVisitTaskIdList=new List<Guid>();
|
||||
var relatedVisitTaskIdList = new List<Guid>();
|
||||
relatedVisitTaskIdList.Add(inDto.RelatedTaskId);
|
||||
|
||||
var relatedVisitTaskIds = JsonConvert.SerializeObject(relatedVisitTaskIdList);
|
||||
@@ -352,7 +348,7 @@ namespace IRaCIS.Application.Services
|
||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == inDto.OncologyTaskId, u => new VisitTask()
|
||||
{
|
||||
RelatedVisitTaskIds = relatedVisitTaskIds
|
||||
}) ;
|
||||
});
|
||||
|
||||
var result = await _readingOncologyTaskInfoRepository.SaveChangesAsync();
|
||||
|
||||
@@ -377,7 +373,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
var readModuleInfo = await _readModuleRepository.Where(x => x.Id == oncologModuleId && x.ModuleType == ModuleTypeEnum.Oncology).FirstOrDefaultAsync();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// 如果当前是肿瘤学
|
||||
@@ -386,21 +382,21 @@ namespace IRaCIS.Application.Services
|
||||
// 先找到对应的全局阅片模块Id
|
||||
var isGlobalReading = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == readModuleInfo.TrialReadingCriterionId).Select(x => x.IsGlobalReading).FirstOrDefaultAsync();
|
||||
|
||||
var globalOrVisitTaskId = default(Guid);
|
||||
var globalOrVisitTaskId = default(Guid);
|
||||
var globalreadModule = await _readModuleRepository.Where(x => x.SubjectVisitId == readModuleInfo.SubjectVisitId &&
|
||||
x.TrialReadingCriterionId== readModuleInfo.TrialReadingCriterionId&&
|
||||
x.ModuleType == ModuleTypeEnum.Global).Include(x=>x.SubjectVisit).FirstOrDefaultAsync();
|
||||
// 获取系统配置
|
||||
var readingType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == readModuleInfo.TrialReadingCriterionId).Select(x => x.ReadingType).FirstOrDefaultAsync();
|
||||
if (globalreadModule != null&& isGlobalReading)
|
||||
x.TrialReadingCriterionId == readModuleInfo.TrialReadingCriterionId &&
|
||||
x.ModuleType == ModuleTypeEnum.Global).Include(x => x.SubjectVisit).FirstOrDefaultAsync();
|
||||
// 获取系统配置
|
||||
var readingType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == readModuleInfo.TrialReadingCriterionId).Select(x => x.ReadingType).FirstOrDefaultAsync();
|
||||
if (globalreadModule != null && isGlobalReading)
|
||||
{
|
||||
// 找到一个全局阅片任务是否有裁判任务
|
||||
|
||||
globalOrVisitTaskId = await _visitTaskRepository.Where(x => x.SouceReadModuleId == globalreadModule.Id && x.TaskState == TaskState.Effect
|
||||
&& x.ReadingCategory == ReadingCategory.Global
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned).Select(x => x.Id).FirstOrDefaultAsync();
|
||||
&& x.ReadingCategory == ReadingCategory.Global
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned).Select(x => x.Id).FirstOrDefaultAsync();
|
||||
|
||||
var judgeVisitTaskId = await _visitTaskRepository.Where(x => x.SouceReadModuleId == globalreadModule.Id && x.TaskState == TaskState.Effect
|
||||
var judgeVisitTaskId = await _visitTaskRepository.Where(x => x.SouceReadModuleId == globalreadModule.Id && x.TaskState == TaskState.Effect
|
||||
&& x.ReadingCategory == ReadingCategory.Global
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned).Select(x => x.JudgeVisitTaskId).FirstOrDefaultAsync();
|
||||
|
||||
@@ -414,7 +410,7 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 判断阅片是否完成
|
||||
if (judgeVisitTaskId == null && (await _visitTaskRepository.Where(x => x.SouceReadModuleId == globalreadModule.Id && x.TaskState == TaskState.Effect && x.ReadingCategory == ReadingCategory.Global
|
||||
@@ -430,42 +426,43 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
}
|
||||
|
||||
else {
|
||||
else
|
||||
{
|
||||
|
||||
var visitTask = await _visitTaskRepository.Where(x => x.SourceSubjectVisitId == readModuleInfo.SubjectVisitId && x.TaskState == TaskState.Effect
|
||||
&& x.TrialReadingCriterionId == readModuleInfo.TrialReadingCriterionId
|
||||
&& x.ReadingCategory==ReadingCategory.Visit
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned).FirstNotNullAsync();
|
||||
&& x.TrialReadingCriterionId == readModuleInfo.TrialReadingCriterionId
|
||||
&& x.ReadingCategory == ReadingCategory.Visit
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned).FirstNotNullAsync();
|
||||
|
||||
globalOrVisitTaskId = visitTask.Id;
|
||||
|
||||
var judgeVisitTaskId = visitTask.JudgeVisitTaskId;
|
||||
|
||||
// 要判断是否为老裁判任务的Id
|
||||
if (judgeVisitTaskId != null)
|
||||
{
|
||||
// 如果不存在有效的裁判
|
||||
if (!(await _visitTaskRepository.AnyAsync(x => x.Id == judgeVisitTaskId && x.TaskState == TaskState.Effect)))
|
||||
{
|
||||
judgeVisitTaskId = null;
|
||||
}
|
||||
}
|
||||
// 要判断是否为老裁判任务的Id
|
||||
if (judgeVisitTaskId != null)
|
||||
{
|
||||
// 如果不存在有效的裁判
|
||||
if (!(await _visitTaskRepository.AnyAsync(x => x.Id == judgeVisitTaskId && x.TaskState == TaskState.Effect)))
|
||||
{
|
||||
judgeVisitTaskId = null;
|
||||
}
|
||||
}
|
||||
|
||||
// 判断阅片是否完成
|
||||
if (judgeVisitTaskId == null && (await _visitTaskRepository.Where(x => x.SourceSubjectVisitId == readModuleInfo.SubjectVisitId && x.TaskState == TaskState.Effect
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned && !x.IsAnalysisCreate && x.TrialReadingCriterionId == readModuleInfo.TrialReadingCriterionId
|
||||
).CountAsync() == (int)readingType))
|
||||
{
|
||||
// 判断阅片是否完成
|
||||
if (judgeVisitTaskId == null && (await _visitTaskRepository.Where(x => x.SourceSubjectVisitId == readModuleInfo.SubjectVisitId && x.TaskState == TaskState.Effect
|
||||
&& x.ReadingTaskState == ReadingTaskState.HaveSigned && !x.IsAnalysisCreate && x.TrialReadingCriterionId == readModuleInfo.TrialReadingCriterionId
|
||||
).CountAsync() == (int)readingType))
|
||||
{
|
||||
|
||||
finishReading = true;
|
||||
}
|
||||
else if (judgeVisitTaskId != null && (await _visitTaskRepository.AnyAsync(x => x.Id == judgeVisitTaskId.Value && x.JudgeResultTaskId != null && x.ReadingTaskState == ReadingTaskState.HaveSigned)))
|
||||
{
|
||||
finishReading = true;
|
||||
}
|
||||
finishReading = true;
|
||||
}
|
||||
else if (judgeVisitTaskId != null && (await _visitTaskRepository.AnyAsync(x => x.Id == judgeVisitTaskId.Value && x.JudgeResultTaskId != null && x.ReadingTaskState == ReadingTaskState.HaveSigned)))
|
||||
{
|
||||
finishReading = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (finishReading)
|
||||
{
|
||||
@@ -475,7 +472,7 @@ namespace IRaCIS.Application.Services
|
||||
SubjectId = readModuleInfo.SubjectId,
|
||||
ReadingId = readModuleInfo.Id,
|
||||
TrialId = readModuleInfo.TrialId,
|
||||
TrialReadingCriterionId= readModuleInfo.TrialReadingCriterionId,
|
||||
TrialReadingCriterionId = readModuleInfo.TrialReadingCriterionId,
|
||||
|
||||
});
|
||||
|
||||
@@ -495,7 +492,7 @@ namespace IRaCIS.Application.Services
|
||||
ReadingCategory = ReadingCategory.Oncology,
|
||||
});
|
||||
|
||||
var originalVisit = await _visitTaskRepository.Where(x =>x.Id==globalOrVisitTaskId
|
||||
var originalVisit = await _visitTaskRepository.Where(x => x.Id == globalOrVisitTaskId
|
||||
).OrderByDescending(x => x.VisitTaskNum).ThenBy(x => x.ArmEnum).FirstNotNullAsync();
|
||||
|
||||
var originalVisitId = default(Guid);
|
||||
@@ -509,12 +506,12 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
originalVisitId = originalVisit.Id;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
await _visitTaskHelpeService.AddTaskAsync(new GenerateTaskCommand()
|
||||
{
|
||||
OriginalVisitId= originalVisitId,
|
||||
OriginalVisitId = originalVisitId,
|
||||
ReadingCategory = GenerateTaskCategory.Oncology,
|
||||
TrialId = readModuleInfo.TrialId,
|
||||
ReadingGenerataTaskList = needReadList
|
||||
|
||||
+11
-10
@@ -1,11 +1,11 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
@@ -63,7 +63,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
var organIds = tableAnsweRowInfos.Where(x => x.OrganInfoId != null).Select(x => x.OrganInfoId).Distinct().ToList();
|
||||
var organList = await _organInfoRepository.Where(x => organIds.Contains(x.Id)).ToListAsync();
|
||||
var result=await GetReadingTableQuestion(new GetReadingTableQuestionOrAnswerInDto()
|
||||
var result = await GetReadingTableQuestion(new GetReadingTableQuestionOrAnswerInDto()
|
||||
{
|
||||
|
||||
TrialReadingCriterionId = inDto.ReadingQuestionCriterionTrialId,
|
||||
@@ -114,7 +114,7 @@ namespace IRaCIS.Application.Services
|
||||
LesionType = data.LesionType,
|
||||
QuestionGenre = data.QuestionGenre,
|
||||
DictionaryCode = data.DictionaryCode,
|
||||
GroupId=data.GroupId,
|
||||
GroupId = data.GroupId,
|
||||
ShowOrder = data.ShowOrder,
|
||||
RelevanceId = data.RelevanceId,
|
||||
IsShowInDicom = data.IsShowInDicom,
|
||||
@@ -232,15 +232,16 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
var questionIds = qusetionList.Select(x => x.Id).ToList();
|
||||
var tableQuestionList = await _readingTableQuestionSystemRepository.Where(x => questionIds.Contains(x.ReadingQuestionId))
|
||||
.ProjectTo<TableQuestionDataInfo>(_mapper.ConfigurationProvider,new {
|
||||
isEn_Us=_userInfo.IsEn_Us,
|
||||
.ProjectTo<TableQuestionDataInfo>(_mapper.ConfigurationProvider, new
|
||||
{
|
||||
isEn_Us = _userInfo.IsEn_Us,
|
||||
}).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
|
||||
var groupList = new List<GetSystemReadingQuestionOutDto>();
|
||||
|
||||
//qusetionList = qusetionList.Where(x => x.ParentId == null).ToList();
|
||||
|
||||
groupList = qusetionList.Where(x => x.Type == ReadingQestionType.Group ).ToList();
|
||||
groupList = qusetionList.Where(x => x.Type == ReadingQestionType.Group).ToList();
|
||||
groupList.ForEach(x =>
|
||||
{
|
||||
this.FindSystemChildQuestion(x, qusetionList, tableQuestionList);
|
||||
@@ -270,7 +271,7 @@ namespace IRaCIS.Application.Services
|
||||
Childrens = new List<GetSystemReadingQuestionOutDto>(),
|
||||
ShowOrder = x.ShowOrder,
|
||||
GroupName = string.Empty,
|
||||
|
||||
|
||||
Id = x.Id,
|
||||
Type = x.Type,
|
||||
DictionaryCode = x.DictionaryCode,
|
||||
|
||||
@@ -1,18 +1,13 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using MassTransit;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using System.Linq.Dynamic.Core;
|
||||
using IRaCIS.Core.Application.Service;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.Identity.Client;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Linq.Dynamic.Core;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
/// <summary>
|
||||
/// 生成的阅片模块(在大列表上展示的) 阅片期
|
||||
@@ -572,7 +567,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
});
|
||||
|
||||
var readMouduleQuery = _readModuleRepository.Where(t => t.TrialId == inQuery.TrialId && t.TrialReadingCriterionId==inQuery.TrialReadingCriterionId)
|
||||
var readMouduleQuery = _readModuleRepository.Where(t => t.TrialId == inQuery.TrialId && t.TrialReadingCriterionId == inQuery.TrialReadingCriterionId)
|
||||
.Select(rm => new ReadModuleView()
|
||||
{
|
||||
Id = rm.Id,
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using MassTransit;
|
||||
using IRaCIS.Core.Application.Service;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using MassTransit;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace IRaCIS.Application.Services
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
/// <summary>
|
||||
/// 阅片期配置
|
||||
@@ -27,7 +26,7 @@ namespace IRaCIS.Application.Services
|
||||
IRepository<Subject> _subjectRepository) : BaseService
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -4,10 +4,8 @@
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
/// <summary>
|
||||
@@ -18,7 +16,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
IRepository<Dictionary> _dictionaryRepository,
|
||||
IRepository<ShortcutKey> _shortcutKeyRepository) : BaseService
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -4,58 +4,56 @@
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using IRaCIS.Core.Application.Interfaces;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Infrastructure;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户WL模板
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Reading")]
|
||||
/// <summary>
|
||||
/// 用户WL模板
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(GroupName = "Reading")]
|
||||
public class UserWLTemplateService(
|
||||
IRepository<UserWLTemplate> _userWLTemplateRepository,
|
||||
IRepository<User> _userRepository) : BaseService
|
||||
IRepository<UserWLTemplate> _userWLTemplateRepository,
|
||||
IRepository<User> _userRepository) : BaseService
|
||||
{
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取模板
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<UserWLTemplateView>> GetUserWLTemplateList(UserWLTemplateQuery inQuery)
|
||||
{
|
||||
var userWLTemplateQueryable = _userWLTemplateRepository
|
||||
.Where(x=>x.UserId==_userInfo.Id)
|
||||
.ProjectTo<UserWLTemplateView>(_mapper.ConfigurationProvider);
|
||||
return await userWLTemplateQueryable.ToListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增修改模板
|
||||
/// </summary>
|
||||
/// <param name="addOrEditUserWLTemplate"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> AddOrUpdateUserWLTemplate(UserWLTemplateAddOrEdit addOrEditUserWLTemplate)
|
||||
{
|
||||
addOrEditUserWLTemplate.UserId = _userInfo.Id;
|
||||
if (addOrEditUserWLTemplate.Id == null)
|
||||
{
|
||||
var count = await _userWLTemplateRepository.Where(x => x.UserId == _userInfo.Id).CountAsync();
|
||||
if (count >= 10)
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取模板
|
||||
/// </summary>
|
||||
/// <param name="inQuery"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<List<UserWLTemplateView>> GetUserWLTemplateList(UserWLTemplateQuery inQuery)
|
||||
{
|
||||
var userWLTemplateQueryable = _userWLTemplateRepository
|
||||
.Where(x => x.UserId == _userInfo.Id)
|
||||
.ProjectTo<UserWLTemplateView>(_mapper.ConfigurationProvider);
|
||||
return await userWLTemplateQueryable.ToListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 新增修改模板
|
||||
/// </summary>
|
||||
/// <param name="addOrEditUserWLTemplate"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> AddOrUpdateUserWLTemplate(UserWLTemplateAddOrEdit addOrEditUserWLTemplate)
|
||||
{
|
||||
addOrEditUserWLTemplate.UserId = _userInfo.Id;
|
||||
if (addOrEditUserWLTemplate.Id == null)
|
||||
{
|
||||
var count = await _userWLTemplateRepository.Where(x => x.UserId == _userInfo.Id).CountAsync();
|
||||
if (count >= 10)
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["UserWLTS_MaxTemplate"]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if(await _userWLTemplateRepository.AnyAsync(x=> x.UserId == _userInfo.Id&&x.TemplateName== addOrEditUserWLTemplate.TemplateName&&x.Id!= addOrEditUserWLTemplate.Id))
|
||||
{
|
||||
if (await _userWLTemplateRepository.AnyAsync(x => x.UserId == _userInfo.Id && x.TemplateName == addOrEditUserWLTemplate.TemplateName && x.Id != addOrEditUserWLTemplate.Id))
|
||||
{
|
||||
throw new BusinessValidationFailedException(_localizer["UserWLTS_NameRepeated"]);
|
||||
}
|
||||
|
||||
@@ -65,53 +63,53 @@ namespace IRaCIS.Core.Application.Service
|
||||
}
|
||||
|
||||
var entity = await _userWLTemplateRepository.InsertOrUpdateAsync(addOrEditUserWLTemplate, true);
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
}
|
||||
return ResponseOutput.Ok(entity.Id.ToString());
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除模板
|
||||
/// </summary>
|
||||
/// <param name="userWLTemplateId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{userWLTemplateId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteUserWLTemplate(Guid userWLTemplateId)
|
||||
{
|
||||
var success = await _userWLTemplateRepository.DeleteFromQueryAsync(t => t.Id == userWLTemplateId, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
/// <summary>
|
||||
/// 删除模板
|
||||
/// </summary>
|
||||
/// <param name="userWLTemplateId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpDelete("{userWLTemplateId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteUserWLTemplate(Guid userWLTemplateId)
|
||||
{
|
||||
var success = await _userWLTemplateRepository.DeleteFromQueryAsync(t => t.Id == userWLTemplateId, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取自动切换任务配置
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<object> GetAutoCutNextTask()
|
||||
{
|
||||
/// <summary>
|
||||
/// 获取自动切换任务配置
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<object> GetAutoCutNextTask()
|
||||
{
|
||||
|
||||
return await _userRepository.Where(x=>x.Id==_userInfo.Id).Select(x => new
|
||||
{
|
||||
AutoCutNextTask = x.AutoCutNextTask
|
||||
}).FirstNotNullAsync();
|
||||
}
|
||||
return await _userRepository.Where(x => x.Id == _userInfo.Id).Select(x => new
|
||||
{
|
||||
AutoCutNextTask = x.AutoCutNextTask
|
||||
}).FirstNotNullAsync();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 设置自动切换任务
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SetAutoCutNextTask(SetAutoCutNextTaskInDto inDto)
|
||||
{
|
||||
await _userRepository.UpdatePartialNowNoQueryAsync(_userInfo.Id, x => new User()
|
||||
{
|
||||
/// <summary>
|
||||
/// 设置自动切换任务
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SetAutoCutNextTask(SetAutoCutNextTaskInDto inDto)
|
||||
{
|
||||
await _userRepository.UpdatePartialNowNoQueryAsync(_userInfo.Id, x => new User()
|
||||
{
|
||||
|
||||
AutoCutNextTask = inDto.AutoCutNextTask
|
||||
});
|
||||
AutoCutNextTask = inDto.AutoCutNextTask
|
||||
});
|
||||
|
||||
await _userRepository.SaveChangesAsync ();
|
||||
await _userRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
}
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
using AutoMapper;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Application.Contracts.DTO;
|
||||
using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Application.ViewModel;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
@@ -87,7 +85,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
|
||||
CreateMap<ReadingTableQuestionAnswer, TableQuestionAnswerInfo>()
|
||||
|
||||
|
||||
.ForMember(d => d.QuestionMark, u => u.MapFrom(s => s.ReadingTableQuestionTrial == null ? null : s.ReadingTableQuestionTrial.QuestionMark));
|
||||
|
||||
CreateMap<AddOrUpdateTumorAssessmentInDto, TumorAssessment_RECIST1Point1>();
|
||||
@@ -164,7 +162,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
CreateMap<ReadingTableAnswerRowInfo, CopyTableAnswerRowInfo>()
|
||||
.ForMember(d => d.OriginalId, u => u.MapFrom(s => s.Id));
|
||||
|
||||
|
||||
//.ForMember(dest => dest.Instance, opt => opt.Ignore())
|
||||
//.ForMember(dest => dest.ReadingQuestionTrial, opt => opt.Ignore());
|
||||
|
||||
@@ -283,17 +281,17 @@ namespace IRaCIS.Core.Application.Service
|
||||
CreateMap<AddOrUpdateReadingQuestionCriterionSystemInDto, ReadingQuestionCriterionSystem>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
CreateMap<ReadingQuestionCriterionSystem, ReadingQuestionCriterionSystemView>()
|
||||
|
||||
|
||||
.ForMember(d => d.QuestionCount, u => u.MapFrom(s => s.ReadingQuestionSystemList.Count()));
|
||||
//.ForMember(d => d.IsEnable, u => u.MapFrom(s => s.Dictionary.IsEnable))
|
||||
//.ForMember(d => d.ShowOrder, u => u.MapFrom(s => s.Dictionary.ShowOrder));
|
||||
|
||||
CreateMap<ReadingQuestionSystem, AddOrUpdateReadingQuestionSystemInDto>();
|
||||
|
||||
|
||||
CreateMap<AddOrUpdateReadingQuestionSystemInDto, ReadingQuestionSystem>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
CreateMap<ReadingQuestionSystem, ReadingQuestionSystemView>()
|
||||
|
||||
|
||||
.ForMember(d => d.GroupName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupName : s.GroupInfo.GroupName))
|
||||
.ForMember(d => d.ParentQuestionName, u => u.MapFrom(s => s.ParentReadingQuestionSystem == null ? string.Empty : s.ParentReadingQuestionSystem.QuestionName))
|
||||
.ForMember(d => d.ParentQuestionShowOrder, u => u.MapFrom(s => s.ParentReadingQuestionSystem.ShowOrder))
|
||||
@@ -307,14 +305,14 @@ namespace IRaCIS.Core.Application.Service
|
||||
CreateMap<AddOrUpdateReadingQuestionCriterionTrialInDto, ReadingQuestionCriterionTrial>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
CreateMap<ReadingQuestionCriterionTrial, ReadingQuestionCriterionTrialView>()
|
||||
|
||||
|
||||
.ForMember(d => d.QuestionCount, u => u.MapFrom(s => s.ReadingQuestionTrialList.Count()));
|
||||
|
||||
|
||||
CreateMap<AddOrUpdateReadingQuestionTrialInDto, ReadingQuestionTrial>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
CreateMap<ReadingQuestionTrial, ReadingQuestionTrialView>()
|
||||
|
||||
|
||||
.ForMember(d => d.GroupName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupName : s.GroupInfo.GroupName))
|
||||
.ForMember(d => d.GroupEnName, u => u.MapFrom(s => s.GroupInfo == null ? s.GroupEnName : s.GroupInfo.GroupEnName))
|
||||
.ForMember(d => d.ParentQuestionName, u => u.MapFrom(s => s.ParentReadingQuestionTrial == null ? string.Empty : s.ParentReadingQuestionTrial.QuestionName))
|
||||
@@ -328,7 +326,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
#region IR阅片
|
||||
CreateMap<ReadingQuestionTrial, GetTrialReadingQuestionOutDto>()
|
||||
|
||||
|
||||
.ForMember(d => d.QuestionName, u => u.MapFrom(s => isEn_Us ? s.QuestionEnName : s.QuestionName))
|
||||
.ForMember(x => x.Id, y => y.MapFrom(z => z.Id));
|
||||
|
||||
@@ -341,7 +339,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
CreateMap<ReadingMedicineSystemQuestionAddOrEdit, ReadingMedicineSystemQuestion>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
CreateMap<ReadingMedicineSystemQuestion, ReadingMedicineSystemQuestionView>()
|
||||
|
||||
|
||||
.ForMember(x => x.ParentShowOrder, y => y.MapFrom(n => n.ParentQuestion.ShowOrder));
|
||||
|
||||
|
||||
@@ -351,7 +349,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
CreateMap<ReadingMedicineTrialQuestionAddOrEdit, ReadingMedicineTrialQuestion>()
|
||||
.ForMember(dest => dest.CreateUser, opt => opt.Ignore());
|
||||
CreateMap<ReadingMedicineTrialQuestion, ReadingMedicineTrialQuestionView>()
|
||||
|
||||
|
||||
.ForMember(x => x.ParentShowOrder, y => y.MapFrom(n => n.ParentQuestion.ShowOrder));
|
||||
|
||||
CreateMap<ReadingMedicineTrialQuestion, GetMedicineQuestionPreviewOutDto>();
|
||||
|
||||
Reference in New Issue
Block a user