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