修改一版
parent
b65ae6a58a
commit
182f47bbca
|
@ -703,7 +703,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
SouceReadModuleId = firstTask.SouceReadModuleId,
|
||||
TaskCode = AppSettings.GetCodeStr(currentMaxCodeInt + 1, nameof(VisitTask)),
|
||||
TaskState = TaskState.Effect,
|
||||
DoctorUserId = subjectUser == null ? null : subjectUser.Id,
|
||||
DoctorUserId = subjectUser == null ? null : subjectUser.DoctorUserId,
|
||||
TaskAllocationState = subjectUser == null ? TaskAllocationState.NotAllocate : TaskAllocationState.Allocated,
|
||||
AllocateTime = subjectUser == null ? null : DateTime.Now,
|
||||
|
||||
|
|
|
@ -261,8 +261,6 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public List<JudgeReadingInfoDto> VisitTaskInfoList { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
public ReadingTaskState ReadingTaskState { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
@ -312,14 +310,30 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public class JudgeReadingInfoDto
|
||||
{
|
||||
public string VisitName { get; set; }
|
||||
|
||||
public Guid VisitId { get; set; }
|
||||
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public Arm ArmEnum { get; set; }
|
||||
|
||||
public List<JudgeQuestionAnswerInfo> JudgeQuestionAnswerInfoList { get; set; }
|
||||
public List<JudgeQuestion> JudgeQuestionList { get; set; }
|
||||
}
|
||||
|
||||
|
||||
public class JudgeQuestion
|
||||
{
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
|
||||
public string QuestionName { get; set; }
|
||||
|
||||
public string Answer { get; set; }
|
||||
|
||||
|
||||
}
|
||||
|
||||
public List<GetTrialReadingQuestionOutDto> TaskReadingQuestionList { get; set; }
|
||||
}
|
||||
|
||||
public class GetTrialReadingQuestionInDto
|
||||
{
|
||||
|
|
|
@ -632,27 +632,42 @@ namespace IRaCIS.Application.Services
|
|||
JudgeResultImagePath = visitTask.JudgeResultImagePath,
|
||||
VisitTaskInfoList = new List<JudgeReadingInfoDto>()
|
||||
};
|
||||
var firstTask = await _visitTaskRepository.Where(x => x.JudgeVisitTaskId == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
var visitIds = await _visitTaskRepository.Where(x => x.JudgeVisitTaskId == inDto.VisitTaskId).Select(x => new
|
||||
{
|
||||
x.Id,
|
||||
x.ArmEnum,
|
||||
}).ToListAsync();
|
||||
foreach (var item in visitIds)
|
||||
|
||||
switch (firstTask.ReadingCategory)
|
||||
{
|
||||
var taskReadingQuestionList = await this.GetTaskAndAnswer(item.Id);
|
||||
judgeInfo.VisitTaskInfoList.Add(
|
||||
new JudgeReadingInfoDto()
|
||||
{
|
||||
JudgeQuestionAnswerInfoList = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == item.Id && x.ReadingQuestionTrial.IsJudgeQuestion).Select(x => new JudgeQuestionAnswerInfo
|
||||
{
|
||||
Answer = x.Answer,
|
||||
QuestionName = x.ReadingQuestionTrial.QuestionName,
|
||||
}).ToListAsync(),
|
||||
VisitTaskId = item.Id,
|
||||
ArmEnum = item.ArmEnum,
|
||||
TaskReadingQuestionList = taskReadingQuestionList,
|
||||
});
|
||||
case ReadingCategory.Visit:
|
||||
JudgeReadingInfoDto judgeReadingInfoDto = new JudgeReadingInfoDto() {
|
||||
VisitId= firstTask.SourceSubjectVisitId.Value,
|
||||
VisitName= firstTask.TaskBlindName,
|
||||
};
|
||||
|
||||
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
//foreach (var item in visitIds)
|
||||
//{
|
||||
// var taskReadingQuestionList = await this.GetTaskAndAnswer(item.Id);
|
||||
// judgeInfo.VisitTaskInfoList.Add(
|
||||
// new JudgeReadingInfoDto()
|
||||
// {
|
||||
// JudgeQuestionAnswerInfoList = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == item.Id && x.ReadingQuestionTrial.IsJudgeQuestion).Select(x => new JudgeQuestionAnswerInfo
|
||||
// {
|
||||
// Answer = x.Answer,
|
||||
// QuestionName = x.ReadingQuestionTrial.QuestionName,
|
||||
// }).ToListAsync(),
|
||||
// VisitTaskId = item.Id,
|
||||
// ArmEnum = item.ArmEnum,
|
||||
// TaskReadingQuestionList = taskReadingQuestionList,
|
||||
// });
|
||||
//}
|
||||
return judgeInfo;
|
||||
}
|
||||
#endregion
|
||||
|
|
|
@ -405,6 +405,11 @@ namespace IRaCIS.Core.Application.Service
|
|||
MedicalDialogCloseEnum = MedicalDialogClose.IRApplyReReading,
|
||||
});
|
||||
}
|
||||
|
||||
await _taskMedicalReviewRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.TaskMedicalReviewId, x => new TaskMedicalReview()
|
||||
{
|
||||
DoctorUserIdeaEnum = inDto.DoctorUserIdeaEnum,
|
||||
});
|
||||
ReadingMedicalReviewDialog dialog = new ReadingMedicalReviewDialog()
|
||||
{
|
||||
TaskMedicalReviewId = inDto.TaskMedicalReviewId,
|
||||
|
|
Loading…
Reference in New Issue