Merge branch 'Test.IRC' of http://192.168.3.69:3000/XCKJ/irc-netcore-api into Test.IRC

IRC_NewDev
hang 2023-09-27 13:57:25 +08:00
commit f1b5a457df
3 changed files with 32 additions and 22 deletions

View File

@ -464,6 +464,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
{ {
public Guid VisitTaskId { get; set; } public Guid VisitTaskId { get; set; }
public bool UpdateMark { get; set; } = false;
public List<ChangeDicomReadingQuestionAnswerDto> Answers { get; set; } public List<ChangeDicomReadingQuestionAnswerDto> Answers { get; set; }

View File

@ -1474,6 +1474,7 @@ namespace IRaCIS.Application.Services
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })] [TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
public async Task<IResponseOutput> SaveImageQuality(ChangeDicomReadingQuestionAnswerInDto inDto) public async Task<IResponseOutput> SaveImageQuality(ChangeDicomReadingQuestionAnswerInDto inDto)
{ {
inDto.UpdateMark = true;
return await ChangeDicomReadingQuestionAnswer(inDto); return await ChangeDicomReadingQuestionAnswer(inDto);
} }
@ -1549,7 +1550,8 @@ namespace IRaCIS.Application.Services
}).ToList(); }).ToList();
await _readingTaskQuestionAnswerRepository.AddRangeAsync(needAddAnswer); await _readingTaskQuestionAnswerRepository.AddRangeAsync(needAddAnswer);
if (inDto.UpdateMark)
{
var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => new var questionMarkList = await _readingTaskQuestionMarkRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => new
{ {
x.QuestionId, x.QuestionId,
@ -1567,6 +1569,9 @@ namespace IRaCIS.Application.Services
x.FirstAddTaskId = questionMarkList.Where(y => y.QuestionId == x.QuestionId).Select(x => x.FirstAddTaskId).FirstOrDefault() ?? inDto.VisitTaskId; x.FirstAddTaskId = questionMarkList.Where(y => y.QuestionId == x.QuestionId).Select(x => x.FirstAddTaskId).FirstOrDefault() ?? inDto.VisitTaskId;
}); });
await _readingTaskQuestionMarkRepository.AddRangeAsync(markList); await _readingTaskQuestionMarkRepository.AddRangeAsync(markList);
}
await _readingTaskQuestionAnswerRepository.SaveChangesAsync(); await _readingTaskQuestionAnswerRepository.SaveChangesAsync();
return ResponseOutput.Ok(true); return ResponseOutput.Ok(true);
} }
@ -2035,7 +2040,7 @@ namespace IRaCIS.Application.Services
rowInfo.Id = inDto.RowId == null ? NewId.NextGuid() : inDto.RowId.Value; rowInfo.Id = inDto.RowId == null ? NewId.NextGuid() : inDto.RowId.Value;
result.RowId = rowInfo.Id; result.RowId = rowInfo.Id;
rowInfo.IsCurrentTaskAdd = isCurrentTaskAdd; rowInfo.IsCurrentTaskAdd = isCurrentTaskAdd;
rowInfo.FristAddTaskId = inDto.RowId == null ? rowInfo.Id : rowInfo.FristAddTaskId;
if (inDto.RowId == null) if (inDto.RowId == null)
{ {

View File

@ -436,9 +436,10 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
/// <returns></returns> /// <returns></returns>
public async Task<GetReportVerifyOutDto> GetReportVerify(GetReportVerifyInDto inDto) public async Task<GetReportVerifyOutDto> GetReportVerify(GetReportVerifyInDto inDto)
{ {
var calculateDto = await _generalCalculateService.GetReadingCalculateDto(inDto.VisitTaskId);
return new GetReportVerifyOutDto() return new GetReportVerifyOutDto()
{ {
TumorEvaluate = await this.GetReportTumor(inDto.VisitTaskId), TumorEvaluate = calculateDto.QuestionInfo.Where(x=>x.QuestionType==QuestionType.ImgOncology).Select(x=>x.Answer).FirstOrDefault(),
IsExistDisease = await this.GetReportIsExistDisease(inDto.VisitTaskId), IsExistDisease = await this.GetReportIsExistDisease(inDto.VisitTaskId),
}; };
@ -883,11 +884,12 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
}); });
List<QuestionMark?> notNeedCopyMarks = new List<QuestionMark?>() List<QuestionMark?> needCopyMarks = new List<QuestionMark?>()
{ {
QuestionMark.MajorAxis, QuestionMark.LowPPDLDi,
QuestionMark.ShortAxis, QuestionMark.LowPPDSDi,
QuestionMark.State, QuestionMark.NadirPPD,
QuestionMark.LowPPDVisit,
}; };
@ -934,7 +936,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
var tableAnswers = copyTableAnswers.Select(x => new ReadingTableQuestionAnswer var tableAnswers = copyTableAnswers.Select(x => new ReadingTableQuestionAnswer
{ {
Id = NewId.NextGuid(), Id = NewId.NextGuid(),
Answer = notNeedCopyMarks.Contains(x.QuestionMark) ? string.Empty : x.Answer, Answer = needCopyMarks.Contains(x.QuestionMark) ? x.Answer : string.Empty,
QuestionId = x.QuestionId, QuestionId = x.QuestionId,
RowIndex = x.RowIndex, RowIndex = x.RowIndex,
RowId = tableRowAnswers.Where(y => y.OriginalId == x.RowId).Select(x => x.Id).FirstOrDefault(), RowId = tableRowAnswers.Where(y => y.OriginalId == x.RowId).Select(x => x.Id).FirstOrDefault(),