From 27d9104607416fc14b80f2dc391d44319e072e32 Mon Sep 17 00:00:00 2001 From: he <109787524@qq.com> Date: Thu, 27 Jun 2024 14:25:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/Dto/ReadingMedicalReviewDto.cs | 9 ++++++-- .../ReadingMedicalReviewService.cs | 22 ++++++++++++++++--- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs index 0e56ef61a..b89ece8e1 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs @@ -40,7 +40,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto [NotDefault] public Guid TrialId { get; set; } - public Guid? TrialReadingCriterionId { get; set; } + public Guid TrialReadingCriterionId { get; set; } + + public Guid SubjectId { get; set; } } @@ -55,7 +57,10 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public bool? IsUrgent { get; set; } - public MedicalReviewAuditState? AuditState { get; set; } + public Guid? SubjectId { get; set; } + + + public MedicalReviewAuditState? AuditState { get; set; } public string SubjectCode { get; set; } = string.Empty; diff --git a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs index a624d586c..3a16532c3 100644 --- a/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Reading/MedicalAudit/ReadingMedicalReviewService.cs @@ -792,13 +792,28 @@ namespace IRaCIS.Core.Application.Service var list = await GetIRMedicalFeedbackList(new GetIRMedicalFeedbackListInDto() { TrialId=inDto.TrialId, - IsNotHaveSigned=true, + AuditState= MedicalReviewAuditState.Auditing, TrialReadingCriterionId=inDto.TrialReadingCriterionId, + SubjectId=inDto.SubjectId, PageIndex=1, PageSize=1, }); - if (list.CurrentPageData.Count() > 0) + + if (list.CurrentPageData.Count() == 0) + { + list = await GetIRMedicalFeedbackList(new GetIRMedicalFeedbackListInDto() + { + TrialId = inDto.TrialId, + AuditState = MedicalReviewAuditState.Auditing, + TrialReadingCriterionId = inDto.TrialReadingCriterionId, + PageIndex = 1, + PageSize = 1, + }); + } + + + if (list.CurrentPageData.Count() > 0) { return list.CurrentPageData[0]; } @@ -825,7 +840,8 @@ namespace IRaCIS.Core.Application.Service .Where(x => x.VisitTask.DoctorUserId == _userInfo.Id) .Where(x => x.IsHaveQuestion) .WhereIf(!inDto.TaskBlindName.IsNullOrEmpty(), x => x.VisitTask.TaskBlindName == inDto.TaskBlindName) - .WhereIf(inDto.IsUrgent != null, x => x.VisitTask.IsUrgent == inDto.IsUrgent!) + .WhereIf(inDto.SubjectId != null, x => x.VisitTask.SubjectId == inDto.SubjectId!) + .WhereIf(inDto.IsUrgent != null, x => x.VisitTask.IsUrgent == inDto.IsUrgent!) .WhereIf(inDto.AuditState != null, x => x.AuditState == inDto.AuditState!) .WhereIf(inDto.IsNotHaveSigned, x => x.AuditState != MedicalReviewAuditState.HaveSigned) .WhereIf(inDto.ReadingCategory != null, x => x.VisitTask.ReadingCategory == inDto.ReadingCategory!)