修改一版
parent
699e0fd535
commit
4f1cee08c5
|
@ -849,6 +849,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public bool IsExistsClinicalData { get; set; }
|
||||
|
||||
public bool IsExistsNoDicomFile { get; set; } = false;
|
||||
|
||||
public string TaskBlindName { get; set; }
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
|
|
|
@ -43,6 +43,7 @@ namespace IRaCIS.Application.Services
|
|||
private readonly IRepository<ReadingQuestionCriterionTrial> _readingQuestionCriterionTrialRepository;
|
||||
private readonly IRepository<ReadingQuestionCriterionSystem> _readingQuestionCriterionSystemRepository;
|
||||
private readonly IRepository<ReadingQuestionSystem> _readingQuestionSystem;
|
||||
private readonly IRepository<NoneDicomStudyFile> _noneDicomStudyFileSystem;
|
||||
private readonly IRepository<ReadingQuestionTrial> _readingQuestionTrialRepository;
|
||||
|
||||
|
||||
|
@ -72,6 +73,7 @@ namespace IRaCIS.Application.Services
|
|||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
||||
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystemRepository,
|
||||
IRepository<ReadingQuestionSystem> ReadingQuestionSystem,
|
||||
IRepository<NoneDicomStudyFile> noneDicomStudyFileSystem,
|
||||
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository
|
||||
)
|
||||
{
|
||||
|
@ -100,6 +102,7 @@ namespace IRaCIS.Application.Services
|
|||
this._readingQuestionCriterionTrialRepository = readingQuestionCriterionTrialRepository;
|
||||
this._readingQuestionCriterionSystemRepository = readingQuestionCriterionSystemRepository;
|
||||
this._readingQuestionSystem = ReadingQuestionSystem;
|
||||
this._noneDicomStudyFileSystem = noneDicomStudyFileSystem;
|
||||
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
||||
}
|
||||
|
||||
|
@ -1050,36 +1053,6 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
else if (inDto.SubjectId != null)
|
||||
{
|
||||
|
||||
#region 之前的
|
||||
//var subjectList = await _subjectRepository.Where(t => t.TrialId == inDto.TrialId)
|
||||
|
||||
//.Select(s => new SubjectTask()
|
||||
//{
|
||||
// SubjectId = s.Id,
|
||||
// UnReadTaskCount = s.SubjectVisitTaskList.Count(t => t.ReadingTaskState != ReadingTaskState.HaveSigned && t.DoctorUserId == _userInfo.Id && t.TaskState == TaskState.Effect),
|
||||
//}).OrderBy(x => x.SubjectId).ToListAsync();
|
||||
//subjectList = subjectList.Select((x, index) => new SubjectTask()
|
||||
//{
|
||||
// Index = index,
|
||||
// SubjectId = x.SubjectId,
|
||||
// UnReadTaskCount = x.UnReadTaskCount,
|
||||
//}).ToList();
|
||||
|
||||
|
||||
//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 taskquery = _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.SubjectId == newSubjectId && x.DoctorUserId == _userInfo.Id && x.TaskState == TaskState.Effect).Select(x => new GetReadingTaskDto()
|
||||
//{
|
||||
// VisitTaskId = x.Id,
|
||||
// TaskBlindName = x.TaskBlindName,
|
||||
// ReadingCategory = x.ReadingCategory,
|
||||
// VisistId = x.SourceSubjectVisitId != null ? x.SourceSubjectVisitId.Value : x.ReadModule == null ? default(Guid) : x.ReadModule.SubjectVisitId,
|
||||
// VisitNum = x.VisitTaskNum,
|
||||
//}).OrderBy(x => x.VisitNum).ThenBy(x => x.ReadingCategory);
|
||||
#endregion
|
||||
|
||||
var subjectTaskList = await _visitTaskService.GetOrderReadingIQueryable(inDto.TrialId, trialReadingCriterionId).Item2.ToListAsync();
|
||||
|
||||
var index = 0;
|
||||
|
@ -1159,6 +1132,10 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
task.IsReadingShowPreviousResults = criterionInfo.IsReadingShowPreviousResults;
|
||||
task.IsReadingShowSubjectInfo = criterionInfo.IsReadingShowSubjectInfo;
|
||||
if (visitTaskInfo.SourceSubjectVisitId != null)
|
||||
{
|
||||
task.IsExistsNoDicomFile = await _noneDicomStudyRepository.AnyAsync(x => x.SubjectVisitId == visitTaskInfo.SourceSubjectVisitId && x.FileCount > 0);
|
||||
}
|
||||
task.IsExistsClinicalData = (await _readingClinicalDataService.GetClinicalDataList(new GetReadingOrTaskClinicalDataListInDto()
|
||||
{
|
||||
|
||||
|
|
Loading…
Reference in New Issue