修改签名逻辑
parent
458e3bc74b
commit
57617d9cf5
|
@ -127,6 +127,9 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
public string FullName { get; set; }
|
public string FullName { get; set; }
|
||||||
|
|
||||||
public string UserTypeShortName { get; set; }
|
public string UserTypeShortName { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public bool IsClinicalDataSigned { get; set; } = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class UserSimpleInfo
|
public class UserSimpleInfo
|
||||||
|
@ -156,7 +159,6 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
public ReReadingApplyState ReReadingApplyState { get; set; }
|
public ReReadingApplyState ReReadingApplyState { get; set; }
|
||||||
public DateTime? SuggesteFinishedTime { get; set; }
|
public DateTime? SuggesteFinishedTime { get; set; }
|
||||||
|
|
||||||
public bool IsClinicalDataSigned { get; set; } = false;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,10 +170,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
public bool IsReReadingOrBackInfluenceAnalysis { get; set; }
|
public bool IsReReadingOrBackInfluenceAnalysis { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
//public class IRReReadingTaskView: ReReadingTaskView
|
|
||||||
//{
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
public class ReReadingTaskView
|
public class ReReadingTaskView
|
||||||
{
|
{
|
||||||
|
@ -228,11 +227,6 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
|
|
||||||
public class IRUnReadSubjectView
|
public class IRUnReadSubjectView
|
||||||
{
|
{
|
||||||
|
|
||||||
//public Guid SiteId { get; set; }
|
|
||||||
//public String TrialSiteCode { get; set; } = String.Empty;
|
|
||||||
//public Guid TrialId { get; set; }
|
|
||||||
|
|
||||||
public int Index { get; set; } = 0;
|
public int Index { get; set; } = 0;
|
||||||
|
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
|
@ -271,6 +265,8 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
public DateTime? SuggesteFinishedTime { get; set; }
|
public DateTime? SuggesteFinishedTime { get; set; }
|
||||||
|
|
||||||
public Guid TrialReadingCriterionId { get; set; }
|
public Guid TrialReadingCriterionId { get; set; }
|
||||||
|
|
||||||
|
public bool IsClinicalDataSigned { get; set; } = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -380,7 +380,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
//最近的未一致性核查通过的访视任务
|
//后续最近的未一致性核查通过的访视任务
|
||||||
var followBackVisitTask = await _visitTaskRepository.Where(t => t.TrialId == trialId && t.TrialReadingCriterionId == trialReadingCriterionConfig.TrialReadingCriterionId && t.SubjectId == subjectVisit.SubjectId && t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.SourceSubjectVisit.CheckState != CheckStateEnum.CVPassed).OrderBy(t => t.VisitTaskNum).FirstOrDefaultAsync();
|
var followBackVisitTask = await _visitTaskRepository.Where(t => t.TrialId == trialId && t.TrialReadingCriterionId == trialReadingCriterionConfig.TrialReadingCriterionId && t.SubjectId == subjectVisit.SubjectId && t.VisitTaskNum > subjectVisit.VisitNum && t.ReadingCategory == ReadingCategory.Visit && t.SourceSubjectVisit.CheckState != CheckStateEnum.CVPassed).OrderBy(t => t.VisitTaskNum).FirstOrDefaultAsync();
|
||||||
|
|
||||||
//大于当前访视 同时小于最近的未一致性核查通过的访视任务分配 或者生成
|
//大于当前访视 同时小于最近的未一致性核查通过的访视任务分配 或者生成
|
||||||
|
|
|
@ -956,12 +956,10 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
public (int, IOrderedQueryable<IRUnReadSubjectView>) GetOrderReadingIQueryable(Guid trialId, Guid? trialReadingCriterionId,string? subjectCode =null)
|
public (int, IOrderedQueryable<IRUnReadSubjectView>) GetOrderReadingIQueryable(Guid trialId, Guid? trialReadingCriterionId,string? subjectCode =null)
|
||||||
{
|
{
|
||||||
var visitGroupQuery = _visitTaskRepository.Where(x => x.TrialId == trialId && x.DoctorUserId == _userInfo.Id)
|
var visitGroupQuery = _visitTaskRepository.Where(x => x.TrialId == trialId && x.DoctorUserId == _userInfo.Id)
|
||||||
.Include(x=>x.TrialReadingCriterion)
|
|
||||||
.WhereIf(trialReadingCriterionId != null, t => t.TrialReadingCriterionId == trialReadingCriterionId)
|
.WhereIf(trialReadingCriterionId != null, t => t.TrialReadingCriterionId == trialReadingCriterionId)
|
||||||
.WhereIf(!string.IsNullOrEmpty(subjectCode), t => t.Subject.Code.Contains(subjectCode) || t.BlindSubjectCode.Contains(subjectCode))
|
.WhereIf(!string.IsNullOrEmpty(subjectCode), t => t.Subject.Code.Contains(subjectCode) || t.BlindSubjectCode.Contains(subjectCode))
|
||||||
|
.Where(t => (t.ReadingTaskState != ReadingTaskState.HaveSigned || t.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed
|
||||||
.Where(x => !x.Subject.IsDeleted)
|
|| t.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed) && t.TaskState == TaskState.Effect)
|
||||||
.Where(t => (t.ReadingTaskState != ReadingTaskState.HaveSigned || t.ReReadingApplyState == ReReadingApplyState.DocotorHaveApplyed || t.ReReadingApplyState == ReReadingApplyState.TrialGroupHaveApplyed) && t.TaskState == TaskState.Effect)
|
|
||||||
.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode });
|
.GroupBy(x => new { x.SubjectId, x.Subject.Code, x.BlindSubjectCode });
|
||||||
|
|
||||||
var visitTaskQuery = visitGroupQuery.Select(x => new IRUnReadSubjectView()
|
var visitTaskQuery = visitGroupQuery.Select(x => new IRUnReadSubjectView()
|
||||||
|
@ -984,6 +982,8 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
IsAnalysisCreate = u.IsAnalysisCreate,
|
IsAnalysisCreate = u.IsAnalysisCreate,
|
||||||
|
|
||||||
TrialReadingCriterionId = u.TrialReadingCriterionId,
|
TrialReadingCriterionId = u.TrialReadingCriterionId,
|
||||||
|
|
||||||
|
IsClinicalDataSigned= u.Subject.ClinicalDataList.Any(c => c.IsSign && (c.ReadingId == u.SouceReadModuleId || c.ReadingId == u.SourceSubjectVisitId))
|
||||||
}).ToList(),
|
}).ToList(),
|
||||||
}).Where(x => x.UnReadTaskCount > 0).OrderBy(x => x.SubjectId);
|
}).Where(x => x.UnReadTaskCount > 0).OrderBy(x => x.SubjectId);
|
||||||
|
|
||||||
|
|
|
@ -124,7 +124,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.UserCode))
|
.ForMember(o => o.UserCode, t => t.MapFrom(u => u.DoctorUser.UserCode))
|
||||||
.ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName))
|
.ForMember(o => o.UserName, t => t.MapFrom(u => u.DoctorUser.UserName))
|
||||||
.ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName))
|
.ForMember(o => o.FullName, t => t.MapFrom(u => u.DoctorUser.FullName))
|
||||||
.ForMember(o => o.UserTypeShortName, t => t.MapFrom(u => u.DoctorUser.UserTypeRole.UserTypeShortName));
|
.ForMember(o => o.UserTypeShortName, t => t.MapFrom(u => u.DoctorUser.UserTypeRole.UserTypeShortName))
|
||||||
|
.ForMember(o => o.IsClinicalDataSigned, t => t.MapFrom(u => u.Subject.ClinicalDataList.Any(c => c.IsSign && (c.ReadingId == u.SouceReadModuleId || c.ReadingId == u.SourceSubjectVisitId))))
|
||||||
|
;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -135,7 +137,8 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.ForMember(o => o.HistoryReadingDoctorUserList, t => t.MapFrom(u => u.JudgeVisitList));
|
.ForMember(o => o.HistoryReadingDoctorUserList, t => t.MapFrom(u => u.JudgeVisitList));
|
||||||
|
|
||||||
CreateMap<VisitTask, ReadingTaskView>().IncludeBase<VisitTask, VisitTaskView>()
|
CreateMap<VisitTask, ReadingTaskView>().IncludeBase<VisitTask, VisitTaskView>()
|
||||||
.ForMember(o => o.IsClinicalDataSigned, t => t.MapFrom(u => u.Subject.ClinicalDataList.Any(c=>c.IsSign && (c.ReadingId==u.SouceReadModuleId ||c.ReadingId==u.SourceSubjectVisitId))));
|
|
||||||
|
;
|
||||||
|
|
||||||
CreateMap<VisitTask, AnalysisTaskView>().IncludeBase<VisitTask, VisitTaskView>()
|
CreateMap<VisitTask, AnalysisTaskView>().IncludeBase<VisitTask, VisitTaskView>()
|
||||||
.ForMember(o => o.IsReReadingOrBackInfluenceAnalysis, t => t.MapFrom(u => u.Subject.IsReReadingOrBackInfluenceAnalysis));
|
.ForMember(o => o.IsReReadingOrBackInfluenceAnalysis, t => t.MapFrom(u => u.Subject.IsReReadingOrBackInfluenceAnalysis));
|
||||||
|
|
|
@ -9,6 +9,7 @@ using Microsoft.AspNetCore.Mvc;
|
||||||
using IRaCIS.Core.Application.Contracts;
|
using IRaCIS.Core.Application.Contracts;
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using IRaCIS.Core.Application.Auth;
|
using IRaCIS.Core.Application.Auth;
|
||||||
|
using IRaCIS.Core.Domain.Share;
|
||||||
|
|
||||||
namespace IRaCIS.Core.Application.Services
|
namespace IRaCIS.Core.Application.Services
|
||||||
{
|
{
|
||||||
|
@ -193,7 +194,6 @@ namespace IRaCIS.Core.Application.Services
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var unionQuery = systemDocumentQueryable.Union(trialDocQueryable)
|
var unionQuery = systemDocumentQueryable.Union(trialDocQueryable)
|
||||||
.WhereIf(!string.IsNullOrEmpty(querySystemDocument.Name), t => t.Name.Contains(querySystemDocument.Name))
|
.WhereIf(!string.IsNullOrEmpty(querySystemDocument.Name), t => t.Name.Contains(querySystemDocument.Name))
|
||||||
.WhereIf(querySystemDocument.FileTypeId != null, t => t.FileTypeId == querySystemDocument.FileTypeId)
|
.WhereIf(querySystemDocument.FileTypeId != null, t => t.FileTypeId == querySystemDocument.FileTypeId)
|
||||||
|
@ -202,7 +202,7 @@ namespace IRaCIS.Core.Application.Services
|
||||||
|
|
||||||
var result = await unionQuery.ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
|
var result = await unionQuery.ToPagedListAsync(querySystemDocument.PageIndex, querySystemDocument.PageSize, querySystemDocument.SortField, querySystemDocument.Asc);
|
||||||
|
|
||||||
var needSignTrialDocCount = await _trialDocumentRepository.AsQueryable(true)
|
var needSignTrialDocCount = await _trialDocumentRepository.AsQueryable(true).Where(t => t.TrialId== querySystemDocument.TrialId && t.Trial.TrialStatusStr != StaticData.TrialState.TrialStopped)
|
||||||
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
.Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id))
|
||||||
.Where(t => t.IsDeleted == false && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime!=null) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
.Where(t => t.IsDeleted == false && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime!=null) && t.NeedConfirmedUserTypeList.Any(u => u.NeedConfirmUserTypeId == _userInfo.UserTypeId))
|
||||||
.CountAsync();
|
.CountAsync();
|
||||||
|
|
Loading…
Reference in New Issue