Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
commit
1e533706aa
|
@ -3834,6 +3834,16 @@
|
|||
字典code
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReportVerifyOutDto.IsExistDisease">
|
||||
<summary>
|
||||
是否存在疾病
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReportVerifyOutDto.TumorEvaluate">
|
||||
<summary>
|
||||
整体肿瘤评估
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.VerifyVisitTaskQuestionsInDto.VisitTaskId">
|
||||
<summary>
|
||||
任务Id
|
||||
|
|
|
@ -176,7 +176,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public object ReportCalculateResult{ get; set; }
|
||||
|
||||
public object CalculateResult { get; set; }
|
||||
public GetReportVerifyOutDto CalculateResult { get; set; }
|
||||
public ReadingTaskState ReadingTaskState { get; set; }
|
||||
|
||||
public List<VisitTaskInfo> VisitTaskList { get; set; }
|
||||
|
@ -1687,6 +1687,19 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public Func<ReadingCalculateDto, Task<string>> Fun { get; set; }
|
||||
}
|
||||
|
||||
public class GetReportVerifyOutDto
|
||||
{
|
||||
/// <summary>
|
||||
/// 是否存在疾病
|
||||
/// </summary>
|
||||
public string? IsExistDisease { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 整体肿瘤评估
|
||||
/// </summary>
|
||||
public string? TumorEvaluate { get; set; }
|
||||
}
|
||||
|
||||
public class GetReportVerifyInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
|
|
@ -76,13 +76,13 @@ namespace IRaCIS.Application.Services
|
|||
IRepository<Subject> subjectRepository,
|
||||
IRepository<ReadingGlobalTaskInfo> readingGlobalTaskInfoRepository,
|
||||
IRepository<ReadingCriterionPage> readingCriterionPageRepository,
|
||||
IRepository<ReadingTaskRelation> readingTaskRelationRepository,
|
||||
IRepository<ReadingTaskRelation> readingTaskRelationRepository,
|
||||
IRepository<ReadingJudgeInfo> readingJudgeInfoRepository,
|
||||
IRepository<ReadModule> readModuleRepository,
|
||||
IRepository<DicomInstance> dicomInstanceRepository,
|
||||
IRepository<OrganInfo> organInfoRepository,
|
||||
IRepository<TrialDocument> trialDocumentRepository,
|
||||
IRepository<User> userRepository,
|
||||
IRepository<OrganInfo> organInfoRepository,
|
||||
IRepository<TrialDocument> trialDocumentRepository,
|
||||
IRepository<User> userRepository,
|
||||
IMemoryCache cache,
|
||||
IRepository<ReadingSystemCriterionDictionary> readingCriterionDictionaryRepository,
|
||||
IRepository<ReadingTrialCriterionDictionary> readingTrialCriterionDictionaryRepository,
|
||||
|
@ -94,8 +94,8 @@ namespace IRaCIS.Application.Services
|
|||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
||||
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystemRepository,
|
||||
IRepository<ReadingQuestionSystem> ReadingQuestionSystem,
|
||||
ITrialEmailNoticeConfigService trialEmailNoticeConfigService,
|
||||
IRepository<NoneDicomStudyFile> noneDicomStudyFileSystem,
|
||||
ITrialEmailNoticeConfigService trialEmailNoticeConfigService,
|
||||
IRepository<NoneDicomStudyFile> noneDicomStudyFileSystem,
|
||||
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository
|
||||
)
|
||||
{
|
||||
|
@ -1406,7 +1406,40 @@ namespace IRaCIS.Application.Services
|
|||
public async Task<IResponseOutput> ChangeDicomReadingQuestionAnswer(ChangeDicomReadingQuestionAnswerInDto inDto)
|
||||
{
|
||||
await VerifyTaskIsSign(inDto.VisitTaskId);
|
||||
|
||||
|
||||
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
|
||||
var tumorQuestionId = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId && x.QuestionType == QuestionType.Tumor).Select(x => x.Id).FirstOrDefaultAsync();
|
||||
|
||||
var tumorAnswer = inDto.Answers.Where(x => x.Id == tumorQuestionId).FirstOrDefault();
|
||||
if (tumorAnswer != null)
|
||||
{
|
||||
var isConvertedTask = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.IsConvertedTask).FirstOrDefaultAsync();
|
||||
var reportVerify = await _readingCalculateService.GetReportVerify(new GetReportVerifyInDto() {
|
||||
BeforeConvertedTaskId= taskInfo.BeforeConvertedTaskId,
|
||||
IsConvertTask= isConvertedTask,
|
||||
VisitTaskId=inDto.VisitTaskId
|
||||
});
|
||||
|
||||
if (tumorAnswer.Answer == reportVerify.TumorEvaluate)
|
||||
{
|
||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.VisitTaskId, x => new VisitTask()
|
||||
{
|
||||
IsChangeTumorEvaluate = false
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.VisitTaskId, x => new VisitTask()
|
||||
{
|
||||
IsChangeTumorEvaluate = true
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
var criterionId = taskInfo.TrialReadingCriterionId;
|
||||
var questionIds = inDto.Answers.Select(x => x.Id).ToList();
|
||||
await _readingTaskQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId && questionIds.Contains(x.ReadingQuestionTrialId));
|
||||
|
|
|
@ -155,7 +155,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
{
|
||||
var originalTask = await _visitTaskRepository.Where(x => x.Id == visitTaskId).Include(x => x.TrialReadingCriterion).FirstNotNullAsync();
|
||||
|
||||
var taskAnswer = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == beforeConvertedTaskId && x.ReadingQuestionTrial.Type != "calculation").IgnoreAutoIncludes().AsNoTracking().ToListAsync();
|
||||
var taskAnswer = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == beforeConvertedTaskId &&x.ReadingQuestionTrial.QuestionType!=QuestionType.AdjustReason && x.ReadingQuestionTrial.Type != "calculation").IgnoreAutoIncludes().AsNoTracking().ToListAsync();
|
||||
|
||||
taskAnswer.ForEach(x => {
|
||||
|
||||
|
@ -171,7 +171,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
{
|
||||
x.VisitTaskId = visitTaskId;
|
||||
x.IsCurrentTaskAdd = false;
|
||||
x.FristAddTaskId = visitTaskId;
|
||||
//x.FristAddTaskId = visitTaskId;
|
||||
x.Id = NewId.NextGuid();
|
||||
});
|
||||
|
||||
|
|
|
@ -162,7 +162,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> GetReportVerify(GetReportVerifyInDto inDto)
|
||||
public async Task<GetReportVerifyOutDto> GetReportVerify(GetReportVerifyInDto inDto)
|
||||
{
|
||||
|
||||
var service = await this.GetService(inDto.VisitTaskId);
|
||||
|
@ -173,7 +173,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
}
|
||||
else
|
||||
{
|
||||
return new { };
|
||||
return new GetReportVerifyOutDto() { };
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -409,7 +409,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> GetReportVerify(GetReportVerifyInDto inDto)
|
||||
public async Task<GetReportVerifyOutDto> GetReportVerify(GetReportVerifyInDto inDto)
|
||||
{
|
||||
var tumorEvaluate = string.Empty;
|
||||
var readingCalculateDto= await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId);
|
||||
|
@ -428,7 +428,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
tumorEvaluate = await GetIRECSITTargetLesionEvaluate(readingCalculateDto);
|
||||
}
|
||||
|
||||
return new
|
||||
return new GetReportVerifyOutDto()
|
||||
{
|
||||
TumorEvaluate = tumorEvaluate,
|
||||
IsExistDisease = await this.GetReportIsExistDisease(inDto.VisitTaskId),
|
||||
|
@ -575,6 +575,8 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
List<QuestionType> questionTypes = new List<QuestionType>()
|
||||
{
|
||||
QuestionType.ISOD,
|
||||
QuestionType.LastVisitiSODChange,
|
||||
QuestionType.TargetLesion,
|
||||
QuestionType.NoTargetLesion,
|
||||
QuestionType.NewLesions,
|
||||
|
@ -1320,7 +1322,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
var value = await GetSODData(inDto);
|
||||
|
||||
if (value == null || inDto.IsBaseLine || !inDto.IsConvertedTask||inDto.BeforeConvertedTaskId!=null)
|
||||
if (value == null || inDto.IsBaseLine )
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -1337,7 +1339,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
/// <returns></returns>
|
||||
public async Task<decimal?> GetiSODData(ReadingCalculateDto inDto)
|
||||
{
|
||||
if (!inDto.IsConvertedTask || inDto.BeforeConvertedTaskId != null)
|
||||
if (!inDto.IsConvertedTask)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
@ -1815,11 +1817,11 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
/// {
|
||||
/// 非靶病灶疗效为 ND
|
||||
/// }
|
||||
/// else if (上次非靶病灶评估结果为非iUPD && (任一非靶病灶状态评估为“进一步增大(iCPD)||出现至少1个上一访视未评估为“显著增大(iUPD)”的病灶本次访视评估为“显著增大(iUPD)”))
|
||||
/// else if (上次非靶病灶评估结果为iUPD && (任一非靶病灶状态评估为“进一步增大(iCPD)||出现至少1个上一访视未评估为“显著增大(iUPD)”的病灶本次访视评估为“显著增大(iUPD)”))
|
||||
/// {
|
||||
/// 非靶病灶疗效为 iCPD
|
||||
/// }
|
||||
/// else if (上次非靶病灶评估结果为非iCPD && 任一非靶病灶状态评估为“进一步增大(iCPD)”或“显著增大(iUPD)”)
|
||||
/// else if (上次非靶病灶评估结果为iCPD && 任一非靶病灶状态评估为“进一步增大(iCPD)”或“显著增大(iUPD)”)
|
||||
/// {
|
||||
/// 非靶病灶疗效为 iCPD
|
||||
/// }
|
||||
|
@ -1897,14 +1899,14 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
// 非靶病灶疗效为 ND
|
||||
result = NoTargetAssessment.ND;
|
||||
}
|
||||
// else if (上次非靶病灶评估结果为非iUPD && (任一非靶病灶状态评估为“进一步增大(iCPD)||出现至少1个上一访视未评估为“显著增大(iUPD)”的病灶本次访视评估为“显著增大(iUPD)”))
|
||||
else if (!data.LastNoTargetLesion.EqEnum(NoTargetAssessment.iUPD) && (data.ExistiCPD || data.LastNoUPD))
|
||||
// else if (上次非靶病灶评估结果为iUPD && (任一非靶病灶状态评估为“进一步增大(iCPD)||出现至少1个上一访视未评估为“显著增大(iUPD)”的病灶本次访视评估为“显著增大(iUPD)”))
|
||||
else if (data.LastNoTargetLesion.EqEnum(NoTargetAssessment.iUPD) && (data.ExistiCPD || data.LastNoUPD))
|
||||
{
|
||||
// 非靶病灶疗效为 iCPD
|
||||
result = NoTargetAssessment.iCPD;
|
||||
}
|
||||
// else if (上次非靶病灶评估结果为非iCPD && 任一非靶病灶状态评估为“进一步增大(iCPD)”或“显著增大(iUPD)”)
|
||||
else if (!data.LastNoTargetLesion.EqEnum(NoTargetAssessment.iCPD) && (data.ExistiCPD || data.ExistiUPD))
|
||||
// else if (上次非靶病灶评估结果为iCPD && 任一非靶病灶状态评估为“进一步增大(iCPD)”或“显著增大(iUPD)”)
|
||||
else if (data.LastNoTargetLesion.EqEnum(NoTargetAssessment.iCPD) && (data.ExistiCPD || data.ExistiUPD))
|
||||
{
|
||||
// 非靶病灶疗效为 iCPD
|
||||
result = NoTargetAssessment.iCPD;
|
||||
|
@ -2539,7 +2541,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
/// {
|
||||
/// 疗效为 iUPD
|
||||
/// }
|
||||
/// else if ((靶病灶评估为iCR || 非靶病灶评估为iCR) && 新病灶评估为ND)
|
||||
/// else if ((靶病灶评估为iCR && 非靶病灶评估为iCR && 新病灶评估为ND) && (靶病灶评估为ND && 非靶病灶评估为iCR && 新病灶评估为ND) && (靶病灶评估为iCR && 非靶病灶评估为ND && 新病灶评估为ND))
|
||||
/// {
|
||||
/// 疗效为 iCR
|
||||
/// }
|
||||
|
@ -2638,14 +2640,26 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
// 疗效为 iUPD
|
||||
result = OverallAssessment.iUPD;
|
||||
}
|
||||
// else if ((靶病灶评估为iCR||靶病灶评估为ND) && (非靶病灶评估为iCR||非靶病灶评估为ND)) && 新病灶评估为ND)
|
||||
else if (((inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.iCR))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.ND)) )
|
||||
&&
|
||||
(inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.iCR))
|
||||
|| inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.ND))
|
||||
))
|
||||
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.ND))
|
||||
//
|
||||
// else if ((靶病灶评估为iCR && 非靶病灶评估为iCR && 新病灶评估为ND) && (靶病灶评估为ND && 非靶病灶评估为iCR && 新病灶评估为ND) && (靶病灶评估为iCR && 非靶病灶评估为ND && 新病灶评估为ND))
|
||||
else if (
|
||||
|
||||
(inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.iCR))
|
||||
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.iCR))
|
||||
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.ND))
|
||||
)
|
||||
||
|
||||
|
||||
(inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.ND))
|
||||
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.iCR))
|
||||
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.ND))
|
||||
)
|
||||
||
|
||||
|
||||
(inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.TargetLesion && x.Answer.EqEnum(TargetAssessment.iCR))
|
||||
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NoTargetLesion && x.Answer.EqEnum(NoTargetAssessment.ND))
|
||||
&& inDto.QuestionInfo.Any(x => x.QuestionType == QuestionType.NewLesionEvaluation && x.Answer.EqEnum(NewLesionAssessment.ND))
|
||||
)
|
||||
)
|
||||
{
|
||||
// 疗效为 iCR
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<object> GetReportVerify(GetReportVerifyInDto inDto);
|
||||
Task<GetReportVerifyOutDto> GetReportVerify(GetReportVerifyInDto inDto);
|
||||
|
||||
/// <summary>
|
||||
/// 获取阅片报告
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
Task<object> GetReportVerify(GetReportVerifyInDto inDto);
|
||||
Task<GetReportVerifyOutDto> GetReportVerify(GetReportVerifyInDto inDto);
|
||||
|
||||
/// <summary>
|
||||
/// 获取阅片报告
|
||||
|
|
|
@ -1018,9 +1018,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
}
|
||||
|
||||
|
||||
public async Task<object> GetReportVerify(GetReportVerifyInDto inDto)
|
||||
public async Task<GetReportVerifyOutDto> GetReportVerify(GetReportVerifyInDto inDto)
|
||||
{
|
||||
return new() {
|
||||
return new GetReportVerifyOutDto() {
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -371,9 +371,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> GetReportVerify(GetReportVerifyInDto inDto)
|
||||
public async Task<GetReportVerifyOutDto> GetReportVerify(GetReportVerifyInDto inDto)
|
||||
{
|
||||
return new
|
||||
return new GetReportVerifyOutDto()
|
||||
{
|
||||
TumorEvaluate = await this.GetReportTumor(inDto.VisitTaskId),
|
||||
IsExistDisease = await this.GetReportIsExistDisease(inDto.VisitTaskId),
|
||||
|
|
|
@ -367,9 +367,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<object> GetReportVerify(GetReportVerifyInDto inDto)
|
||||
public async Task<GetReportVerifyOutDto> GetReportVerify(GetReportVerifyInDto inDto)
|
||||
{
|
||||
return new
|
||||
return new GetReportVerifyOutDto()
|
||||
{
|
||||
TumorEvaluate = await this.GetReportTumor(inDto.VisitTaskId),
|
||||
IsExistDisease = await this.GetReportIsExistDisease(inDto.VisitTaskId),
|
||||
|
|
|
@ -506,9 +506,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
|
||||
|
||||
|
||||
public async Task<object> GetReportVerify(GetReportVerifyInDto inDto)
|
||||
public async Task<GetReportVerifyOutDto> GetReportVerify(GetReportVerifyInDto inDto)
|
||||
{
|
||||
return new() {
|
||||
return new GetReportVerifyOutDto() {
|
||||
|
||||
};
|
||||
}
|
||||
|
|
|
@ -335,6 +335,10 @@ namespace IRaCIS.Core.Domain.Models
|
|||
).Any();
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否修改了整体肿瘤评估
|
||||
/// </summary>
|
||||
public bool IsChangeTumorEvaluate { get; set; } = false;
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue