修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
82afae93dc
commit
589e9868a8
|
|
@ -12974,6 +12974,13 @@
|
|||
<param name="param">请求类型</param>
|
||||
<returns></returns>
|
||||
</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)">
|
||||
<summary>
|
||||
修改肿瘤学评估结果
|
||||
|
|
|
|||
|
|
@ -606,6 +606,21 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
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 Guid VisitTaskId { get; set; }
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ using System.Reactive.Concurrency;
|
|||
using ZiggyCreatures.Caching.Fusion;
|
||||
using IRaCIS.Core.Domain.BaseModel;
|
||||
using IRaCIS.Core.Domain._DomainEvent;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
|
|
@ -1840,6 +1841,37 @@ namespace IRaCIS.Core.Application.Service
|
|||
// 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>
|
||||
/// 修改肿瘤学评估结果
|
||||
|
|
|
|||
Loading…
Reference in New Issue