Uat_Study
he 2022-11-01 11:34:17 +08:00
parent 57bb9e5bba
commit 25176204bf
1 changed files with 4 additions and 0 deletions

View File

@ -586,6 +586,7 @@ namespace IRaCIS.Application.Services
[HttpPost] [HttpPost]
public async Task SplitLesion(SplitLesionInDto inDto) public async Task SplitLesion(SplitLesionInDto inDto)
{ {
await VerifyTaskIsSign(inDto.VisitTaskId);
await this.VerifyIsBaseLineTask(inDto.VisitTaskId); await this.VerifyIsBaseLineTask(inDto.VisitTaskId);
var rowAnswer = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == inDto.RowId).AsNoTracking().FirstNotNullAsync(); var rowAnswer = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == inDto.RowId).AsNoTracking().FirstNotNullAsync();
var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == rowAnswer.RowIndex && x.QuestionId == inDto.QuestionId).Include(x => x.ReadingTableQuestionTrial).ToListAsync(); var tableAnswers = await _readingTableQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && x.RowIndex == rowAnswer.RowIndex && x.QuestionId == inDto.QuestionId).Include(x => x.ReadingTableQuestionTrial).ToListAsync();
@ -630,6 +631,7 @@ namespace IRaCIS.Application.Services
[HttpPost] [HttpPost]
public async Task MergeLesion(MergeLesionInDto inDto) public async Task MergeLesion(MergeLesionInDto inDto)
{ {
await VerifyTaskIsSign(inDto.VisitTaskId);
await this.VerifyIsBaseLineTask(inDto.VisitTaskId); await this.VerifyIsBaseLineTask(inDto.VisitTaskId);
var rowsInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && (x.Id == inDto.MainRowId || x.Id == inDto.MergeRowId)).ToListAsync(); var rowsInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId && (x.Id == inDto.MainRowId || x.Id == inDto.MergeRowId)).ToListAsync();
@ -694,6 +696,7 @@ namespace IRaCIS.Application.Services
[HttpPost] [HttpPost]
public async Task<IResponseOutput> ChangeDicomReadingQuestionAnswer(ChangeDicomReadingQuestionAnswerInDto inDto) public async Task<IResponseOutput> ChangeDicomReadingQuestionAnswer(ChangeDicomReadingQuestionAnswerInDto inDto)
{ {
await VerifyTaskIsSign(inDto.VisitTaskId);
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync(); var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
var criterionId = taskInfo.TrialReadingCriterionId; var criterionId = taskInfo.TrialReadingCriterionId;
var questionIds = inDto.Answers.Select(x => x.Id).ToList(); var questionIds = inDto.Answers.Select(x => x.Id).ToList();
@ -723,6 +726,7 @@ namespace IRaCIS.Application.Services
[HttpPost] [HttpPost]
public async Task<IResponseOutput> DeleteReadingRowAnswer(DeleteReadingRowAnswerInDto inDto) public async Task<IResponseOutput> DeleteReadingRowAnswer(DeleteReadingRowAnswerInDto inDto)
{ {
await VerifyTaskIsSign(inDto.VisitTaskId);
var deleteRowInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == inDto.RowId).FirstNotNullAsync(); var deleteRowInfo = await _readingTableAnswerRowInfoRepository.Where(x => x.Id == inDto.RowId).FirstNotNullAsync();
if (deleteRowInfo == null) if (deleteRowInfo == null)