修改一版
parent
6c1a257179
commit
b59af0b089
|
@ -86,119 +86,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
medicalReviewInfo.AuditState = medicalReviewInfo.MedicalReviewInfo.AuditState;
|
medicalReviewInfo.AuditState = medicalReviewInfo.MedicalReviewInfo.AuditState;
|
||||||
medicalReviewInfo.IsSendMessage = medicalReviewInfo.MedicalReviewInfo.IsSendMessage;
|
medicalReviewInfo.IsSendMessage = medicalReviewInfo.MedicalReviewInfo.IsSendMessage;
|
||||||
|
|
||||||
#region 取任务
|
|
||||||
if (medicalReviewInfo.IsReadingTaskViewInOrder)
|
|
||||||
{
|
|
||||||
medicalReviewInfo.TaskList = await _visitTaskRepository
|
|
||||||
.WhereIf(taskInfo.ArmEnum == Arm.JudgeArm, x => x.ArmEnum == Arm.JudgeArm)
|
|
||||||
.WhereIf(taskInfo.ArmEnum != Arm.JudgeArm, x => x.ArmEnum != Arm.JudgeArm)
|
|
||||||
.Where(x=>x.IsAnalysisCreate== taskInfo.IsAnalysisCreate)
|
|
||||||
.Where(x=>x.TaskState==TaskState.Effect)
|
|
||||||
.Where(x => x.SubjectId == taskInfo.SubjectId
|
|
||||||
&& x.DoctorUserId == taskInfo.DoctorUserId &&
|
|
||||||
x.ReadingTaskState == ReadingTaskState.HaveSigned &&
|
|
||||||
x.ReReadingApplyState != ReReadingApplyState.Agree
|
|
||||||
).OrderBy(x => x.VisitTaskNum).Select(x => new TaskInfo()
|
|
||||||
{
|
|
||||||
TaskId = x.Id,
|
|
||||||
IsCurrentTask = x.Id == taskInfo.Id,
|
|
||||||
ReadingCategory = x.ReadingCategory,
|
|
||||||
TaskBlindName = x.TaskBlindName,
|
|
||||||
ArmEnum=x.ArmEnum,
|
|
||||||
TaskName = x.TaskName,
|
|
||||||
SouceReadModuleId=x.SouceReadModuleId,
|
|
||||||
SourceSubjectVisitId=x.SourceSubjectVisitId,
|
|
||||||
JudgeVisitTaskId=x.JudgeVisitTaskId,
|
|
||||||
JudgeResultArm=x.JudgeResultTask.ArmEnum,
|
|
||||||
SubjectId=x.SubjectId,
|
|
||||||
JudgeQuestionAnswerInfoList = x.ArmEnum== Arm.JudgeArm? x.JudgeResultTask.ReadingTaskQuestionAnswerList.Where(y=>y.ReadingQuestionTrial.IsJudgeQuestion).Select(y=> new JudgeQuestionAnswerInfo()
|
|
||||||
{
|
|
||||||
Answer=y.Answer,
|
|
||||||
QuestionName=y.ReadingQuestionTrial.QuestionName,
|
|
||||||
DictionaryCode=y.ReadingQuestionTrial.DictionaryCode,
|
|
||||||
QuestionGenre=y.ReadingQuestionTrial.QuestionGenre,
|
|
||||||
|
|
||||||
}).ToList() : x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.IsJudgeQuestion).Select(y => new JudgeQuestionAnswerInfo()
|
|
||||||
{
|
|
||||||
Answer = y.Answer,
|
|
||||||
QuestionName = y.ReadingQuestionTrial.QuestionName,
|
|
||||||
DictionaryCode = y.ReadingQuestionTrial.DictionaryCode,
|
|
||||||
QuestionGenre = y.ReadingQuestionTrial.QuestionGenre,
|
|
||||||
}).ToList()
|
|
||||||
}).ToListAsync();
|
|
||||||
|
|
||||||
List<TaskInfo> otherTask = await _visitTaskRepository.Where(x => x.ArmEnum != Arm.JudgeArm && x.SubjectId == taskInfo.SubjectId
|
|
||||||
&& x.DoctorUserId != taskInfo.DoctorUserId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ReReadingApplyState != ReReadingApplyState.Agree)
|
|
||||||
.Where(x => x.IsAnalysisCreate == taskInfo.IsAnalysisCreate)
|
|
||||||
.OrderBy(x => x.VisitTaskNum).Select(x => new TaskInfo()
|
|
||||||
{
|
|
||||||
TaskId = x.Id,
|
|
||||||
IsCurrentTask = x.Id == taskInfo.Id,
|
|
||||||
ReadingCategory = x.ReadingCategory,
|
|
||||||
TaskBlindName = x.TaskBlindName,
|
|
||||||
ArmEnum = x.ArmEnum,
|
|
||||||
TaskName = x.TaskName,
|
|
||||||
SouceReadModuleId = x.SouceReadModuleId,
|
|
||||||
SourceSubjectVisitId = x.SourceSubjectVisitId,
|
|
||||||
}).ToListAsync();
|
|
||||||
|
|
||||||
medicalReviewInfo.TaskList.ForEach(x =>
|
|
||||||
{
|
|
||||||
x.OtherTaskId = otherTask.Where(y => y.SouceReadModuleId == x.SouceReadModuleId && y.SourceSubjectVisitId == x.SourceSubjectVisitId).Select(y => y.TaskId).FirstOrDefault();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
medicalReviewInfo.TaskList = await _visitTaskRepository.Where(x => x.Id == taskInfo.Id).Select(x => new TaskInfo()
|
|
||||||
{
|
|
||||||
TaskId = x.Id,
|
|
||||||
IsCurrentTask = x.Id == taskInfo.Id,
|
|
||||||
ReadingCategory = x.ReadingCategory,
|
|
||||||
TaskBlindName = x.TaskBlindName,
|
|
||||||
ArmEnum = x.ArmEnum,
|
|
||||||
TaskName = x.TaskName,
|
|
||||||
SouceReadModuleId = x.SouceReadModuleId,
|
|
||||||
SourceSubjectVisitId = x.SourceSubjectVisitId,
|
|
||||||
SubjectId = x.SubjectId,
|
|
||||||
JudgeQuestionAnswerInfoList = x.ArmEnum == Arm.JudgeArm ? x.JudgeResultTask.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.IsJudgeQuestion).Select(y => new JudgeQuestionAnswerInfo()
|
|
||||||
{
|
|
||||||
Answer = y.Answer,
|
|
||||||
QuestionName = y.ReadingQuestionTrial.QuestionName,
|
|
||||||
DictionaryCode = y.ReadingQuestionTrial.DictionaryCode,
|
|
||||||
QuestionGenre = y.ReadingQuestionTrial.QuestionGenre,
|
|
||||||
}).ToList() : x.ReadingTaskQuestionAnswerList.Where(y => y.ReadingQuestionTrial.IsJudgeQuestion).Select(y => new JudgeQuestionAnswerInfo()
|
|
||||||
{
|
|
||||||
Answer = y.Answer,
|
|
||||||
QuestionName = y.ReadingQuestionTrial.QuestionName,
|
|
||||||
DictionaryCode = y.ReadingQuestionTrial.DictionaryCode,
|
|
||||||
QuestionGenre = y.ReadingQuestionTrial.QuestionGenre,
|
|
||||||
}).ToList()
|
|
||||||
}).ToListAsync();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List<TaskInfo> otherTask = await _visitTaskRepository.Where(x => x.ArmEnum != Arm.JudgeArm && x.SouceReadModuleId == taskInfo.SouceReadModuleId && x.SourceSubjectVisitId == taskInfo.SourceSubjectVisitId
|
|
||||||
&& x.DoctorUserId != taskInfo.DoctorUserId && x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ReReadingApplyState != ReReadingApplyState.Agree
|
|
||||||
)
|
|
||||||
.Where(x => x.IsAnalysisCreate == taskInfo.IsAnalysisCreate)
|
|
||||||
.OrderBy(x => x.VisitTaskNum).Select(x => new TaskInfo()
|
|
||||||
{
|
|
||||||
TaskId = x.Id,
|
|
||||||
IsCurrentTask = x.Id == taskInfo.Id,
|
|
||||||
ReadingCategory = x.ReadingCategory,
|
|
||||||
TaskBlindName = x.TaskBlindName,
|
|
||||||
ArmEnum = x.ArmEnum,
|
|
||||||
TaskName = x.TaskName,
|
|
||||||
SouceReadModuleId = x.SouceReadModuleId,
|
|
||||||
SourceSubjectVisitId = x.SourceSubjectVisitId,
|
|
||||||
}).ToListAsync();
|
|
||||||
|
|
||||||
medicalReviewInfo.TaskList.ForEach(x =>
|
|
||||||
{
|
|
||||||
x.OtherTaskId = otherTask.Where(y => y.SouceReadModuleId == x.SouceReadModuleId && y.SourceSubjectVisitId == x.SourceSubjectVisitId).Select(y => y.TaskId).FirstOrDefault();
|
|
||||||
});
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
medicalReviewInfo.QuestionAnswerList = await this.GetMedicalQuestionAnswer(inDto);
|
medicalReviewInfo.QuestionAnswerList = await this.GetMedicalQuestionAnswer(inDto);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -78,15 +78,15 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
#region 获取计算问题
|
#region 获取计算问题
|
||||||
|
|
||||||
/// <summary>
|
///// <summary>
|
||||||
/// 获取自定义问题预览
|
///// 获取自定义问题预览
|
||||||
/// </summary>
|
///// </summary>
|
||||||
/// <returns></returns>
|
///// <returns></returns>
|
||||||
[HttpPost]
|
//[HttpPost]
|
||||||
public async Task<(List<DicomReadingQuestionAnswer>,bool)> GetCustomQuestionPreview(GetCustomQuestionPreviewInDto inDto)
|
//public async Task<(List<DicomReadingQuestionAnswer>,bool)> GetCustomQuestionPreview(GetCustomQuestionPreviewInDto inDto)
|
||||||
{
|
//{
|
||||||
return (await _iReadingImageTaskService.GetReadingQuestion(inDto.TrialReadingCriterionId, null),true);
|
// return (await _iReadingImageTaskService.GetReadingQuestion(inDto.TrialReadingCriterionId, null),true);
|
||||||
}
|
//}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -514,18 +514,30 @@ namespace IRaCIS.Application.Services
|
||||||
/// <param name="tableAnsweRowInfos"></param>
|
/// <param name="tableAnsweRowInfos"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[NonDynamicMethod]
|
[NonDynamicMethod]
|
||||||
public async Task<GetReadingTableQuestionOutDto> GetReadingTableQuestion(Guid trialReadingCriterionId, Guid? taskId, List<ReadingTableQuestionAnswerInfo> tableAnswers, List<TableAnsweRowInfo> tableAnsweRowInfos)
|
public async Task<GetReadingTableQuestionOutDto> GetReadingTableQuestion(Guid trialReadingCriterionId, Guid? taskId, List<ReadingTableQuestionAnswerInfo> tableAnswers, List<TableAnsweRowInfo> tableAnsweRowInfos,bool isGetallQuestion=false)
|
||||||
{
|
{
|
||||||
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == trialReadingCriterionId).FirstNotNullAsync();
|
var criterionInfo = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == trialReadingCriterionId).FirstNotNullAsync();
|
||||||
|
|
||||||
var qusetionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialReadingCriterionId).ProjectTo<TrialReadQuestionData>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
var qusetionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == trialReadingCriterionId).ProjectTo<TrialReadQuestionData>(_mapper.ConfigurationProvider).OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
|
|
||||||
|
// 是否获取所有问题
|
||||||
|
if (isGetallQuestion)
|
||||||
|
{
|
||||||
|
if (!criterionInfo.IseCRFShowInDicomReading)
|
||||||
|
{
|
||||||
|
qusetionList = qusetionList.Where(x => x.IsShowInDicom).OrderBy(x => x.ShowOrder).ToList();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
if (!criterionInfo.IseCRFShowInDicomReading)
|
if (!criterionInfo.IseCRFShowInDicomReading)
|
||||||
{
|
{
|
||||||
qusetionList = qusetionList.Where(x => x.IsShowInDicom && (x.Type == ReadingQestionType.Table || x.Type == ReadingQestionType.Group)).OrderBy(x => x.ShowOrder).ToList();
|
qusetionList = qusetionList.Where(x => x.IsShowInDicom && (x.Type == ReadingQestionType.Table || x.Type == ReadingQestionType.Group)).OrderBy(x => x.ShowOrder).ToList();
|
||||||
}
|
}
|
||||||
var usedGurops = qusetionList.Where(x => x.Type == ReadingQestionType.Table).Select(x => x.GroupName).ToList();
|
var usedGurops = qusetionList.Where(x => x.Type == ReadingQestionType.Table).Select(x => x.GroupName).ToList();
|
||||||
qusetionList = qusetionList.Where(x => usedGurops.Contains(x.GroupName)).ToList();
|
qusetionList = qusetionList.Where(x => usedGurops.Contains(x.GroupName)).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (taskId != null)
|
if (taskId != null)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue