修改
continuous-integration/drone/push Build is passing Details

Test_HIR_Net8
he 2025-09-08 16:32:23 +08:00
parent 82afae93dc
commit 589e9868a8
3 changed files with 54 additions and 0 deletions

View File

@ -12974,6 +12974,13 @@
<param name="param">请求类型</param> <param name="param">请求类型</param>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.ChangeReportAnswer(IRaCIS.Core.Application.Service.Reading.Dto.ChangeReportAnswerInDto)">
<summary>
修改报告问题答案
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.ChangeDicomReadingQuestionAnswer(IRaCIS.Core.Application.Service.Reading.Dto.ChangeDicomReadingQuestionAnswerInDto)"> <member name="M:IRaCIS.Core.Application.Service.ReadingImageTaskService.ChangeDicomReadingQuestionAnswer(IRaCIS.Core.Application.Service.Reading.Dto.ChangeDicomReadingQuestionAnswerInDto)">
<summary> <summary>
修改肿瘤学评估结果 修改肿瘤学评估结果

View File

@ -606,6 +606,21 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public CriterionType CriterionType { get; set; } public CriterionType CriterionType { get; set; }
} }
public class ChangeReportAnswerInDto
{
public List<ChangeReportAnswerDto> AnswerList { get; set; }
}
public class ChangeReportAnswerDto
{
public Guid VisitTaskId { get; set; }
public Guid QuestionId { get; set; }
public string Answer { get; set; } = string.Empty;
}
public class ChangeDicomReadingQuestionAnswerInDto public class ChangeDicomReadingQuestionAnswerInDto
{ {
public Guid VisitTaskId { get; set; } public Guid VisitTaskId { get; set; }

View File

@ -24,6 +24,7 @@ using System.Reactive.Concurrency;
using ZiggyCreatures.Caching.Fusion; using ZiggyCreatures.Caching.Fusion;
using IRaCIS.Core.Domain.BaseModel; using IRaCIS.Core.Domain.BaseModel;
using IRaCIS.Core.Domain._DomainEvent; using IRaCIS.Core.Domain._DomainEvent;
using Microsoft.Extensions.Logging;
namespace IRaCIS.Core.Application.Service namespace IRaCIS.Core.Application.Service
{ {
@ -1840,6 +1841,37 @@ namespace IRaCIS.Core.Application.Service
// return await ChangeDicomReadingQuestionAnswer(inDto); // return await ChangeDicomReadingQuestionAnswer(inDto);
//} //}
/// <summary>
/// 修改报告问题答案
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<IResponseOutput> ChangeReportAnswer(ChangeReportAnswerInDto inDto)
{
foreach (var item in inDto.AnswerList)
{
if (await _readingTaskQuestionAnswerRepository.AnyAsync(x => x.ReadingQuestionTrialId == item.QuestionId && x.VisitTaskId == item.VisitTaskId))
{
await _readingTaskQuestionAnswerRepository.UpdatePartialFromQueryAsync(x => x.ReadingQuestionTrialId == item.QuestionId && x.VisitTaskId == item.VisitTaskId, x => new ReadingTaskQuestionAnswer()
{
Answer = item.Answer
});
}
else
{
await _readingTaskQuestionAnswerRepository.AddAsync(new ReadingTaskQuestionAnswer()
{
VisitTaskId= item.VisitTaskId,
Answer= item.Answer,
ReadingQuestionTrialId= item.QuestionId,
});
}
}
await _readingTaskQuestionAnswerRepository.SaveChangesAsync();
return ResponseOutput.Ok(true);
}
/// <summary> /// <summary>
/// 修改肿瘤学评估结果 /// 修改肿瘤学评估结果