From 44ad83790df4f64918d9b65a0bcf6db833c92588 Mon Sep 17 00:00:00 2001
From: hang <872297557@qq.com>
Date: Mon, 12 Jun 2023 17:12:28 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=82=AE=E4=BB=B6=E6=A8=A1?=
=?UTF-8?q?=E6=9D=BF=E5=92=8C=E7=BB=9F=E8=AE=A1?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Controllers/ExtraController.cs | 12 ++
.../wwwroot/EmailTemplate/AdminAddUser.html | 2 +-
.../EmailTemplate/AdminAddUser_US.html | 12 +-
.../wwwroot/EmailTemplate/AdminResetUser.html | 2 +-
.../EmailTemplate/AdminResetUser_US.html | 8 +-
.../SubjectEnrollConfirmOrPDProgress.html | 2 +-
.../SubjectEnrollConfirmOrPDProgress_US.html | 8 +-
.../EmailTemplate/TrialDoctorExistJoin.html | 2 +-
.../TrialDoctorExistJoin_US.html | 18 ++-
.../EmailTemplate/TrialDoctorFirstJoin.html | 2 +-
.../TrialDoctorFirstJoin_US.html | 8 +-
.../EmailTemplate/TrialSiteSurveyReject.html | 2 +-
.../TrialSiteSurveyReject_US.html | 12 +-
.../EmailTemplate/TrialUserExistJoin.html | 2 +-
.../EmailTemplate/TrialUserExistJoin_US.html | 14 +-
.../EmailTemplate/TrialUserFirstJoin.html | 2 +-
.../EmailTemplate/TrialUserFirstJoin_US.html | 12 +-
.../wwwroot/EmailTemplate/UserOptCommon.html | 2 +-
.../EmailTemplate/UserOptCommon_US.html | 6 +-
.../IRaCIS.Core.Application.xml | 3 +-
.../TrialSiteUser/PersonalWorkstation.cs | 150 ++++++++++++------
.../ReadingQuestionCriterionTrial.cs | 5 +
22 files changed, 183 insertions(+), 103 deletions(-)
diff --git a/IRaCIS.Core.API/Controllers/ExtraController.cs b/IRaCIS.Core.API/Controllers/ExtraController.cs
index 2438d8199..46daf138f 100644
--- a/IRaCIS.Core.API/Controllers/ExtraController.cs
+++ b/IRaCIS.Core.API/Controllers/ExtraController.cs
@@ -93,6 +93,7 @@ namespace IRaCIS.Api.Controllers
[FromServices] ITokenService _tokenService, [FromServices] IConfiguration configuration)
{
+
var returnModel = await _userService.Login(loginUser.UserName, loginUser.Password);
if (returnModel.IsSuccess)
@@ -160,6 +161,17 @@ namespace IRaCIS.Api.Controllers
returnModel.Data.JWTStr = _tokenService.GetToken(IRaCISClaims.Create(returnModel.Data.BasicInfo));
+ // 创建一个 CookieOptions 对象,用于设置 Cookie 的属性
+ var option = new CookieOptions
+ {
+ Expires = DateTime.Now.AddMonths(1), // 设置过期时间为 30 分钟之后
+ HttpOnly = false, // 确保 cookie 只能通过 HTTP 访问
+ SameSite = Microsoft.AspNetCore.Http.SameSiteMode.None, // 设置 SameSite 属性
+ Secure = false // 确保 cookie 只能通过 HTTPS 访问
+ };
+
+ HttpContext.Response.Cookies.Append("access_token", returnModel.Data.JWTStr, option);
+
}
var userId = returnModel.Data.BasicInfo.Id.ToString();
diff --git a/IRaCIS.Core.API/wwwroot/EmailTemplate/AdminAddUser.html b/IRaCIS.Core.API/wwwroot/EmailTemplate/AdminAddUser.html
index 9191707f8..ba530acb4 100644
--- a/IRaCIS.Core.API/wwwroot/EmailTemplate/AdminAddUser.html
+++ b/IRaCIS.Core.API/wwwroot/EmailTemplate/AdminAddUser.html
@@ -32,7 +32,7 @@
祝您顺利!/Best Regards
-
上海展影医疗科技有限公司
+
展影医疗
diff --git a/IRaCIS.Core.API/wwwroot/EmailTemplate/AdminAddUser_US.html b/IRaCIS.Core.API/wwwroot/EmailTemplate/AdminAddUser_US.html
index 0cfd47bf6..fb1ff4e02 100644
--- a/IRaCIS.Core.API/wwwroot/EmailTemplate/AdminAddUser_US.html
+++ b/IRaCIS.Core.API/wwwroot/EmailTemplate/AdminAddUser_US.html
@@ -11,28 +11,28 @@
Dear {0} ,
- Extimaging has added an account for you. The account information is as follows:
+ Extensive Imaging has generated a user account for you.
The account information is as follows:
- User name: {1}
+ User ID: {1}
Role: {2}
-
Best Regards
-
Shanghai Extensive Imaging Medical Technology Co., LTD
+
Best regards,
+
Extensive Imaging
diff --git a/IRaCIS.Core.API/wwwroot/EmailTemplate/AdminResetUser.html b/IRaCIS.Core.API/wwwroot/EmailTemplate/AdminResetUser.html
index e81216184..ad1130293 100644
--- a/IRaCIS.Core.API/wwwroot/EmailTemplate/AdminResetUser.html
+++ b/IRaCIS.Core.API/wwwroot/EmailTemplate/AdminResetUser.html
@@ -29,7 +29,7 @@
祝您顺利!/Best Regards
-
上海展影医疗科技有限公司
+
展影医疗
diff --git a/IRaCIS.Core.API/wwwroot/EmailTemplate/AdminResetUser_US.html b/IRaCIS.Core.API/wwwroot/EmailTemplate/AdminResetUser_US.html
index 274ee9053..05f730795 100644
--- a/IRaCIS.Core.API/wwwroot/EmailTemplate/AdminResetUser_US.html
+++ b/IRaCIS.Core.API/wwwroot/EmailTemplate/AdminResetUser_US.html
@@ -11,12 +11,12 @@
Dear {0} ,
- Extimaging has reset your account password, and the account information is as follows:
+ Extensive Imaging has reset your password.
The account information is as follows:
- User name: {1}
+ User ID: {1}
Role: {2}
@@ -28,8 +28,8 @@
-
Best Regards
-
Shanghai Extensive Imaging Medical Technology Co., LTD
+
Best regards,
+
Extensive Imaging
diff --git a/IRaCIS.Core.API/wwwroot/EmailTemplate/SubjectEnrollConfirmOrPDProgress.html b/IRaCIS.Core.API/wwwroot/EmailTemplate/SubjectEnrollConfirmOrPDProgress.html
index 0d184d0a3..368b1884c 100644
--- a/IRaCIS.Core.API/wwwroot/EmailTemplate/SubjectEnrollConfirmOrPDProgress.html
+++ b/IRaCIS.Core.API/wwwroot/EmailTemplate/SubjectEnrollConfirmOrPDProgress.html
@@ -19,7 +19,7 @@
祝您顺利!/Best Regards
-
上海展影医疗科技有限公司
+
展影医疗
diff --git a/IRaCIS.Core.API/wwwroot/EmailTemplate/SubjectEnrollConfirmOrPDProgress_US.html b/IRaCIS.Core.API/wwwroot/EmailTemplate/SubjectEnrollConfirmOrPDProgress_US.html
index aaf96e71f..4ab2379c8 100644
--- a/IRaCIS.Core.API/wwwroot/EmailTemplate/SubjectEnrollConfirmOrPDProgress_US.html
+++ b/IRaCIS.Core.API/wwwroot/EmailTemplate/SubjectEnrollConfirmOrPDProgress_US.html
@@ -8,18 +8,18 @@
- Dear:
+ Dear Sir or Madam:
- Thank you for using Extensive Imaging Cloud System.
+ Thank you for using our IRC imaging system.
{0}。
-
Best Regards
-
Shanghai Extensive Imaging Medical Technology Co., LTD
+
Best regards,
+
Extensive Imaging
diff --git a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialDoctorExistJoin.html b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialDoctorExistJoin.html
index 99d20f468..0bf1fb2ad 100644
--- a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialDoctorExistJoin.html
+++ b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialDoctorExistJoin.html
@@ -41,7 +41,7 @@
祝您顺利!/Best Regards
-
上海展影医疗科技有限公司
+
展影医疗
diff --git a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialDoctorExistJoin_US.html b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialDoctorExistJoin_US.html
index 572e2a5df..a2bda514d 100644
--- a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialDoctorExistJoin_US.html
+++ b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialDoctorExistJoin_US.html
@@ -11,10 +11,10 @@
Dear {0},
- Hello, as the IRC supplier of [ {1} (Protocol ID is {2}) ] project,Extiming sincerely invites you to participate in the IRC related work of this project. Your guidance and suggestions are welcome.
+ As the IRC service provider of {1} trial(Protocol ID is {2}), Extensive Imaging invites you to participate in the independent assessment work of this trial.
- This project adopts electronic workflow. The system and your account information are as follows:
+ Digital workflow is implemented for this trial, and your account information is as follows:
@@ -25,23 +25,25 @@
Protocol ID: {2}
- Study name: {1}
+ Study Name: {1}
- User name: {4}
+ User Name: {4}
Role: {5}
- System login address:{6}
+ Login URL: {6}
-
+
+ Your opinions and suggestions will be greatly appreciated!
+
-
Best Regards
-
Shanghai Extensive Imaging Medical Technology Co., LTD
+
Best regards,
+
Extensive Imaging
diff --git a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialDoctorFirstJoin.html b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialDoctorFirstJoin.html
index 4bfce0de5..cb7f00034 100644
--- a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialDoctorFirstJoin.html
+++ b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialDoctorFirstJoin.html
@@ -44,7 +44,7 @@
祝您顺利!/Best Regards
-
上海展影医疗科技有限公司
+
展影医疗
diff --git a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialDoctorFirstJoin_US.html b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialDoctorFirstJoin_US.html
index ba80405ee..7f047145e 100644
--- a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialDoctorFirstJoin_US.html
+++ b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialDoctorFirstJoin_US.html
@@ -11,10 +11,10 @@
Dear {0},
- Hello, as the IRC supplier of [ {1} (Protocol ID is {2}) ] project,Extiming sincerely invites you to participate in the IRC related work of this project. Your guidance and suggestions are welcome.
+ As the IRC service provider of {1}trial (Protocol ID is {2}), Extensive Imaging invites you to participate in the independent assessment work of this trial. Your opinions and suggestions will be greatly appreciated!
- This project adopts electronic workflow. The system and your account information are as follows:
+ Digital workflow is implemented for this trial, and your account information is as follows:
@@ -43,8 +43,8 @@
-
Best Regards
-
Shanghai Extensive Imaging Medical Technology Co., LTD
+
Best regards,
+
Extensive Imaging
diff --git a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialSiteSurveyReject.html b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialSiteSurveyReject.html
index 29b84eedc..a2b8f771c 100644
--- a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialSiteSurveyReject.html
+++ b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialSiteSurveyReject.html
@@ -41,7 +41,7 @@
祝您顺利!/Best Regards
-
上海展影医疗科技有限公司
+
展影医疗
diff --git a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialSiteSurveyReject_US.html b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialSiteSurveyReject_US.html
index 0deb87dad..7c69afd20 100644
--- a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialSiteSurveyReject_US.html
+++ b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialSiteSurveyReject_US.html
@@ -11,7 +11,7 @@
Dear {0} ,
- Hello, the center survey form you filled in has been rejected. The details are as follows:
+ The site survey you filled in has been rejected. The details are as follows:
@@ -22,13 +22,13 @@
Protocol ID: {2}
- Study name: {3}
+ Study Name: {3}
Site ID: {4}
- Site name: {5}
+ Site Name: {5}
Reason for rejection: {6}
@@ -36,12 +36,12 @@
- Login and view
+ Login & View
-
Best Regards
-
Shanghai Extensive Imaging Medical Technology Co., LTD
+
Best regards,
+
Extensive Imaging
diff --git a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialUserExistJoin.html b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialUserExistJoin.html
index 14cbda11e..260ad6bba 100644
--- a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialUserExistJoin.html
+++ b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialUserExistJoin.html
@@ -41,7 +41,7 @@
祝您顺利!/Best Regards
-
上海展影医疗科技有限公司
+
展影医疗
diff --git a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialUserExistJoin_US.html b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialUserExistJoin_US.html
index 572e2a5df..4c4c9a5a6 100644
--- a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialUserExistJoin_US.html
+++ b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialUserExistJoin_US.html
@@ -11,10 +11,10 @@
Dear {0},
- Hello, as the IRC supplier of [ {1} (Protocol ID is {2}) ] project,Extiming sincerely invites you to participate in the IRC related work of this project. Your guidance and suggestions are welcome.
+ As the IRC service provider of {1}trial(Protocol ID is {2}), Extensive Imaging invites you to participate in the independent assessment work of this trial.
- This project adopts electronic workflow. The system and your account information are as follows:
+ Digital workflow is implemented for this trial, and your account information is as follows:
@@ -25,23 +25,23 @@
Protocol ID: {2}
- Study name: {1}
+ Study Name: {1}
- User name: {4}
+ User Name: {4}
Role: {5}
- System login address:{6}
+ System login URL:{6}
-
Best Regards
-
Shanghai Extensive Imaging Medical Technology Co., LTD
+
Best regards,
+
Extensive Imaging
diff --git a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialUserFirstJoin.html b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialUserFirstJoin.html
index 83cb9d4be..46c2a7b80 100644
--- a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialUserFirstJoin.html
+++ b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialUserFirstJoin.html
@@ -44,7 +44,7 @@
祝您顺利!/Best Regards
-
上海展影医疗科技有限公司
+
展影医疗
diff --git a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialUserFirstJoin_US.html b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialUserFirstJoin_US.html
index ba80405ee..eb260fff1 100644
--- a/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialUserFirstJoin_US.html
+++ b/IRaCIS.Core.API/wwwroot/EmailTemplate/TrialUserFirstJoin_US.html
@@ -11,10 +11,10 @@
Dear {0},
- Hello, as the IRC supplier of [ {1} (Protocol ID is {2}) ] project,Extiming sincerely invites you to participate in the IRC related work of this project. Your guidance and suggestions are welcome.
+ As the IRC service provider of {1}trial(Protocol ID is {2}). Extiming sincerely invites you to participate in the IRC related work of this project. Your guidance and suggestions are welcome.
- This project adopts electronic workflow. The system and your account information are as follows:
+ Digital workflow is implemented for this trial, and your account information is as follows:
@@ -25,10 +25,10 @@
Protocol ID: {2}
- Study name: {1}
+ Study Name: {1}
- User name: {4}
+ User Name: {4}
Role: {5}
@@ -43,8 +43,8 @@
-
Best Regards
-
Shanghai Extensive Imaging Medical Technology Co., LTD
+
Best regards,
+
Extensive Imaging
diff --git a/IRaCIS.Core.API/wwwroot/EmailTemplate/UserOptCommon.html b/IRaCIS.Core.API/wwwroot/EmailTemplate/UserOptCommon.html
index e114d9fa9..da4236584 100644
--- a/IRaCIS.Core.API/wwwroot/EmailTemplate/UserOptCommon.html
+++ b/IRaCIS.Core.API/wwwroot/EmailTemplate/UserOptCommon.html
@@ -19,7 +19,7 @@
祝您顺利!/Best Regards
-
上海展影医疗科技有限公司
+
展影医疗
diff --git a/IRaCIS.Core.API/wwwroot/EmailTemplate/UserOptCommon_US.html b/IRaCIS.Core.API/wwwroot/EmailTemplate/UserOptCommon_US.html
index f9bc2f21b..b9fe3583e 100644
--- a/IRaCIS.Core.API/wwwroot/EmailTemplate/UserOptCommon_US.html
+++ b/IRaCIS.Core.API/wwwroot/EmailTemplate/UserOptCommon_US.html
@@ -11,7 +11,7 @@
Dear {0},
- Thank you for using Extensive Imaging Cloud System.
+ Thank you for using our IRC imaging system.
{1}, the verification code is {2}. Enter the verification code within 3 minutes for subsequent operations. Please ignore this email if not by yourself.
@@ -19,8 +19,8 @@
-
Best Regards
-
Shanghai Extensive Imaging Medical Technology Co., LTD
+
Best regards,
+
Extensive Imaging
diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index ecee6e76d..7a9addc24 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -10001,12 +10001,13 @@
-
+
IR 影像阅片 待阅量 复杂 --未完成
+
diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs
index 1a86ffcbc..e38888ceb 100644
--- a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs
+++ b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs
@@ -1,5 +1,6 @@
using IRaCIS.Core.Application.Contracts;
using IRaCIS.Core.Domain.Share;
+using IRaCIS.Core.Infrastructure.Extention;
using Microsoft.AspNetCore.Mvc;
namespace IRaCIS.Core.Application
@@ -309,14 +310,14 @@ namespace IRaCIS.Core.Application
{
var query = _trialRepository
- .Where(t=>t.clinicalDataTrialSets.Any(t=>t.ClinicalDataLevel==ClinicalLevel.Subject && t.IsConfirm))
+ .Where(t => t.clinicalDataTrialSets.Any(t => t.ClinicalDataLevel == ClinicalLevel.Subject && t.IsConfirm))
.Select(t => new ImageClinicalDataToBeDoneDto()
{
TrialId = t.Id,
ResearchProgramNo = t.ResearchProgramNo,
ExperimentName = t.ExperimentName,
TrialCode = t.TrialCode,
- UrgentCount = t.SubjectVisitList.Where(u => u.IsBaseLine&& u.SubmitState != SubmitStateEnum.Submitted && u.IsUrgent ).Count(),
+ UrgentCount = t.SubjectVisitList.Where(u => u.IsBaseLine && u.SubmitState != SubmitStateEnum.Submitted && u.IsUrgent).Count(),
ToBeDealedCount = t.SubjectVisitList.Where(u => u.IsBaseLine && u.SubmitState != SubmitStateEnum.Submitted).Count(),
});
@@ -350,12 +351,12 @@ namespace IRaCIS.Core.Application
ResearchProgramNo = t.ResearchProgramNo,
ExperimentName = t.ExperimentName,
TrialCode = t.TrialCode,
- UrgentCount = t.SubjectVisitList.SelectMany(c=>c.QCChallengeList)
- .Where(u => u.IsClosed==false && u.LatestReplyUser.UserTypeEnum==UserTypeEnum.IQC && u.SubjectVisit.IsUrgent).Count(),
+ UrgentCount = t.SubjectVisitList.SelectMany(c => c.QCChallengeList)
+ .Where(u => u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC && u.SubjectVisit.IsUrgent).Count(),
ToBeDealedCount = t.SubjectVisitList.SelectMany(c => c.QCChallengeList)
- .Where(u => u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC ).Count(),
-
+ .Where(u => u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.IQC).Count(),
+
});
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc);
@@ -383,9 +384,9 @@ namespace IRaCIS.Core.Application
ResearchProgramNo = t.ResearchProgramNo,
ExperimentName = t.ExperimentName,
TrialCode = t.TrialCode,
- UrgentCount = t.SubjectVisitList.Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState==CheckChanllengeTypeEnum.PMWaitCRCReply && u.IsUrgent).Count(),
- ToBeDealedCount = t.SubjectVisitList.Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply ).Count()
-
+ UrgentCount = t.SubjectVisitList.Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply && u.IsUrgent).Count(),
+ ToBeDealedCount = t.SubjectVisitList.Where(u => u.CheckState == CheckStateEnum.CVIng && u.CheckChallengeState == CheckChanllengeTypeEnum.PMWaitCRCReply).Count()
+
});
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc);
@@ -418,14 +419,14 @@ namespace IRaCIS.Core.Application
ToBeDealedCount = t.SubjectVisitList.Where(u => u.SubmitState == SubmitStateEnum.ToSubmit && u.IsPMBackOrReReading).Count(),
});
-
+
var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc);
return result;
}
-
+
///
@@ -447,8 +448,8 @@ namespace IRaCIS.Core.Application
ResearchProgramNo = t.ResearchProgramNo,
ExperimentName = t.ExperimentName,
TrialCode = t.TrialCode,
- UrgentCount = t.SubjectVisitList.Where(u => u.SubmitState ==SubmitStateEnum.ToSubmit && u.IsUrgent).Count(),
- ToBeDealedCount = t.SubjectVisitList.Where(u => u.SubmitState == SubmitStateEnum.ToSubmit ).Count(),
+ UrgentCount = t.SubjectVisitList.Where(u => u.SubmitState == SubmitStateEnum.ToSubmit && u.IsUrgent).Count(),
+ ToBeDealedCount = t.SubjectVisitList.Where(u => u.SubmitState == SubmitStateEnum.ToSubmit).Count(),
});
@@ -478,7 +479,7 @@ namespace IRaCIS.Core.Application
[FromServices] IRepository _trialRepository)
{
- var query = _trialRepository.Where(t=>t.QCProcessEnum != TrialQCProcess.NotAudit)
+ var query = _trialRepository.Where(t => t.QCProcessEnum != TrialQCProcess.NotAudit)
.Select(t => new ImageQualityToBeDoneDto()
{
TrialId = t.Id,
@@ -487,14 +488,14 @@ namespace IRaCIS.Core.Application
TrialCode = t.TrialCode,
// 待审核 加急的(待领取 已领取)-- 领取了 还没做 就是待审核
- UrgentCount = t.SubjectVisitList.Where(u => u.CurrentActionUserId==_userInfo.Id && u.IsUrgent).Count(),
+ UrgentCount = t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.Id && u.IsUrgent).Count(),
//待领取量
ToBeClaimedCount = t.SubjectVisitList.Where(u => u.SubmitState == SubmitStateEnum.ToSubmit).Count(),
//已领取 待审核 审核中 (审核完成 领取人就会清理 所以只用查询当前领取人是自己的就好了)
- ToBeReviewedCount= t.SubjectVisitList.Where(u => u.CurrentActionUserId==_userInfo.Id ).Count()
+ ToBeReviewedCount = t.SubjectVisitList.Where(u => u.CurrentActionUserId == _userInfo.Id).Count()
});
@@ -547,12 +548,14 @@ namespace IRaCIS.Core.Application
///
///
///
+ ///
///
///
[HttpPost]
public async Task> GetIRImageReadingToBeDoneList(IRImageReadingToBeDoneQuery inQuery,
[FromServices] IRepository _visitTaskRepository,
- [FromServices] IRepository _trialRepository)
+ [FromServices] IRepository _trialReadingCriterionRepository,
+ [FromServices] IRepository _trialRepository)
{
//var query = _trialRepository
@@ -583,35 +586,84 @@ namespace IRaCIS.Core.Application
// });
- var query = _visitTaskRepository.Where(t => t.DoctorUserId == _userInfo.Id && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze))
- .GroupBy(t => new { t.TrialId, t.Trial.ResearchProgramNo, t.Trial.TrialCode, t.Trial.ExperimentName,t.TrialReadingCriterionId,t.TrialReadingCriterion.CriterionName })
- .Select(g => new IRImageReadingToBeDoneDto()
- {
- TrialId = g.Key.TrialId,
- ResearchProgramNo = g.Key.ResearchProgramNo,
- ExperimentName = g.Key.ExperimentName,
- TrialCode = g.Key.TrialCode,
- CriterionName = g.Key.CriterionName,
- TrialReadingCriterionId = g.Key.TrialReadingCriterionId,
+ var newQuery= _trialReadingCriterionRepository.Where(t=>t.IsConfirm==true && t.Trial.TrialUserList.Any(t=>t.UserId==_userInfo.Id))
+ .Select(c => new IRImageReadingToBeDoneDto()
+ {
+ TrialId = c.TrialId,
+ ResearchProgramNo = c.Trial.ResearchProgramNo,
+ ExperimentName = c.Trial.ExperimentName,
+ TrialCode = c.Trial.TrialCode,
+ CriterionName = c.CriterionName,
+ TrialReadingCriterionId = c.Id,
- //UrgentCount = t.SubjectVisitList.SelectMany(c => c.QCChallengeList)
- //.Where(u => u.IsClosed == false && u.LatestReplyUser.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator && u.SubjectVisit.IsUrgent).Count(),
+ UrgentCount = c.VisitTaskList.AsQueryable().Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
+ // 前序 不存在 未一致性核查未通过的
+ .Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
+ //前序 不存在 未生成任务的访视
+ //.Where(t => g.Key.IsAutoCreate ? !t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(d => d.TrialReadingCriterionId == t.TrialReadingCriterionId).Any(f => f.IsGeneratedTask == false && t.VisitTaskNum > f.SubjectVisit.VisitNum) : true)
- UnReadCount = g.Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
+ .Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true))
+ .Count(t => t.IsUrgent),
+
+
+ UnReadCount = c.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
// 前序 不存在 未一致性核查未通过的
.Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
- //前序 不存在 未生成任务的访视
- .Where(t => t.TrialReadingCriterion.IsAutoCreate == false ? !t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(d => d.TrialReadingCriterionId == t.TrialReadingCriterionId).Any(f => f.IsGeneratedTask == false && t.VisitTaskNum > f.SubjectVisit.VisitNum) : true)
+ //前序 不存在 未生成任务的访视
+ //.WhereIf(g.Key.IsAutoCreate == false, t => !t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(d => d.TrialReadingCriterionId == t.TrialReadingCriterionId).Any(f => f.IsGeneratedTask == false && t.VisitTaskNum > f.SubjectVisit.VisitNum))
+ //.Where(t => g.Key.IsAutoCreate ? !t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(d => d.TrialReadingCriterionId == t.TrialReadingCriterionId).Any(f => f.IsGeneratedTask == false && t.VisitTaskNum > f.SubjectVisit.VisitNum) : true)
.Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true))
.Count(),
- HaveSignedCount = g.Where(t => t.DoctorUserId == _userInfo.Id && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze)
- && t.ReadingTaskState==ReadingTaskState.HaveSigned).Count(),
- });
- var result = await query.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, inQuery.SortField, inQuery.Asc);
+ HaveSignedCount = c.VisitTaskList.Where(t => t.DoctorUserId == _userInfo.Id && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze)
+ && t.ReadingTaskState == ReadingTaskState.HaveSigned).Count(),
+ })
+
+ ;
+
+
+
+
+
+ //var query = _visitTaskRepository.Where(t => t.DoctorUserId == _userInfo.Id && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze))
+ // .GroupBy(t => new { t.TrialId, t.Trial.ResearchProgramNo, t.Trial.TrialCode, t.Trial.ExperimentName, t.TrialReadingCriterionId, t.TrialReadingCriterion.CriterionName, t.TrialReadingCriterion.IsAutoCreate })
+ // .Select(g => new IRImageReadingToBeDoneDto()
+ // {
+ // TrialId = g.Key.TrialId,
+ // ResearchProgramNo = g.Key.ResearchProgramNo,
+ // ExperimentName = g.Key.ExperimentName,
+ // TrialCode = g.Key.TrialCode,
+ // CriterionName = g.Key.CriterionName,
+ // TrialReadingCriterionId = g.Key.TrialReadingCriterionId,
+
+ // //UrgentCount = g.AsQueryable().Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
+ // // // 前序 不存在 未一致性核查未通过的
+ // // .Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
+ // // //前序 不存在 未生成任务的访视
+ // // .Where( t => g.Key.IsAutoCreate ? !t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(d => d.TrialReadingCriterionId == t.TrialReadingCriterionId).Any(f => f.IsGeneratedTask == false && t.VisitTaskNum > f.SubjectVisit.VisitNum):true)
+
+ // // .Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true))
+ // // .Count(t=>t.IsUrgent),
+
+ // UnReadCount = g.Where(t => t.DoctorUserId == _userInfo.Id && t.ReadingTaskState != ReadingTaskState.HaveSigned && t.TaskState == TaskState.Effect)
+ // // 前序 不存在 未一致性核查未通过的
+ // .Where(t => !t.Subject.SubjectVisitList.Any(sv => sv.CheckState != CheckStateEnum.CVPassed && t.VisitTaskNum > sv.VisitNum))
+ // //前序 不存在 未生成任务的访视
+ // //.WhereIf(g.Key.IsAutoCreate == false, t => !t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(d => d.TrialReadingCriterionId == t.TrialReadingCriterionId).Any(f => f.IsGeneratedTask == false && t.VisitTaskNum > f.SubjectVisit.VisitNum))
+ // //.Where(t => g.Key.IsAutoCreate ? !t.Subject.SubjectCriteriaEvaluationVisitFilterList.Where(d => d.TrialReadingCriterionId == t.TrialReadingCriterionId).Any(f => f.IsGeneratedTask == false && t.VisitTaskNum > f.SubjectVisit.VisitNum) : true)
+
+ // .Where(y => y.IsFrontTaskNeedSignButNotSign == false && (y.IsNeedClinicalDataSign == false || y.IsClinicalDataSign == true))
+ // .Count(),
+
+ // HaveSignedCount = g.Where(t => t.DoctorUserId == _userInfo.Id && (t.TaskState == TaskState.Effect || t.TaskState == TaskState.Freeze)
+ // && t.ReadingTaskState == ReadingTaskState.HaveSigned).Count(),
+
+ // });
+
+ var result = await newQuery.ToPagedListAsync(inQuery.PageIndex, inQuery.PageSize, string.IsNullOrEmpty(inQuery.SortField) ?nameof(IRImageReadingToBeDoneDto.TrialId): inQuery.SortField, inQuery.Asc);
return result;
@@ -630,21 +682,28 @@ namespace IRaCIS.Core.Application
{
var query = _taskMedicalReviewRepository
- .Where(t=>t.IsClosedDialog==false)
- .GroupBy(t=>new {t.TrialId, t.Trial.ResearchProgramNo, t.Trial.ExperimentName, t.Trial.TrialCode ,
- t.VisitTask.TrialReadingCriterionId,t.VisitTask.TrialReadingCriterion.CriterionName})
+ .Where(t => t.IsClosedDialog == false)
+ .GroupBy(t => new
+ {
+ t.TrialId,
+ t.Trial.ResearchProgramNo,
+ t.Trial.ExperimentName,
+ t.Trial.TrialCode,
+ t.VisitTask.TrialReadingCriterionId,
+ t.VisitTask.TrialReadingCriterion.CriterionName
+ })
.Select(g => new MedicalCommentsToBeDoneDto()
{
TrialId = g.Key.TrialId,
ResearchProgramNo = g.Key.ResearchProgramNo,
ExperimentName = g.Key.ExperimentName,
TrialCode = g.Key.TrialCode,
- CriterionName=g.Key.CriterionName,
- TrialReadingCriterionId=g.Key.TrialReadingCriterionId,
- UrgentCount = g.Where(u => u.VisitTask.IsUrgent
- && u.ReadingMedicalReviewDialogList.OrderByDescending(l=>l.CreateTime).First().UserTypeEnumInt==(int) UserTypeEnum.MIM).Count(),
+ CriterionName = g.Key.CriterionName,
+ TrialReadingCriterionId = g.Key.TrialReadingCriterionId,
+ UrgentCount = g.Where(u => u.VisitTask.IsUrgent
+ && u.ReadingMedicalReviewDialogList.OrderByDescending(l => l.CreateTime).First().UserTypeEnumInt == (int)UserTypeEnum.MIM).Count(),
- ToBeDealedCount = g.Where(u =>
+ ToBeDealedCount = g.Where(u =>
u.ReadingMedicalReviewDialogList.OrderByDescending(l => l.CreateTime).First().UserTypeEnumInt == (int)UserTypeEnum.MIM).Count(),
});
@@ -675,7 +734,8 @@ namespace IRaCIS.Core.Application
var query = _taskMedicalReviewRepository
.Where(t => t.IsClosedDialog == false)
- .GroupBy(t => new {
+ .GroupBy(t => new
+ {
t.TrialId,
t.Trial.ResearchProgramNo,
t.Trial.ExperimentName,
diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionTrial.cs
index a91ec42f9..df2bf30f4 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionTrial.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingCriterion/ReadingQuestionCriterionTrial.cs
@@ -256,6 +256,11 @@ namespace IRaCIS.Core.Domain.Models
[JsonIgnore]
public List TrialCriterionAdditionalAssessmentTypeList { get; set; } = new List();
+
+
+ [JsonIgnore]
+
+ public List VisitTaskList { get; set; }
}