Test.EIImageViewer
parent
b4ffae867b
commit
932cb89a44
|
@ -265,12 +265,34 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public Guid RowId { get; set; }
|
public Guid RowId { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
//public class ChangeCalculationAnswerInDto
|
public class ChangeCalculationAnswerInDto
|
||||||
//{
|
{
|
||||||
// public Guid VisitTaskId { get; set; }
|
public Guid VisitTaskId { get; set; }
|
||||||
|
|
||||||
|
public List<ChangeQuestion> QuestionAnswer { get; set; } = new List<ChangeQuestion>();
|
||||||
|
|
||||||
|
public List<ChangeTableQuestion> TableQuestionAnswer { get; set; } = new List<ChangeTableQuestion>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ChangeTableQuestion
|
||||||
|
{
|
||||||
|
public Guid RowId { get; set; }
|
||||||
|
|
||||||
|
public Guid QuestionId { get; set; }
|
||||||
|
|
||||||
|
public Guid TableQuestionId { get; set; }
|
||||||
|
|
||||||
|
public string Answer { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class ChangeQuestion
|
||||||
|
{
|
||||||
|
public Guid QuestionId { get; set; }
|
||||||
|
|
||||||
|
public string Answer { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// public
|
|
||||||
//}
|
|
||||||
|
|
||||||
public class ReadClinicalDataInDto
|
public class ReadClinicalDataInDto
|
||||||
{
|
{
|
||||||
|
@ -742,6 +764,37 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public List<SetOncologyQuestion> OncologyQuestionList { get; set; }
|
public List<SetOncologyQuestion> OncologyQuestionList { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class BatchSubmitGlobalReadingInfo
|
||||||
|
{
|
||||||
|
public Guid GlobalTaskId { get; set; }
|
||||||
|
|
||||||
|
public Guid SubjectId { get; set; }
|
||||||
|
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
public List<SubmitGlobalReading> VisitTaskAnswerList { get; set; }
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class SubmitGlobalReading
|
||||||
|
{
|
||||||
|
public Guid VisitTaskId { get; set; }
|
||||||
|
|
||||||
|
public List<GlobalAnswer> AnswerList { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GlobalAnswer
|
||||||
|
{
|
||||||
|
public Guid? QuestionId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public GlobalAnswerType GlobalAnswerType { get; set; }
|
||||||
|
|
||||||
|
public string Answer { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class SaveGlobalReadingInfoInDto
|
public class SaveGlobalReadingInfoInDto
|
||||||
{
|
{
|
||||||
public Guid GlobalTaskId { get; set; }
|
public Guid GlobalTaskId { get; set; }
|
||||||
|
|
|
@ -34,6 +34,45 @@ namespace IRaCIS.Application.Services
|
||||||
return ResponseOutput.Ok(true);
|
return ResponseOutput.Ok(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 批量提交全局阅片信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> BatchSubmitGlobalReadingInfo(BatchSubmitGlobalReadingInfo inDto)
|
||||||
|
{
|
||||||
|
await VerifyTaskIsSign(inDto.GlobalTaskId);
|
||||||
|
foreach (var item in inDto.VisitTaskAnswerList)
|
||||||
|
{
|
||||||
|
foreach (var answer in item.AnswerList)
|
||||||
|
{
|
||||||
|
await _readingGlobalTaskInfoRepository.BatchDeleteNoTrackingAsync(x => x.GlobalTaskId == inDto.GlobalTaskId && x.TaskId == item.VisitTaskId && x.GlobalAnswerType == answer.GlobalAnswerType && x.QuestionId == answer.QuestionId);
|
||||||
|
await _readingTaskQuestionAnswerRepository.BatchUpdateNoTrackingAsync(x => x.VisitTaskId == item.VisitTaskId && x.ReadingQuestionTrialId == answer.QuestionId, x => new ReadingTaskQuestionAnswer()
|
||||||
|
{
|
||||||
|
GlobalChangeAnswer = answer.Answer
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var answers= inDto.VisitTaskAnswerList.SelectMany(x => x.AnswerList.Select(y => new ReadingGlobalTaskInfo()
|
||||||
|
{
|
||||||
|
Answer = y.Answer,
|
||||||
|
QuestionId = y.QuestionId,
|
||||||
|
SubjectId = inDto.SubjectId,
|
||||||
|
GlobalTaskId = inDto.GlobalTaskId,
|
||||||
|
GlobalAnswerType = y.GlobalAnswerType,
|
||||||
|
TaskId = x.VisitTaskId,
|
||||||
|
TrialId = inDto.TrialId,
|
||||||
|
})).ToList();
|
||||||
|
|
||||||
|
await _readingGlobalTaskInfoRepository.AddRangeAsync(answers);
|
||||||
|
await _visitTaskRepository.UpdatePartialFromQueryAsync(t => t.Id == inDto.GlobalTaskId, u => new VisitTask() { ReadingTaskState = ReadingTaskState.Reading });
|
||||||
|
var result = await _readingGlobalTaskInfoRepository.SaveChangesAsync();
|
||||||
|
return ResponseOutput.Ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#region 全局阅片相关
|
#region 全局阅片相关
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保存全局阅片结果
|
/// 保存全局阅片结果
|
||||||
|
|
|
@ -120,10 +120,31 @@ namespace IRaCIS.Application.Services
|
||||||
this._trialEmailNoticeConfigService = trialEmailNoticeConfigService;
|
this._trialEmailNoticeConfigService = trialEmailNoticeConfigService;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
public async Task ChangeCalculationAnswer()
|
/// 修改计算问题
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task ChangeCalculationAnswer(ChangeCalculationAnswerInDto inDto)
|
||||||
{
|
{
|
||||||
|
foreach (var item in inDto.QuestionAnswer)
|
||||||
|
{
|
||||||
|
await _readingTaskQuestionAnswerRepository.UpdatePartialFromQueryAsync(x=>x.VisitTaskId==inDto.VisitTaskId&&x.ReadingQuestionTrialId==item.QuestionId, x => new ReadingTaskQuestionAnswer()
|
||||||
|
{
|
||||||
|
Answer = item.Answer,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
foreach (var item in inDto.TableQuestionAnswer)
|
||||||
|
{
|
||||||
|
await _readingTableQuestionAnswerRepository.UpdatePartialFromQueryAsync(x => x.VisitTaskId == inDto.VisitTaskId && x.RowId == item.RowId&&x.TableQuestionId==item.TableQuestionId, x => new ReadingTableQuestionAnswer()
|
||||||
|
{
|
||||||
|
Answer = item.Answer,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
Loading…
Reference in New Issue