Uat_Study
parent
88bdeff571
commit
9ae1cb5fe1
|
@ -40,7 +40,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
{
|
{
|
||||||
public Guid? QuestionId { get; set; }
|
public Guid? QuestionId { get; set; }
|
||||||
|
|
||||||
public Guid visitTaskId { get; set; }
|
public Guid VisitTaskId { get; set; }
|
||||||
|
|
||||||
public string Answer { get; set; }
|
public string Answer { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
@ -78,6 +78,7 @@ namespace IRaCIS.Application.Services
|
||||||
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 全局阅片相关
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取全局阅片历史记录
|
/// 获取全局阅片历史记录
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -111,12 +112,12 @@ namespace IRaCIS.Application.Services
|
||||||
await _readingGlobalTaskInfoRepository.BatchDeleteNoTrackingAsync(x => x.GlobalTaskId == inDto.GlobalTaskId);
|
await _readingGlobalTaskInfoRepository.BatchDeleteNoTrackingAsync(x => x.GlobalTaskId == inDto.GlobalTaskId);
|
||||||
await _readingGlobalTaskInfoRepository.AddRangeAsync(inDto.QuestionList.Select(x => new ReadingGlobalTaskInfo()
|
await _readingGlobalTaskInfoRepository.AddRangeAsync(inDto.QuestionList.Select(x => new ReadingGlobalTaskInfo()
|
||||||
{
|
{
|
||||||
Answer=x.Answer,
|
Answer = x.Answer,
|
||||||
QuestionId=x.QuestionId,
|
QuestionId = x.QuestionId,
|
||||||
SubjectId=inDto.SubjectId,
|
SubjectId = inDto.SubjectId,
|
||||||
GlobalTaskId=inDto.GlobalTaskId,
|
GlobalTaskId = inDto.GlobalTaskId,
|
||||||
TaskId=x.visitTaskId,
|
TaskId = x.VisitTaskId,
|
||||||
TrialId=inDto.TrialId,
|
TrialId = inDto.TrialId,
|
||||||
}).ToList());
|
}).ToList());
|
||||||
|
|
||||||
var result = await _readingGlobalTaskInfoRepository.SaveChangesAsync();
|
var result = await _readingGlobalTaskInfoRepository.SaveChangesAsync();
|
||||||
|
@ -138,7 +139,8 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("当前任务不是全局阅片任务");
|
throw new BusinessValidationFailedException("当前任务不是全局阅片任务");
|
||||||
}
|
}
|
||||||
GetGlobalReadingInfoOutDto result = new GetGlobalReadingInfoOutDto() {
|
GetGlobalReadingInfoOutDto result = new GetGlobalReadingInfoOutDto()
|
||||||
|
{
|
||||||
GlobalTaskId = inDto.VisitTaskId,
|
GlobalTaskId = inDto.VisitTaskId,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -154,8 +156,8 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
QuestionId = y.ReadingQuestionTrialId,
|
QuestionId = y.ReadingQuestionTrialId,
|
||||||
QuestionName = y.ReadingQuestionTrial.QuestionName,
|
QuestionName = y.ReadingQuestionTrial.QuestionName,
|
||||||
Type=y.ReadingQuestionTrial.Type,
|
Type = y.ReadingQuestionTrial.Type,
|
||||||
TypeValue=y.ReadingQuestionTrial.TypeValue,
|
TypeValue = y.ReadingQuestionTrial.TypeValue,
|
||||||
Answer = y.Answer
|
Answer = y.Answer
|
||||||
}).ToList()
|
}).ToList()
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
@ -169,12 +171,12 @@ namespace IRaCIS.Application.Services
|
||||||
globalReadingQuestion
|
globalReadingQuestion
|
||||||
, l => new { a = l.QuestionId, b = x.VisitTaskId }
|
, l => new { a = l.QuestionId, b = x.VisitTaskId }
|
||||||
, r => new { a = r.QuestionId, b = r.TaskId }
|
, r => new { a = r.QuestionId, b = r.TaskId }
|
||||||
, (l, r) => new { question=l, global=r })
|
, (l, r) => new { question = l, global = r })
|
||||||
.SelectMany(lr => lr.global.DefaultIfEmpty(), (lr, r) => new GlobalQuestionInfo
|
.SelectMany(lr => lr.global.DefaultIfEmpty(), (lr, r) => new GlobalQuestionInfo
|
||||||
{
|
{
|
||||||
Answer = lr.global == null ? string.Empty : lr.global.Select(x=>x.Answer).FirstOrDefault(),
|
Answer = lr.global == null ? string.Empty : lr.global.Select(x => x.Answer).FirstOrDefault(),
|
||||||
QuestionId =lr.question.QuestionId,
|
QuestionId = lr.question.QuestionId,
|
||||||
QuestionName=lr.question.QuestionName,
|
QuestionName = lr.question.QuestionName,
|
||||||
Type = lr.question.Type,
|
Type = lr.question.Type,
|
||||||
TypeValue = lr.question.TypeValue,
|
TypeValue = lr.question.TypeValue,
|
||||||
|
|
||||||
|
@ -182,9 +184,9 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
var reason = new GlobalQuestionInfo()
|
var reason = new GlobalQuestionInfo()
|
||||||
{
|
{
|
||||||
Answer = globalReadingQuestion.Where(y => y.TaskId == x.VisitTaskId && y.QuestionId == null).Select(x => x.Answer).FirstOrDefault()??String.Empty,
|
Answer = globalReadingQuestion.Where(y => y.TaskId == x.VisitTaskId && y.QuestionId == null).Select(x => x.Answer).FirstOrDefault() ?? String.Empty,
|
||||||
QuestionName="原因",
|
QuestionName = "原因",
|
||||||
Type="input",
|
Type = "input",
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -195,8 +197,9 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取下一个阅片任务
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取下一个阅片任务
|
/// 获取下一个阅片任务
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -209,11 +212,11 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
if (inDto.VisistTaskId != null)
|
if (inDto.VisistTaskId != null)
|
||||||
{
|
{
|
||||||
task = await _visitTaskRepository.Where(x => x.Id== inDto.VisistTaskId).Select(x => new GetReadingTaskDto()
|
task = await _visitTaskRepository.Where(x => x.Id == inDto.VisistTaskId).Select(x => new GetReadingTaskDto()
|
||||||
{
|
{
|
||||||
VisitTaskId = x.Id,
|
VisitTaskId = x.Id,
|
||||||
TaskBlindName = x.TaskBlindName,
|
TaskBlindName = x.TaskBlindName,
|
||||||
SubjectId=x.SubjectId,
|
SubjectId = x.SubjectId,
|
||||||
ReadingCategory = x.ReadingCategory,
|
ReadingCategory = x.ReadingCategory,
|
||||||
VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule.SubjectVisitId,
|
VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule.SubjectVisitId,
|
||||||
VisitNum = x.VisitTaskNum,
|
VisitNum = x.VisitTaskNum,
|
||||||
|
@ -223,13 +226,13 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
else if (inDto.SubjectId != null)
|
else if (inDto.SubjectId != null)
|
||||||
{
|
{
|
||||||
var subjectList =await _subjectRepository.Where(t => t.TrialId == inDto.TrialId)
|
var subjectList = await _subjectRepository.Where(t => t.TrialId == inDto.TrialId)
|
||||||
|
|
||||||
.Select(s => new SubjectTask()
|
.Select(s => new SubjectTask()
|
||||||
{
|
{
|
||||||
SubjectId = s.Id,
|
SubjectId = s.Id,
|
||||||
UnReadTaskCount = s.SubjectVisitTaskList.Count(t => t.ReadingTaskState != ReadingTaskState.HaveSigned && t.DoctorUserId == _userInfo.Id && t.TaskState == TaskState.Effect),
|
UnReadTaskCount = s.SubjectVisitTaskList.Count(t => t.ReadingTaskState != ReadingTaskState.HaveSigned && t.DoctorUserId == _userInfo.Id && t.TaskState == TaskState.Effect),
|
||||||
}).OrderBy(x=>x.SubjectId).ToListAsync();
|
}).OrderBy(x => x.SubjectId).ToListAsync();
|
||||||
subjectList = subjectList.Select((x, index) => new SubjectTask()
|
subjectList = subjectList.Select((x, index) => new SubjectTask()
|
||||||
{
|
{
|
||||||
Index = index,
|
Index = index,
|
||||||
|
@ -238,19 +241,19 @@ namespace IRaCIS.Application.Services
|
||||||
}).ToList();
|
}).ToList();
|
||||||
|
|
||||||
|
|
||||||
var subjectIndex = subjectList.Where(x => x.SubjectId == inDto.SubjectId).Select(x=>x.Index).FirstOrDefault();
|
var subjectIndex = subjectList.Where(x => x.SubjectId == inDto.SubjectId).Select(x => x.Index).FirstOrDefault();
|
||||||
var newSubjectId = subjectList.Where(x => x.Index >= subjectIndex && x.UnReadTaskCount != 0).Select(x=>x.SubjectId).FirstOrDefault();
|
var newSubjectId = subjectList.Where(x => x.Index >= subjectIndex && x.UnReadTaskCount != 0).Select(x => x.SubjectId).FirstOrDefault();
|
||||||
|
|
||||||
var taskquery = _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.SubjectId == newSubjectId && x.DoctorUserId == _userInfo.Id).Select(x => new GetReadingTaskDto()
|
var taskquery = _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.SubjectId == newSubjectId && x.DoctorUserId == _userInfo.Id).Select(x => new GetReadingTaskDto()
|
||||||
{
|
{
|
||||||
VisitTaskId = x.Id,
|
VisitTaskId = x.Id,
|
||||||
TaskBlindName=x.TaskBlindName,
|
TaskBlindName = x.TaskBlindName,
|
||||||
ReadingCategory = x.ReadingCategory,
|
ReadingCategory = x.ReadingCategory,
|
||||||
VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule==null? default(Guid) : x.ReadModule.SubjectVisitId,
|
VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule == null ? default(Guid) : x.ReadModule.SubjectVisitId,
|
||||||
VisitNum = x.VisitTaskNum,
|
VisitNum = x.VisitTaskNum,
|
||||||
}).OrderBy(x => x.VisitNum).ThenBy(x => x.ReadingCategory);
|
}).OrderBy(x => x.VisitNum).ThenBy(x => x.ReadingCategory);
|
||||||
|
|
||||||
task =await taskquery.FirstOrDefaultAsync();
|
task = await taskquery.FirstOrDefaultAsync();
|
||||||
if (task == null)
|
if (task == null)
|
||||||
{
|
{
|
||||||
throw new BusinessValidationFailedException("任务都已经完成");
|
throw new BusinessValidationFailedException("任务都已经完成");
|
||||||
|
@ -261,15 +264,15 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
task = await _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.DoctorUserId == _userInfo.Id&&x.TaskState==TaskState.Effect).Select(x => new GetReadingTaskDto()
|
task = await _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect).Select(x => new GetReadingTaskDto()
|
||||||
{
|
{
|
||||||
VisitTaskId = x.Id,
|
VisitTaskId = x.Id,
|
||||||
TaskBlindName = x.TaskBlindName,
|
TaskBlindName = x.TaskBlindName,
|
||||||
ReadingCategory = x.ReadingCategory,
|
ReadingCategory = x.ReadingCategory,
|
||||||
VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule == null ? default(Guid) : x.ReadModule.SubjectVisitId,
|
VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule == null ? default(Guid) : x.ReadModule.SubjectVisitId,
|
||||||
VisitNum = x.VisitTaskNum,
|
VisitNum = x.VisitTaskNum,
|
||||||
SubjectId =x.SubjectId,
|
SubjectId = x.SubjectId,
|
||||||
SubjectCode=x.Subject.Code,
|
SubjectCode = x.Subject.Code,
|
||||||
}).FirstOrDefaultAsync();
|
}).FirstOrDefaultAsync();
|
||||||
if (task == null)
|
if (task == null)
|
||||||
{
|
{
|
||||||
|
@ -289,19 +292,22 @@ namespace IRaCIS.Application.Services
|
||||||
await _visitTaskRepository.SaveChangesAsync();
|
await _visitTaskRepository.SaveChangesAsync();
|
||||||
return task;
|
return task;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取阅片非Dicom文件
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取阅片非Dicom文件
|
/// 获取阅片非Dicom文件
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<(List<NoneDicomStudyView>,object)> GetReadingImageFile(GetReadingImgInDto inDto)
|
public async Task<(List<NoneDicomStudyView>, object)> GetReadingImageFile(GetReadingImgInDto inDto)
|
||||||
{
|
{
|
||||||
var task=await GetNextTask( new GetNextTaskInDto() {
|
var task = await GetNextTask(new GetNextTaskInDto()
|
||||||
TrialId=inDto.TrialId,
|
{
|
||||||
SubjectId=inDto.SubjectId,
|
TrialId = inDto.TrialId,
|
||||||
VisistTaskId=inDto.VisistTaskId,
|
SubjectId = inDto.SubjectId,
|
||||||
|
VisistTaskId = inDto.VisistTaskId,
|
||||||
});
|
});
|
||||||
List<Guid> visitIds = new List<Guid>();
|
List<Guid> visitIds = new List<Guid>();
|
||||||
if (task.ReadingCategory == ReadingCategory.Visit)
|
if (task.ReadingCategory == ReadingCategory.Visit)
|
||||||
|
@ -313,7 +319,7 @@ namespace IRaCIS.Application.Services
|
||||||
// 阅片期取前面所有的图像
|
// 阅片期取前面所有的图像
|
||||||
visitIds.AddRange(await _subjectVisitRepository.Where(x => x.VisitNum <= task.VisitNum && x.SubjectId == task.SubjectId).Select(x => x.Id).ToListAsync());
|
visitIds.AddRange(await _subjectVisitRepository.Where(x => x.VisitNum <= task.VisitNum && x.SubjectId == task.SubjectId).Select(x => x.Id).ToListAsync());
|
||||||
}
|
}
|
||||||
List<NoneDicomStudyView> result=await _noneDicomStudyRepository.Where(t => visitIds.Contains(t.SubjectVisitId))
|
List<NoneDicomStudyView> result = await _noneDicomStudyRepository.Where(t => visitIds.Contains(t.SubjectVisitId))
|
||||||
.ProjectTo<NoneDicomStudyView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken }).ToListAsync();
|
.ProjectTo<NoneDicomStudyView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken }).ToListAsync();
|
||||||
|
|
||||||
var trialInfo = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => new
|
var trialInfo = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => new
|
||||||
|
@ -341,18 +347,21 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return (result, new {
|
return (result, new
|
||||||
VisitTaskId= task.VisitTaskId,
|
{
|
||||||
SubjectId=task.SubjectId,
|
VisitTaskId = task.VisitTaskId,
|
||||||
SubjectCode=task.SubjectCode,
|
SubjectId = task.SubjectId,
|
||||||
ReadingCategory= task.ReadingCategory,
|
SubjectCode = task.SubjectCode,
|
||||||
TaskBlindName=task.TaskBlindName,
|
ReadingCategory = task.ReadingCategory,
|
||||||
|
TaskBlindName = task.TaskBlindName,
|
||||||
IsReadingShowPreviousResults = trialInfo.IsReadingShowPreviousResults,
|
IsReadingShowPreviousResults = trialInfo.IsReadingShowPreviousResults,
|
||||||
IsReadingShowSubjectInfo=trialInfo.IsReadingShowSubjectInfo,
|
IsReadingShowSubjectInfo = trialInfo.IsReadingShowSubjectInfo,
|
||||||
IsExistsClinicalData= isExistsClinicalData,
|
IsExistsClinicalData = isExistsClinicalData,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取项目已确认的标准
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取项目已确认的标准
|
/// 获取项目已确认的标准
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -361,7 +370,7 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<GetTrialConfirmCriterionListOutDto>> GetTrialConfirmCriterionList(GetConfirmCriterionInDto inDto)
|
public async Task<List<GetTrialConfirmCriterionListOutDto>> GetTrialConfirmCriterionList(GetConfirmCriterionInDto inDto)
|
||||||
{
|
{
|
||||||
var result= await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId&&x.IsConfirm&&x.IsCompleteConfig)
|
var result = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm && x.IsCompleteConfig)
|
||||||
.Select(x => new GetTrialConfirmCriterionListOutDto()
|
.Select(x => new GetTrialConfirmCriterionListOutDto()
|
||||||
{
|
{
|
||||||
ReadingQuestionCriterionTrialId = x.Id,
|
ReadingQuestionCriterionTrialId = x.Id,
|
||||||
|
@ -369,6 +378,9 @@ namespace IRaCIS.Application.Services
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 配置裁判问题相关
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取项目标准的裁判问题
|
/// 获取项目标准的裁判问题
|
||||||
|
@ -376,7 +388,7 @@ namespace IRaCIS.Application.Services
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<(List<GetTrialCriterionJudgeQuestionListOutDto>,object)> GetTrialCriterionJudgeQuestionList(GetTrialCriterionJudgeQuestionListInDto inDto)
|
public async Task<(List<GetTrialCriterionJudgeQuestionListOutDto>, object)> GetTrialCriterionJudgeQuestionList(GetTrialCriterionJudgeQuestionListInDto inDto)
|
||||||
{
|
{
|
||||||
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).FirstOrDefaultAsync();
|
var trialCriterion = await _readingQuestionCriterionTrialRepository.Where(x => x.TrialId == inDto.TrialId && x.IsConfirm).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
@ -385,12 +397,12 @@ namespace IRaCIS.Application.Services
|
||||||
.WhereIf(trialCriterion.FormType == FormType.MultiplePage, x => x.ReadingCriterionPageId != null)
|
.WhereIf(trialCriterion.FormType == FormType.MultiplePage, x => x.ReadingCriterionPageId != null)
|
||||||
.Select(x => new GetTrialCriterionJudgeQuestionListOutDto()
|
.Select(x => new GetTrialCriterionJudgeQuestionListOutDto()
|
||||||
{
|
{
|
||||||
AnswerGroup = JsonConvert.DeserializeObject<List<string>>(x.AnswerGroup.IsNullOrEmpty()?"[]": x.AnswerGroup),
|
AnswerGroup = JsonConvert.DeserializeObject<List<string>>(x.AnswerGroup.IsNullOrEmpty() ? "[]" : x.AnswerGroup),
|
||||||
AnswerCombination = JsonConvert.DeserializeObject<List<AnswerCombinationDto>>(x.AnswerCombination.IsNullOrEmpty() ? "[]" : x.AnswerCombination),
|
AnswerCombination = JsonConvert.DeserializeObject<List<AnswerCombinationDto>>(x.AnswerCombination.IsNullOrEmpty() ? "[]" : x.AnswerCombination),
|
||||||
QuestionName = x.QuestionName,
|
QuestionName = x.QuestionName,
|
||||||
PageName=x.ReadingCriterionPage.PageName,
|
PageName = x.ReadingCriterionPage.PageName,
|
||||||
TypeValue =x.TypeValue,
|
TypeValue = x.TypeValue,
|
||||||
JudgeType=x.JudgeType,
|
JudgeType = x.JudgeType,
|
||||||
ReadingQuestionTrialId = x.Id
|
ReadingQuestionTrialId = x.Id
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
|
@ -415,14 +427,16 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
AnswerGroup = JsonConvert.SerializeObject(inDto.AnswerGroup),
|
AnswerGroup = JsonConvert.SerializeObject(inDto.AnswerGroup),
|
||||||
AnswerCombination = JsonConvert.SerializeObject(inDto.AnswerCombination),
|
AnswerCombination = JsonConvert.SerializeObject(inDto.AnswerCombination),
|
||||||
JudgeType= inDto.JudgeType,
|
JudgeType = inDto.JudgeType,
|
||||||
}) ;
|
});
|
||||||
|
|
||||||
var result = await _readingQuestionTrialRepository.SaveChangesAsync();
|
var result = await _readingQuestionTrialRepository.SaveChangesAsync();
|
||||||
|
|
||||||
return ResponseOutput.Ok(result);
|
return ResponseOutput.Ok(result);
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取项目的阅片问题
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取项目的阅片问题
|
/// 获取项目的阅片问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -440,34 +454,34 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
var result = new GetTrialReadingQuestionPageDto();
|
var result = new GetTrialReadingQuestionPageDto();
|
||||||
var readingTaskState = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.ReadingTaskState).FirstOrDefaultAsync();
|
var readingTaskState = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).Select(x => x.ReadingTaskState).FirstOrDefaultAsync();
|
||||||
var query= from data in _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId==inDto.ReadingQuestionCriterionTrialId)
|
var query = from data in _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == inDto.ReadingQuestionCriterionTrialId)
|
||||||
|
|
||||||
join page in _readingCriterionPageRepository.AsQueryable() on data.ReadingCriterionPageId??default(Guid) equals page.Id into pageTemp
|
join page in _readingCriterionPageRepository.AsQueryable() on data.ReadingCriterionPageId ?? default(Guid) equals page.Id into pageTemp
|
||||||
from leftpage in pageTemp.DefaultIfEmpty()
|
from leftpage in pageTemp.DefaultIfEmpty()
|
||||||
|
|
||||||
join questionAnswer in _readingTaskQuestionAnswerRepository.Where(x=>x.VisitTaskId==inDto.VisitTaskId) on data.Id equals questionAnswer.ReadingQuestionTrialId into questionAnswerTemp
|
join questionAnswer in _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId) on data.Id equals questionAnswer.ReadingQuestionTrialId into questionAnswerTemp
|
||||||
from leftquestionAnswer in questionAnswerTemp.DefaultIfEmpty()
|
from leftquestionAnswer in questionAnswerTemp.DefaultIfEmpty()
|
||||||
select new GetTrialReadingQuestionOutDto()
|
select new GetTrialReadingQuestionOutDto()
|
||||||
{
|
{
|
||||||
ReadingQuestionTrialId=data.Id,
|
ReadingQuestionTrialId = data.Id,
|
||||||
ReadingQuestionCriterionTrialId=data.ReadingQuestionCriterionTrialId,
|
ReadingQuestionCriterionTrialId = data.ReadingQuestionCriterionTrialId,
|
||||||
TrialId=data.TrialId,
|
TrialId = data.TrialId,
|
||||||
Type=data.Type,
|
Type = data.Type,
|
||||||
ParentTriggerValue=data.ParentTriggerValue,
|
ParentTriggerValue = data.ParentTriggerValue,
|
||||||
GroupName=data.GroupName,
|
GroupName = data.GroupName,
|
||||||
QuestionName=data.QuestionName,
|
QuestionName = data.QuestionName,
|
||||||
IsRequired=data.IsRequired,
|
IsRequired = data.IsRequired,
|
||||||
ShowOrder=data.ShowOrder,
|
ShowOrder = data.ShowOrder,
|
||||||
ParentId=data.ParentId,
|
ParentId = data.ParentId,
|
||||||
TypeValue=data.TypeValue,
|
TypeValue = data.TypeValue,
|
||||||
Answer= leftquestionAnswer.Answer,
|
Answer = leftquestionAnswer.Answer,
|
||||||
ReadingCriterionPageId=data.ReadingCriterionPageId,
|
ReadingCriterionPageId = data.ReadingCriterionPageId,
|
||||||
PageName= leftpage.PageName,
|
PageName = leftpage.PageName,
|
||||||
PageShowOrder = leftpage.ShowOrder,
|
PageShowOrder = leftpage.ShowOrder,
|
||||||
IsPublicPage=leftpage.IsPublicPage,
|
IsPublicPage = leftpage.IsPublicPage,
|
||||||
};
|
};
|
||||||
|
|
||||||
var qusetionList =await query.OrderBy(x=>x.ShowOrder).ToListAsync();
|
var qusetionList = await query.OrderBy(x => x.ShowOrder).ToListAsync();
|
||||||
|
|
||||||
var formType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.ReadingQuestionCriterionTrialId).Select(x => x.FormType).FirstOrDefaultAsync();
|
var formType = await _readingQuestionCriterionTrialRepository.Where(x => x.Id == inDto.ReadingQuestionCriterionTrialId).Select(x => x.FormType).FirstOrDefaultAsync();
|
||||||
var groupList = new List<GetTrialReadingQuestionOutDto>();
|
var groupList = new List<GetTrialReadingQuestionOutDto>();
|
||||||
|
@ -492,18 +506,18 @@ namespace IRaCIS.Application.Services
|
||||||
IsPublicPage = firstData.IsPublicPage,
|
IsPublicPage = firstData.IsPublicPage,
|
||||||
};
|
};
|
||||||
|
|
||||||
var pageGroupList = newPageQusetionList.Where(x =>x.Type =="group"|| (x.ParentId == null&&x.GroupName.IsNullOrEmpty())).ToList();
|
var pageGroupList = newPageQusetionList.Where(x => x.Type == "group" || (x.ParentId == null && x.GroupName.IsNullOrEmpty())).ToList();
|
||||||
pageGroupList.ForEach(x =>
|
pageGroupList.ForEach(x =>
|
||||||
{
|
{
|
||||||
this.FindChildQuestion(x, newPageQusetionList);
|
this.FindChildQuestion(x, newPageQusetionList);
|
||||||
});
|
});
|
||||||
|
|
||||||
page.Childrens = pageGroupList.Where(x=> !(x.Type == "group"&&x.Childrens.Count()==0)).ToList();
|
page.Childrens = pageGroupList.Where(x => !(x.Type == "group" && x.Childrens.Count() == 0)).ToList();
|
||||||
groupList.Add(page);
|
groupList.Add(page);
|
||||||
}
|
}
|
||||||
|
|
||||||
result.PublicPage = groupList.Where(x => x.IsPublicPage.Value).ToList();
|
result.PublicPage = groupList.Where(x => x.IsPublicPage.Value).ToList();
|
||||||
result.MultiPage= groupList.Where(x => !x.IsPublicPage.Value).ToList();
|
result.MultiPage = groupList.Where(x => !x.IsPublicPage.Value).ToList();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -515,7 +529,7 @@ namespace IRaCIS.Application.Services
|
||||||
this.FindChildQuestion(x, qusetionList);
|
this.FindChildQuestion(x, qusetionList);
|
||||||
});
|
});
|
||||||
|
|
||||||
groupList= groupList.Where(x => !(x.Type == "group" && x.Childrens.Count() == 0)).ToList();
|
groupList = groupList.Where(x => !(x.Type == "group" && x.Childrens.Count() == 0)).ToList();
|
||||||
|
|
||||||
result.SinglePage = groupList;
|
result.SinglePage = groupList;
|
||||||
|
|
||||||
|
@ -536,18 +550,20 @@ namespace IRaCIS.Application.Services
|
||||||
return (result, new
|
return (result, new
|
||||||
{
|
{
|
||||||
readingTaskState = readingTaskState,
|
readingTaskState = readingTaskState,
|
||||||
FormType= formType
|
FormType = formType
|
||||||
|
|
||||||
}); ;
|
}); ;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取阅片任务和答案
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取阅片任务和答案
|
/// 获取阅片任务和答案
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
private async Task<List<GetTrialReadingQuestionOutDto>> GetTaskAndAnswer(Guid visitTaskId)
|
private async Task<List<GetTrialReadingQuestionOutDto>> GetTaskAndAnswer(Guid visitTaskId)
|
||||||
{
|
{
|
||||||
var taskQuery=from questionAnswer in _readingTaskQuestionAnswerRepository.Where(x=>x.VisitTaskId== visitTaskId)
|
var taskQuery = from questionAnswer in _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == visitTaskId)
|
||||||
join trialQuestion in _readingQuestionTrialRepository.AsQueryable() on questionAnswer.ReadingQuestionTrialId equals trialQuestion.Id
|
join trialQuestion in _readingQuestionTrialRepository.AsQueryable() on questionAnswer.ReadingQuestionTrialId equals trialQuestion.Id
|
||||||
select new GetTrialReadingQuestionOutDto()
|
select new GetTrialReadingQuestionOutDto()
|
||||||
{
|
{
|
||||||
|
@ -573,7 +589,9 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
return groupList;
|
return groupList;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取裁判阅片任务信息
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取裁判阅片任务信息
|
/// 获取裁判阅片任务信息
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -592,8 +610,8 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
ReadingTaskState = visitTask.ReadingTaskState,
|
ReadingTaskState = visitTask.ReadingTaskState,
|
||||||
JudgeResultTaskId = visitTask.JudgeResultTaskId,
|
JudgeResultTaskId = visitTask.JudgeResultTaskId,
|
||||||
JudgeResultRemark=visitTask.JudgeResultRemark,
|
JudgeResultRemark = visitTask.JudgeResultRemark,
|
||||||
JudgeResultImagePath= visitTask.JudgeResultImagePath,
|
JudgeResultImagePath = visitTask.JudgeResultImagePath,
|
||||||
VisitTaskInfoList = new List<JudgeReadingInfoDto>()
|
VisitTaskInfoList = new List<JudgeReadingInfoDto>()
|
||||||
};
|
};
|
||||||
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
|
||||||
|
@ -607,7 +625,8 @@ namespace IRaCIS.Application.Services
|
||||||
judgeInfo.VisitTaskInfoList.Add(
|
judgeInfo.VisitTaskInfoList.Add(
|
||||||
new JudgeReadingInfoDto()
|
new JudgeReadingInfoDto()
|
||||||
{
|
{
|
||||||
JudgeQuestionAnswerInfoList = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == item.Id&&x.ReadingQuestionTrial.IsJudgeQuestion).Select(x => new JudgeQuestionAnswerInfo {
|
JudgeQuestionAnswerInfoList = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == item.Id && x.ReadingQuestionTrial.IsJudgeQuestion).Select(x => new JudgeQuestionAnswerInfo
|
||||||
|
{
|
||||||
Answer = x.Answer,
|
Answer = x.Answer,
|
||||||
QuestionName = x.ReadingQuestionTrial.QuestionName,
|
QuestionName = x.ReadingQuestionTrial.QuestionName,
|
||||||
}).ToListAsync(),
|
}).ToListAsync(),
|
||||||
|
@ -618,7 +637,9 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
return judgeInfo;
|
return judgeInfo;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 保存裁判问题
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保存裁判问题
|
/// 保存裁判问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -631,33 +652,15 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
JudgeResultTaskId = inDto.JudgeResultTaskId,
|
JudgeResultTaskId = inDto.JudgeResultTaskId,
|
||||||
JudgeResultRemark = inDto.JudgeResultRemark,
|
JudgeResultRemark = inDto.JudgeResultRemark,
|
||||||
JudgeResultImagePath=inDto.JudgeResultImagePath,
|
JudgeResultImagePath = inDto.JudgeResultImagePath,
|
||||||
|
|
||||||
});
|
});
|
||||||
var result=await _visitTaskRepository.SaveChangesAsync();
|
|
||||||
return ResponseOutput.Ok(result);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 提交裁判问题
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="inDto"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
[NonDynamicMethod]
|
|
||||||
public async Task<IResponseOutput> SubmitJudgeVisitTaskResult(SaveJudgeVisitTaskResult inDto)
|
|
||||||
{
|
|
||||||
await _visitTaskRepository.UpdatePartialFromQueryAsync(inDto.VisitTaskId, x => new VisitTask()
|
|
||||||
{
|
|
||||||
JudgeResultTaskId = inDto.JudgeResultTaskId,
|
|
||||||
ReadingTaskState = ReadingTaskState.HaveSigned,
|
|
||||||
JudgeResultRemark = inDto.JudgeResultRemark,
|
|
||||||
SignTime = DateTime.Now,
|
|
||||||
JudgeResultImagePath=inDto.JudgeResultImagePath,
|
|
||||||
});
|
|
||||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||||
return ResponseOutput.Ok(result);
|
return ResponseOutput.Ok(result);
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 获取既往结果
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取既往结果
|
/// 获取既往结果
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -665,11 +668,13 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<GetReadingPastResultListOutDto>> GetReadingPastResultList(GetReadingPastResultListInDto inDto)
|
public async Task<List<GetReadingPastResultListOutDto>> GetReadingPastResultList(GetReadingPastResultListInDto inDto)
|
||||||
{
|
{
|
||||||
var readingPastResultList =await _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId&&x.SubjectId==inDto.SubjectId && x.DoctorUserId == _userInfo.Id
|
var readingPastResultList = await _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.SubjectId == inDto.SubjectId && x.DoctorUserId == _userInfo.Id
|
||||||
&&x.Id!=inDto.VisitTaskId&&x.ReadingTaskState== ReadingTaskState.HaveSigned).ProjectTo<GetReadingPastResultListOutDto>(_mapper.ConfigurationProvider).ToListAsync();
|
&& x.Id != inDto.VisitTaskId && x.ReadingTaskState == ReadingTaskState.HaveSigned).ProjectTo<GetReadingPastResultListOutDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
return readingPastResultList;
|
return readingPastResultList;
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 找子问题
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 找子问题
|
/// 找子问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -678,7 +683,7 @@ namespace IRaCIS.Application.Services
|
||||||
[NonDynamicMethod]
|
[NonDynamicMethod]
|
||||||
public void FindChildQuestion(GetTrialReadingQuestionOutDto trialReadingQuestion, List<GetTrialReadingQuestionOutDto> questionlists)
|
public void FindChildQuestion(GetTrialReadingQuestionOutDto trialReadingQuestion, List<GetTrialReadingQuestionOutDto> questionlists)
|
||||||
{
|
{
|
||||||
trialReadingQuestion.Childrens = questionlists.Where(x => x.ParentId == trialReadingQuestion.ReadingQuestionTrialId||(trialReadingQuestion.Type == "group"&&x.Type != "group" && x.ParentId==null&&x.GroupName==trialReadingQuestion.GroupName)).ToList();
|
trialReadingQuestion.Childrens = questionlists.Where(x => x.ParentId == trialReadingQuestion.ReadingQuestionTrialId || (trialReadingQuestion.Type == "group" && x.Type != "group" && x.ParentId == null && x.GroupName == trialReadingQuestion.GroupName)).ToList();
|
||||||
if (trialReadingQuestion.Childrens != null && trialReadingQuestion.Childrens.Count != 0)
|
if (trialReadingQuestion.Childrens != null && trialReadingQuestion.Childrens.Count != 0)
|
||||||
{
|
{
|
||||||
trialReadingQuestion.Childrens.ForEach(x =>
|
trialReadingQuestion.Childrens.ForEach(x =>
|
||||||
|
@ -687,7 +692,9 @@ namespace IRaCIS.Application.Services
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#region 保存任务问题
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 保存任务问题
|
/// 保存任务问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -718,11 +725,13 @@ namespace IRaCIS.Application.Services
|
||||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||||
return ResponseOutput.Ok(result);
|
return ResponseOutput.Ok(result);
|
||||||
}
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region 提交问题
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 提交问题
|
/// 提交访视阅片问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="inDto"></param>
|
/// <param name="inDto"></param>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
|
@ -733,8 +742,9 @@ namespace IRaCIS.Application.Services
|
||||||
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.VisitTaskId, x => new VisitTask()
|
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.Id == inDto.VisitTaskId, x => new VisitTask()
|
||||||
{
|
{
|
||||||
ReadingTaskState = ReadingTaskState.HaveSigned,
|
ReadingTaskState = ReadingTaskState.HaveSigned,
|
||||||
SignTime=DateTime.Now,
|
SignTime = DateTime.Now,
|
||||||
});
|
});
|
||||||
|
|
||||||
var result = await _visitTaskRepository.SaveChangesAsync();
|
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||||
// 触裁判任务
|
// 触裁判任务
|
||||||
await this.TriggerJudgeQuestion(inDto.VisitTaskId);
|
await this.TriggerJudgeQuestion(inDto.VisitTaskId);
|
||||||
|
@ -745,6 +755,53 @@ namespace IRaCIS.Application.Services
|
||||||
return ResponseOutput.Ok(result);
|
return ResponseOutput.Ok(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 提交裁判问题
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[NonDynamicMethod]
|
||||||
|
public async Task<IResponseOutput> SubmitJudgeVisitTaskResult(SaveJudgeVisitTaskResult inDto)
|
||||||
|
{
|
||||||
|
await _visitTaskRepository.UpdatePartialFromQueryAsync(inDto.VisitTaskId, x => new VisitTask()
|
||||||
|
{
|
||||||
|
JudgeResultTaskId = inDto.JudgeResultTaskId,
|
||||||
|
ReadingTaskState = ReadingTaskState.HaveSigned,
|
||||||
|
JudgeResultRemark = inDto.JudgeResultRemark,
|
||||||
|
SignTime = DateTime.Now,
|
||||||
|
JudgeResultImagePath = inDto.JudgeResultImagePath,
|
||||||
|
});
|
||||||
|
var result = await _visitTaskRepository.SaveChangesAsync();
|
||||||
|
return ResponseOutput.Ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 提交全局阅片结果
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[NonDynamicMethod]
|
||||||
|
public async Task<IResponseOutput> SubmitGlobalReadingInfo(SaveGlobalReadingInfoInDto inDto)
|
||||||
|
{
|
||||||
|
var result = await this.SaveGlobalReadingInfo(inDto);
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//public async Task<IResponseOutput> SubmitTaskChangeState()
|
||||||
|
//{
|
||||||
|
|
||||||
|
//}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 完成阅片修改状态
|
/// 完成阅片修改状态
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -267,7 +267,7 @@ namespace IRaCIS.Application.Services
|
||||||
[HttpPost]
|
[HttpPost]
|
||||||
public async Task<List<GetReadingVisitListOutDto>> GetReadingVisitList(GetReadingVisitListInDto inDto)
|
public async Task<List<GetReadingVisitListOutDto>> GetReadingVisitList(GetReadingVisitListInDto inDto)
|
||||||
{
|
{
|
||||||
var maxVisitNum = await _readingPeriodSetRepository.Where(x => x.TrialId == inDto.TrialId && x.ReadingSetType == inDto.ReadingSetType&&(x.IsTakeEffect== ReadingPeriodStatus.TakeEffect||x.IsTakeEffect==ReadingPeriodStatus.Revocation)).MaxAsync(x => x.ExpirationVisitNum)??0;
|
var maxVisitNum = await _readingPeriodSetRepository.Where(x => x.TrialId == inDto.TrialId && x.ReadingSetType == inDto.ReadingSetType&&x.IsTakeEffect== ReadingPeriodStatus.TakeEffect).MaxAsync(x => x.ExpirationVisitNum)??0;
|
||||||
var thisVisitNum = await _readingPeriodSetRepository.Where(x => x.Id == inDto.ReadingPeriodSetId).Select(x => x.ExpirationVisitNum).FirstOrDefaultAsync() ?? -1;
|
var thisVisitNum = await _readingPeriodSetRepository.Where(x => x.Id == inDto.ReadingPeriodSetId).Select(x => x.ExpirationVisitNum).FirstOrDefaultAsync() ?? -1;
|
||||||
List <GetReadingVisitListOutDto> result = await _visitStageRepository.Where(x => x.TrialId == inDto.TrialId ).Where(x=>x.VisitNum== thisVisitNum || x.VisitNum >= maxVisitNum).Select(x => new GetReadingVisitListOutDto()
|
List <GetReadingVisitListOutDto> result = await _visitStageRepository.Where(x => x.TrialId == inDto.TrialId ).Where(x=>x.VisitNum== thisVisitNum || x.VisitNum >= maxVisitNum).Select(x => new GetReadingVisitListOutDto()
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue