Uat_Study
parent
792f7b8ade
commit
55fa65197a
|
@ -176,6 +176,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
{
|
{
|
||||||
public decimal RowIndex { get; set; }
|
public decimal RowIndex { get; set; }
|
||||||
|
|
||||||
|
public decimal FristAddTaskNum { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public string MeasureData { get; set; }
|
public string MeasureData { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -1152,6 +1152,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public bool IsCanEditPosition { get; set; }
|
public bool IsCanEditPosition { get; set; }
|
||||||
|
|
||||||
|
public decimal FristAddTaskNum { get; set; } = 0;
|
||||||
|
|
||||||
public List<SubmitTableQuestionInfo> AnswerList { get; set; }
|
public List<SubmitTableQuestionInfo> AnswerList { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -559,7 +559,7 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
result.IsBaseLineTask = taskinfo.SourceSubjectVisitId == baseLineVisitId;
|
result.IsBaseLineTask = taskinfo.SourceSubjectVisitId == baseLineVisitId;
|
||||||
|
|
||||||
var readingTaskState = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.ReadingTaskState).FirstOrDefaultAsync();
|
var visitTaskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||||
var criterionId = taskinfo.TrialReadingCriterionId;
|
var criterionId = taskinfo.TrialReadingCriterionId;
|
||||||
|
|
||||||
|
|
||||||
|
@ -644,8 +644,9 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
return (result, new
|
return (result, new
|
||||||
{
|
{
|
||||||
readingTaskState = readingTaskState,
|
readingTaskState = visitTaskInfo.ReadingTaskState,
|
||||||
FormType = formType
|
FormType = formType,
|
||||||
|
TaskNum= visitTaskInfo.VisitTaskNum,
|
||||||
|
|
||||||
}); ;
|
}); ;
|
||||||
}
|
}
|
||||||
|
@ -1024,6 +1025,7 @@ namespace IRaCIS.Application.Services
|
||||||
rowInfo.QuestionId = inDto.QuestionId;
|
rowInfo.QuestionId = inDto.QuestionId;
|
||||||
rowInfo.MeasureData = inDto.MeasureData;
|
rowInfo.MeasureData = inDto.MeasureData;
|
||||||
rowInfo.IsCurrentTaskAdd = isCurrentTaskAdd;
|
rowInfo.IsCurrentTaskAdd = isCurrentTaskAdd;
|
||||||
|
rowInfo.FristAddTaskNum = inDto.FristAddTaskNum;
|
||||||
rowInfo.RowIndex = inDto.RowIndex;
|
rowInfo.RowIndex = inDto.RowIndex;
|
||||||
rowInfo.InstanceId = inDto.InstanceId;
|
rowInfo.InstanceId = inDto.InstanceId;
|
||||||
rowInfo.SeriesId = inDto.SeriesId;
|
rowInfo.SeriesId = inDto.SeriesId;
|
||||||
|
|
|
@ -101,6 +101,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
{
|
{
|
||||||
RowIndex = x.RowIndex,
|
RowIndex = x.RowIndex,
|
||||||
MeasureData = x.MeasureData,
|
MeasureData = x.MeasureData,
|
||||||
|
FristAddTaskNum=x.FristAddTaskNum,
|
||||||
TableQuestionList = tableQuestion.Where(y => y.QuestionId == item.QuestionId && y.RowId == x.Id).ToList(),
|
TableQuestionList = tableQuestion.Where(y => y.QuestionId == item.QuestionId && y.RowId == x.Id).ToList(),
|
||||||
|
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
|
@ -14,6 +14,7 @@ using MassTransit;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
{
|
{
|
||||||
|
[ApiExplorerSettings(GroupName = "Reading")]
|
||||||
public class PCWG3CalculateService : BaseService, ICriterionCalculateService
|
public class PCWG3CalculateService : BaseService, ICriterionCalculateService
|
||||||
{
|
{
|
||||||
private readonly IRepository<ReadingTableQuestionAnswer> _readingTableQuestionAnswerRepository;
|
private readonly IRepository<ReadingTableQuestionAnswer> _readingTableQuestionAnswerRepository;
|
||||||
|
@ -198,6 +199,19 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 测试计算
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="visitTaskId"></param>
|
||||||
|
/// <param name="type"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task TestCalculate(Guid visitTaskId, QuestionType type)
|
||||||
|
{
|
||||||
|
ReadingCalculateDto readingData = await _generalCalculateService.GetReadingCalculateDto(visitTaskId);
|
||||||
|
await ReadingCalculate(readingData, new List<QuestionType>() { type });
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 计算任务
|
/// 计算任务
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -353,7 +367,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<int> GetBaseLineLesionsCount(ReadingCalculateDto inDto)
|
public async Task<int> GetBaseLineLesionsCount(ReadingCalculateDto inDto)
|
||||||
{
|
{
|
||||||
return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.BaselineLesions).Select(x => x.TableRowInfoList).Count();
|
return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.BaselineLesions).SelectMany(x => x.TableRowInfoList).Count();
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
@ -402,23 +416,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
List<VisitTaskAnswerInfo> visitTaskAnswerList = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId != inDto.VisitTaskId && x.VisitTask.ReadingCategory == ReadingCategory.Visit
|
var result= inDto.QuestionInfo.Where(x => x.LesionType == LesionType.AlwaysNewLesions&&).SelectMany(x => x.TableRowInfoList)
|
||||||
&& x.VisitTask.IsAnalysisCreate == inDto.IsAnalysisCreate
|
.Where(x =>x.FristAddTaskNum>=2&& x.TableQuestionList.Any(y => y.QuestionMark == QuestionMark.State && y.Answer == EvaluationOfState.Exists.GetEnumInt()))
|
||||||
&& x.VisitTask.IsSelfAnalysis == inDto.IsSelfAnalysis
|
.Count();
|
||||||
&& x.SubjectId == inDto.SubjectId && x.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned && x.VisitTask.ArmEnum == inDto.ArmEnum && x.VisitTask.TaskState == TaskState.Effect && x.ReadingQuestionTrial.QuestionType == QuestionType.NewLesionsCount)
|
return result;
|
||||||
.Select(x => new VisitTaskAnswerInfo
|
|
||||||
{
|
|
||||||
VisitTaskId = x.VisitTaskId,
|
|
||||||
QuestionId = x.ReadingQuestionTrialId,
|
|
||||||
VisitName = x.VisitTask.SourceSubjectVisit.VisitName,
|
|
||||||
BlindName = x.VisitTask.SourceSubjectVisit.BlindName,
|
|
||||||
VisitTaskNum=x.VisitTask.VisitTaskNum,
|
|
||||||
NewLesionsCount = x.Answer.IsNullOrEmptyReturn0(),
|
|
||||||
}).ToListAsync();
|
|
||||||
|
|
||||||
visitTaskAnswerList = visitTaskAnswerList.Where(x => x.VisitTaskNum >= 2).ToList();
|
|
||||||
|
|
||||||
return int.Parse( Math.Floor(visitTaskAnswerList.Sum(x => x.NewLesionsCount)).ToString());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -80,9 +80,12 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public Guid? MergeRowId { get; set; }
|
public Guid? MergeRowId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 第一次添加的任务ID
|
||||||
|
/// </summary>
|
||||||
|
public decimal FristAddTaskNum { get; set; } = 0;
|
||||||
|
|
||||||
|
|
||||||
public SplitOrMergeType? SplitOrMergeType { get; set; }
|
public SplitOrMergeType? SplitOrMergeType { get; set; }
|
||||||
|
|
Loading…
Reference in New Issue