Uat_Study
parent
792f7b8ade
commit
55fa65197a
|
@ -176,6 +176,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
{
|
||||
public decimal RowIndex { get; set; }
|
||||
|
||||
public decimal FristAddTaskNum { get; set; }
|
||||
|
||||
|
||||
public string MeasureData { get; set; }
|
||||
|
||||
|
|
|
@ -1152,6 +1152,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public bool IsCanEditPosition { get; set; }
|
||||
|
||||
public decimal FristAddTaskNum { get; set; } = 0;
|
||||
|
||||
public List<SubmitTableQuestionInfo> AnswerList { get; set; }
|
||||
|
||||
}
|
||||
|
|
|
@ -559,7 +559,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
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;
|
||||
|
||||
|
||||
|
@ -644,8 +644,9 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
return (result, new
|
||||
{
|
||||
readingTaskState = readingTaskState,
|
||||
FormType = formType
|
||||
readingTaskState = visitTaskInfo.ReadingTaskState,
|
||||
FormType = formType,
|
||||
TaskNum= visitTaskInfo.VisitTaskNum,
|
||||
|
||||
}); ;
|
||||
}
|
||||
|
@ -1024,6 +1025,7 @@ namespace IRaCIS.Application.Services
|
|||
rowInfo.QuestionId = inDto.QuestionId;
|
||||
rowInfo.MeasureData = inDto.MeasureData;
|
||||
rowInfo.IsCurrentTaskAdd = isCurrentTaskAdd;
|
||||
rowInfo.FristAddTaskNum = inDto.FristAddTaskNum;
|
||||
rowInfo.RowIndex = inDto.RowIndex;
|
||||
rowInfo.InstanceId = inDto.InstanceId;
|
||||
rowInfo.SeriesId = inDto.SeriesId;
|
||||
|
|
|
@ -101,6 +101,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
{
|
||||
RowIndex = x.RowIndex,
|
||||
MeasureData = x.MeasureData,
|
||||
FristAddTaskNum=x.FristAddTaskNum,
|
||||
TableQuestionList = tableQuestion.Where(y => y.QuestionId == item.QuestionId && y.RowId == x.Id).ToList(),
|
||||
|
||||
}).ToList();
|
||||
|
|
|
@ -14,6 +14,7 @@ using MassTransit;
|
|||
|
||||
namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||
{
|
||||
[ApiExplorerSettings(GroupName = "Reading")]
|
||||
public class PCWG3CalculateService : BaseService, ICriterionCalculateService
|
||||
{
|
||||
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>
|
||||
|
@ -353,7 +367,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
/// <returns></returns>
|
||||
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
|
||||
|
@ -402,23 +416,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
{
|
||||
return 0;
|
||||
}
|
||||
List<VisitTaskAnswerInfo> visitTaskAnswerList = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId != inDto.VisitTaskId && x.VisitTask.ReadingCategory == ReadingCategory.Visit
|
||||
&& x.VisitTask.IsAnalysisCreate == inDto.IsAnalysisCreate
|
||||
&& x.VisitTask.IsSelfAnalysis == inDto.IsSelfAnalysis
|
||||
&& x.SubjectId == inDto.SubjectId && x.VisitTask.ReadingTaskState == ReadingTaskState.HaveSigned && x.VisitTask.ArmEnum == inDto.ArmEnum && x.VisitTask.TaskState == TaskState.Effect && x.ReadingQuestionTrial.QuestionType == QuestionType.NewLesionsCount)
|
||||
.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());
|
||||
var result= inDto.QuestionInfo.Where(x => x.LesionType == LesionType.AlwaysNewLesions&&).SelectMany(x => x.TableRowInfoList)
|
||||
.Where(x =>x.FristAddTaskNum>=2&& x.TableQuestionList.Any(y => y.QuestionMark == QuestionMark.State && y.Answer == EvaluationOfState.Exists.GetEnumInt()))
|
||||
.Count();
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -80,9 +80,12 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// </summary>
|
||||
public Guid? MergeRowId { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 第一次添加的任务ID
|
||||
/// </summary>
|
||||
public decimal FristAddTaskNum { get; set; } = 0;
|
||||
|
||||
|
||||
public SplitOrMergeType? SplitOrMergeType { get; set; }
|
||||
|
|
Loading…
Reference in New Issue