Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
commit
c0bd5c9d88
|
@ -182,8 +182,20 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public List<VisitTaskInfo> VisitTaskList { get; set; }
|
||||
|
||||
public List<ReadingReportDto> TaskQuestions { get; set; }
|
||||
|
||||
public List<LesionDto> LesionCountList { get; set; } = new List<LesionDto>();
|
||||
|
||||
}
|
||||
|
||||
|
||||
public class LesionDto
|
||||
{
|
||||
public LesionType? LesionType { get; set; }
|
||||
|
||||
public int Count { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class VisitTaskGroupAnswerDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
@ -1644,6 +1656,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public class GetReportVerifyInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public bool IsConvertTask { get; set; }
|
||||
|
||||
public Guid? BeforeConvertedTaskId { get; set; }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -100,17 +100,20 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
public async Task<GetReadingReportEvaluationOutDto> GetReadingReportEvaluation(GetReadingReportEvaluationInDto indto)
|
||||
{
|
||||
GetReadingReportEvaluationOutDto result = new GetReadingReportEvaluationOutDto();
|
||||
|
||||
var isConvertTask = await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).Select(x => x.IsConvertedTask).FirstNotNullAsync();
|
||||
var visitTaskInfo = await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).FirstNotNullAsync();
|
||||
result.CalculateResult = await this.GetReportVerify(new GetReportVerifyInDto()
|
||||
{
|
||||
VisitTaskId = indto.VisitTaskId
|
||||
VisitTaskId = indto.VisitTaskId,
|
||||
IsConvertTask= isConvertTask,
|
||||
BeforeConvertedTaskId =visitTaskInfo.BeforeConvertedTaskId,
|
||||
});
|
||||
|
||||
|
||||
var visitTaskInfo = await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).FirstNotNullAsync();
|
||||
|
||||
|
||||
var isConvertTask= await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).Select(x=>x.IsConvertedTask).FirstNotNullAsync();
|
||||
|
||||
|
||||
|
||||
|
||||
result.ReadingTaskState = visitTaskInfo.ReadingTaskState;
|
||||
|
@ -128,6 +131,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
result.LesionCountList = tableAnsweRowInfos.GroupBy(x => x.LesionType).Select(x => new LesionDto
|
||||
{
|
||||
LesionType = x.Key.Value,
|
||||
Count = x.ToList().Count()
|
||||
}).ToList();
|
||||
|
||||
var lesionsIndexs = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).GroupBy(x => new { x.QuestionId }).Select(x => new lesionsIndexDto()
|
||||
{
|
||||
QuestionId = x.Key.QuestionId,
|
||||
|
@ -401,9 +410,26 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
/// <returns></returns>
|
||||
public async Task<object> GetReportVerify(GetReportVerifyInDto inDto)
|
||||
{
|
||||
var tumorEvaluate = string.Empty;
|
||||
var readingCalculateDto= await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId);
|
||||
|
||||
if (!inDto.IsConvertTask)
|
||||
{
|
||||
tumorEvaluate = await GetTumor(readingCalculateDto);
|
||||
|
||||
}
|
||||
else if (inDto.BeforeConvertedTaskId != null)
|
||||
{
|
||||
tumorEvaluate = await GetConvertingTumor(readingCalculateDto);
|
||||
}
|
||||
else
|
||||
{
|
||||
tumorEvaluate = await GetIRECSITTargetLesionEvaluate(readingCalculateDto);
|
||||
}
|
||||
|
||||
return new
|
||||
{
|
||||
TumorEvaluate = await this.GetReportTumor(inDto.VisitTaskId),
|
||||
TumorEvaluate = tumorEvaluate,
|
||||
IsExistDisease = await this.GetReportIsExistDisease(inDto.VisitTaskId),
|
||||
|
||||
};
|
||||
|
@ -509,8 +535,6 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
//整体肿瘤评估
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.Tumor,GetStringFun=GetTumor,IsConvertedTask=false},
|
||||
|
||||
//IRECIST整体肿瘤评估
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.Tumor,GetStringFun=GetIRECSITTargetLesionEvaluate,IsConvertedTask=true},
|
||||
|
||||
// 转化时整体肿瘤评估
|
||||
new ReadingCalculateData (){QuestionType=QuestionType.Tumor,GetStringFun=GetConvertingTumor,IsConvertedTask=true,IsBeTransforming=true},
|
||||
|
@ -707,15 +731,15 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
|||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取报告整体整体评估
|
||||
/// </summary>
|
||||
/// <param name="visitTaskId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> GetReportTumor(Guid visitTaskId)
|
||||
{
|
||||
return await GetTumor(await _generalCalculateService.GetReadingCalculateDto(visitTaskId));
|
||||
}
|
||||
///// <summary>
|
||||
///// 获取报告整体整体评估
|
||||
///// </summary>
|
||||
///// <param name="visitTaskId"></param>
|
||||
///// <returns></returns>
|
||||
//public async Task<string> GetReportTumor(Guid visitTaskId)
|
||||
//{
|
||||
// return await GetTumor(await _generalCalculateService.GetReadingCalculateDto(visitTaskId));
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 获取报告是否存在疾病
|
||||
|
|
Loading…
Reference in New Issue