diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs index 7ec04337f..b2e87fb4b 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/VisitTaskViewModel.cs @@ -358,7 +358,10 @@ namespace IRaCIS.Core.Application.ViewModel { public Guid TrialId { get; set; } - public Guid TrialReadingCriterionId { get; set; } + + public Guid? SubjectId { get; set; } + + public Guid TrialReadingCriterionId { get; set; } public string? SubjectCode { get; set; } = null; diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 109779bd1..9bf93330a 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -661,9 +661,9 @@ namespace IRaCIS.Core.Application.Service.Allocation var visitQuery = _visitTaskRepository .Where(x => x.TrialId == inDto.TrialId && x.TaskState == TaskState.Effect) - - //PI 读基线的时候,subject 如果PI基线没阅片完,SR就不能看 - .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR && piReadingScopenEnum == PIReadingScopenEnum.AllBaseline && readingDivisionEnum == ReadingDivisionEnum.PIandSR, + .WhereIf(inDto.SubjectId!=null,t=>t.SubjectId==inDto.SubjectId) + //PI 读基线的时候,subject 如果PI基线没阅片完,SR就不能看 + .WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.SR && piReadingScopenEnum == PIReadingScopenEnum.AllBaseline && readingDivisionEnum == ReadingDivisionEnum.PIandSR, t => t.Subject.SubjectVisitTaskList.Any(c => c.SourceSubjectVisit.IsBaseLine == true && c.ReadingTaskState == ReadingTaskState.HaveSigned && c.TaskState == TaskState.Effect && c.TrialReadingCriterionId == trialReadingCriterionId)) //PI 读随访的时候, subject 如果SR基线没阅片完,PI就不能看 diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 8cb2864ef..9c3afee0c 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -2329,6 +2329,7 @@ namespace IRaCIS.Application.Services var subjectTaskList = (await _visitTaskService.GetOrderReadingIQueryable(new GetOrderReadingIQueryableInDto() { TrialId = inDto.TrialId, + SubjectId=inDto.SubjectId, TrialReadingCriterionId = trialReadingCriterionId!.Value, Page = new PageInput() {