Merge branch 'master' of http://192.168.1.2:8033/IRaCIS_Core_Api
commit
c0bd5c9d88
|
@ -182,7 +182,19 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public List<VisitTaskInfo> VisitTaskList { get; set; }
|
public List<VisitTaskInfo> VisitTaskList { get; set; }
|
||||||
|
|
||||||
public List<ReadingReportDto> TaskQuestions { 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 class VisitTaskGroupAnswerDto
|
||||||
{
|
{
|
||||||
|
@ -1644,7 +1656,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public class GetReportVerifyInDto
|
public class GetReportVerifyInDto
|
||||||
{
|
{
|
||||||
public Guid VisitTaskId { get; set; }
|
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)
|
public async Task<GetReadingReportEvaluationOutDto> GetReadingReportEvaluation(GetReadingReportEvaluationInDto indto)
|
||||||
{
|
{
|
||||||
GetReadingReportEvaluationOutDto result = new GetReadingReportEvaluationOutDto();
|
GetReadingReportEvaluationOutDto result = new GetReadingReportEvaluationOutDto();
|
||||||
|
var isConvertTask = await _visitTaskRepository.Where(x => x.Id == indto.VisitTaskId).Select(x => x.IsConvertedTask).FirstNotNullAsync();
|
||||||
result.CalculateResult = await this.GetReportVerify(new GetReportVerifyInDto()
|
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;
|
result.ReadingTaskState = visitTaskInfo.ReadingTaskState;
|
||||||
|
@ -126,9 +129,15 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
.WhereIf(!isConvertTask, x => x.ConvertShowType == ConvertShowType.All || x.ConvertShowType == ConvertShowType.BeforeShow)
|
.WhereIf(!isConvertTask, x => x.ConvertShowType == ConvertShowType.All || x.ConvertShowType == ConvertShowType.BeforeShow)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
var tableQuestionList = await _readingTableQuestionTrialRepository.Where(x => x.TrialCriterionId == criterionId).OrderBy(x => x.ShowOrder).ToListAsync();
|
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();
|
var tableAnsweRowInfos = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == indto.VisitTaskId).ProjectTo<TableAnsweRowInfo>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
var lesionsIndexs = await _readingTableAnswerRowInfoRepository.Where(x => visitTaskIds.Contains(x.VisitTaskId)).GroupBy(x => new { x.QuestionId }).Select(x => new lesionsIndexDto()
|
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,
|
QuestionId = x.Key.QuestionId,
|
||||||
Rowindexs = x.Select(x => x.RowIndex).Distinct().OrderBy(x => x).ToList()
|
Rowindexs = x.Select(x => x.RowIndex).Distinct().OrderBy(x => x).ToList()
|
||||||
|
@ -401,9 +410,26 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<object> GetReportVerify(GetReportVerifyInDto inDto)
|
public async Task<object> GetReportVerify(GetReportVerifyInDto inDto)
|
||||||
{
|
{
|
||||||
return new
|
var tumorEvaluate = string.Empty;
|
||||||
|
var readingCalculateDto= await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId);
|
||||||
|
|
||||||
|
if (!inDto.IsConvertTask)
|
||||||
{
|
{
|
||||||
TumorEvaluate = await this.GetReportTumor(inDto.VisitTaskId),
|
tumorEvaluate = await GetTumor(readingCalculateDto);
|
||||||
|
|
||||||
|
}
|
||||||
|
else if (inDto.BeforeConvertedTaskId != null)
|
||||||
|
{
|
||||||
|
tumorEvaluate = await GetConvertingTumor(readingCalculateDto);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
tumorEvaluate = await GetIRECSITTargetLesionEvaluate(readingCalculateDto);
|
||||||
|
}
|
||||||
|
|
||||||
|
return new
|
||||||
|
{
|
||||||
|
TumorEvaluate = tumorEvaluate,
|
||||||
IsExistDisease = await this.GetReportIsExistDisease(inDto.VisitTaskId),
|
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},
|
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},
|
new ReadingCalculateData (){QuestionType=QuestionType.Tumor,GetStringFun=GetConvertingTumor,IsConvertedTask=true,IsBeTransforming=true},
|
||||||
|
@ -707,15 +731,15 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// 获取报告整体整体评估
|
///// 获取报告整体整体评估
|
||||||
/// </summary>
|
///// </summary>
|
||||||
/// <param name="visitTaskId"></param>
|
///// <param name="visitTaskId"></param>
|
||||||
/// <returns></returns>
|
///// <returns></returns>
|
||||||
public async Task<string> GetReportTumor(Guid visitTaskId)
|
//public async Task<string> GetReportTumor(Guid visitTaskId)
|
||||||
{
|
//{
|
||||||
return await GetTumor(await _generalCalculateService.GetReadingCalculateDto(visitTaskId));
|
// return await GetTumor(await _generalCalculateService.GetReadingCalculateDto(visitTaskId));
|
||||||
}
|
//}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取报告是否存在疾病
|
/// 获取报告是否存在疾病
|
||||||
|
|
Loading…
Reference in New Issue