修改
This commit is contained in:
@@ -55,17 +55,17 @@
|
||||
// NoticeTypeEnum = NoticeType.NotNeedNotice,
|
||||
// NeedDeal = false,
|
||||
// StudyStatusStr = "Uploaded",
|
||||
// Message = $"CRC : {_userInfo.RealName} has uploaded {study.StudyCode} ",
|
||||
// Message = $"IC : {_userInfo.RealName} has uploaded {study.StudyCode} ",
|
||||
// SendTime = DateTime.Now,
|
||||
// });
|
||||
// }
|
||||
|
||||
// #region 处理QA通知模块
|
||||
|
||||
// //查询项目的参与者 和 负责site下CRC用户
|
||||
// //查询项目的参与者 和 负责site下IC用户
|
||||
// var trialUserList = _userTrialRepository.Where(t => t.TrialId == study.TrialId).ToList();
|
||||
|
||||
// // 找到该study 关联Site 下的CRC
|
||||
// // 找到该study 关联Site 下的IC
|
||||
|
||||
// var crcList = _userTrialSiteRepository.Where(t =>
|
||||
// t.SiteId == study.SiteId && t.User.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator && t.TrialId == study.TrialId).ToList();
|
||||
@@ -78,11 +78,11 @@
|
||||
|
||||
|
||||
|
||||
// // CRC =>QA
|
||||
// // IC =>QA
|
||||
// if (studyStatus.Status == (int)StudyStatus.QARequested)
|
||||
// {
|
||||
// //找出当前操作的CRC
|
||||
// //PM 或者admin可以代替CRC角色 不能从CRC列表中查询用户
|
||||
// //找出当前操作的IC
|
||||
// //PM 或者admin可以代替IC角色 不能从IC列表中查询用户
|
||||
// //var currentCRC = trialUserList.First(t => t.UserId == _userInfo.Id);
|
||||
|
||||
// var notice = new QANotice()
|
||||
@@ -100,7 +100,7 @@
|
||||
// NeedDeal = true,
|
||||
// StudyStatusStr = "QA Requested",
|
||||
// Message =
|
||||
// $"CRC -> QA : {_userInfo.RealName} request QA {study.StudyCode} , Inquiry can be performed! ",
|
||||
// $"IC -> QA : {_userInfo.RealName} request QA {study.StudyCode} , Inquiry can be performed! ",
|
||||
// SendTime = DateTime.Now,
|
||||
// };
|
||||
|
||||
@@ -128,18 +128,18 @@
|
||||
// });
|
||||
// }
|
||||
|
||||
// // QA =>CRC 向CRC推送消息影像有问题 同时作为 requestToQA 的边界
|
||||
// // QA =>IC 向IC推送消息影像有问题 同时作为 requestToQA 的边界
|
||||
// else if (studyStatus.Status == (int)StudyStatus.QAing)
|
||||
// {
|
||||
// //找出当前操作的QA 如果是pm 或者admin 代替操作 此时会有问题 所以 谁代替,就以谁的名义执行
|
||||
// //var currentQA = qaList.First(t => t.UserId == _userInfo.Id);
|
||||
// //var currentQA = trialUserList.First(t => t.UserId == _userInfo.Id);
|
||||
|
||||
// //在项目CRC列表中筛选出 负责该study关联 site的CRC
|
||||
// //在项目IC列表中筛选出 负责该study关联 site的IC
|
||||
// var siteCRCList = _userTrialSiteRepository.Where(t =>
|
||||
// t.SiteId == study.SiteId && t.User.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator && t.TrialId == study.TrialId).ToList();
|
||||
|
||||
// //查询项目的参与者 和 负责site下CRC用户
|
||||
// //查询项目的参与者 和 负责site下IC用户
|
||||
|
||||
|
||||
|
||||
@@ -156,7 +156,7 @@
|
||||
// NoticeTypeEnum = NoticeType.QA_InQA_NoticeCRC,
|
||||
// NeedDeal = true,
|
||||
// StudyStatusStr = "In QA",
|
||||
// Message = $"QA -> CRC : {_userInfo.RealName} inquiry {study.StudyCode} ",
|
||||
// Message = $"QA -> IC : {_userInfo.RealName} inquiry {study.StudyCode} ",
|
||||
// SendTime = DateTime.Now,
|
||||
// };
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
// ToUserType = t.UserTypeRole.UserTypeShortName
|
||||
// }));
|
||||
|
||||
// //添加 发送给CRC的消息 消息和CRC是 一对多
|
||||
// //添加 发送给IC的消息 消息和IC是 一对多
|
||||
// _qaNoticeRepository.Add(notice);
|
||||
|
||||
|
||||
@@ -228,7 +228,7 @@
|
||||
|
||||
// _qaNoticeRepository.Add(notice);
|
||||
|
||||
// //处理 消息 标记已处理 存在意外情况 qa发给CRC的 但是qa里面设置了 通过或者不通过 此时qa发送的消息也设置为已处理
|
||||
// //处理 消息 标记已处理 存在意外情况 qa发给IC的 但是qa里面设置了 通过或者不通过 此时qa发送的消息也设置为已处理
|
||||
// var needDealNoticeList = _qaNoticeRepository.AsQueryable()
|
||||
// .Where(t => t.SubjectVisitId == study.Id && t.NeedDeal &&
|
||||
// (t.NoticeTypeEnum == NoticeType.CRC_RequestToQA_NoticeQA ||
|
||||
@@ -248,7 +248,7 @@
|
||||
|
||||
|
||||
// }
|
||||
// // QA =>CRC 暂时不用发送消息给CRC 因为CRC 暂时没有入口回复 同时作为 requestToQA 的边界
|
||||
// // QA =>IC 暂时不用发送消息给IC 因为IC 暂时没有入口回复 同时作为 requestToQA 的边界
|
||||
// else if (studyStatus.Status == (int)StudyStatus.QAFInishNotPass)
|
||||
// {
|
||||
|
||||
@@ -298,24 +298,24 @@
|
||||
// var study = _studyRepository.FirstOrDefault(t => t.Id == studyId);
|
||||
// var status = study.Status;
|
||||
|
||||
// //处理CRC 重传时 QA消息
|
||||
// //处理IC 重传时 QA消息
|
||||
|
||||
// if (status == (int)StudyStatus.QAing)
|
||||
// {
|
||||
// //查询项目的参与者 和 负责site下CRC用户
|
||||
// //查询项目的参与者 和 负责site下IC用户
|
||||
// var trialUserList = _userTrialRepository.Where(t => t.TrialId == study.TrialId).ToList();
|
||||
|
||||
// // 找到该study 关联Site 下的CRC
|
||||
// // 找到该study 关联Site 下的IC
|
||||
|
||||
// var crcList = _userTrialSiteRepository.Where(t =>
|
||||
// t.SiteId == study.SiteId && t.User.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator && t.TrialId == study.TrialId).ToList();
|
||||
|
||||
// var qaList = trialUserList.Where(t => t.User.UserTypeEnum == UserTypeEnum.IQC).ToList();
|
||||
|
||||
// //CRC =>QA CRC的职能被PM 或者admin代替
|
||||
// //IC =>QA IC的职能被PM 或者admin代替
|
||||
// //if (_userInfo.UserTypeEnumInt == (int)UserType.ClinicalResearchCoordinator)
|
||||
// {
|
||||
// //PM 或者admin可以代替CRC角色 不能从CRC列表中查询用户
|
||||
// //PM 或者admin可以代替IC角色 不能从IC列表中查询用户
|
||||
// //var currentCRC = trialUserList.First(t => t.UserId == _userInfo.Id);
|
||||
|
||||
// var notice = new QANotice()
|
||||
@@ -330,7 +330,7 @@
|
||||
// FromUserType = _userInfo.UserTypeShortName,
|
||||
// NoticeTypeEnum = NoticeType.CRC_ReUpload_NoticeQA,
|
||||
// NeedDeal = true,
|
||||
// Message = $"CRC -> QA :{_userInfo.RealName} has reuploaded {study.StudyCode} , Need to be inquiry again",
|
||||
// Message = $"IC -> QA :{_userInfo.RealName} has reuploaded {study.StudyCode} , Need to be inquiry again",
|
||||
// SendTime = DateTime.Now
|
||||
// };
|
||||
|
||||
@@ -345,7 +345,7 @@
|
||||
|
||||
// _qaNoticeRepository.Add(notice);
|
||||
|
||||
// //这里作为 QA 设置 Inqa 状态的回复 或者QA和CRC对话的
|
||||
// //这里作为 QA 设置 Inqa 状态的回复 或者QA和IC对话的
|
||||
// var needDealNoticeList = _qaNoticeRepository.Where(t => t.SubjectVisitId == study.Id && t.NeedDeal
|
||||
// && (t.NoticeTypeEnum == NoticeType.QA_InQA_NoticeCRC || t.NoticeTypeEnum == NoticeType.QA_QARecordDialogPost_NoticeCRC))
|
||||
// .ToList();
|
||||
@@ -377,10 +377,10 @@
|
||||
|
||||
// #region 处理QA通知 匿名化完毕 通知PM
|
||||
|
||||
// //查询项目的参与者 和 负责site下CRC用户
|
||||
// //查询项目的参与者 和 负责site下IC用户
|
||||
// var trialUserList = _userTrialRepository.Where(t => t.TrialId == study.TrialId).ToList();
|
||||
|
||||
// // 找到该study 关联Site 下的CRC
|
||||
// // 找到该study 关联Site 下的IC
|
||||
|
||||
// var crcList = _userTrialSiteRepository.Where(t =>
|
||||
// t.SiteId == study.SiteId && t.User.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator && t.TrialId == study.TrialId).ToList();
|
||||
|
||||
@@ -10,10 +10,7 @@ namespace IRaCIS.Core.Application.Auth
|
||||
|
||||
public static class IRaCISPolicy
|
||||
{
|
||||
|
||||
|
||||
|
||||
public const string CRC = "CRC";
|
||||
public const string IC = "IC";
|
||||
|
||||
public const string PM = "PM";
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ public enum AuditOptType
|
||||
AddTrialSite = 5,
|
||||
DeleteTrialSite = 6,
|
||||
|
||||
//Site CRC
|
||||
//Site IC
|
||||
AddTrialSiteCRC = 7,
|
||||
DeleteTrialSiteCRC = 8,
|
||||
|
||||
@@ -355,7 +355,7 @@ public class TrialAuditAttribute : Attribute,/*IActionFilter, */IAsyncActionFilt
|
||||
// // }
|
||||
|
||||
// // break;
|
||||
// // //删除项目Site CRC
|
||||
// // //删除项目Site IC
|
||||
// // case AuditOptType.DeleteTrialSiteCRC:
|
||||
|
||||
// // if (result.IsSuccess)
|
||||
@@ -700,7 +700,7 @@ public class TrialAuditAttribute : Attribute,/*IActionFilter, */IAsyncActionFilt
|
||||
// // //删除项目运维人员
|
||||
// // case AuditOptType.DeleteTrailStaff:
|
||||
|
||||
// // // 删除项目Site CRC
|
||||
// // // 删除项目Site IC
|
||||
// // case AuditOptType.DeleteTrialSiteCRC:
|
||||
|
||||
// // //接口参数
|
||||
@@ -920,7 +920,7 @@ public class TrialAuditAttribute : Attribute,/*IActionFilter, */IAsyncActionFilt
|
||||
// _userTrial = _userTrialRepository.AsQueryable().Include(t => t.User).FirstOrDefault(t => t.Id == userTrial);
|
||||
// break;
|
||||
|
||||
// // 删除项目Site CRC
|
||||
// // 删除项目Site IC
|
||||
// case AuditOptType.DeleteTrialSiteCRC:
|
||||
|
||||
// //接口参数
|
||||
@@ -1258,7 +1258,7 @@ public class TrialAuditAttribute : Attribute,/*IActionFilter, */IAsyncActionFilt
|
||||
// }
|
||||
|
||||
// break;
|
||||
// //删除项目Site CRC
|
||||
// //删除项目Site IC
|
||||
// case AuditOptType.DeleteTrialSiteCRC:
|
||||
|
||||
// if (result.IsSuccess)
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
// TrialSiteService
|
||||
"CodeRepeated": "Code is not allowed to be repeated",
|
||||
"CRCCanNotDeleted": "The site has been associated with CRC, and couldn't be deleted",
|
||||
"CRCCanNotDeleted": "The site has been associated with IC, and couldn't be deleted",
|
||||
"SiteCanNotDeleted": "The subjects has been added to this site, and couldn't be deleted",
|
||||
"StudyCanNotDeleted": "The site has been uploaded study, and couldn't be deleted.",
|
||||
|
||||
@@ -76,8 +76,8 @@
|
||||
// SubjectVisitService
|
||||
"ContainsVisitnum": "This subject's visit plan already contains a visit with the same visitnum",
|
||||
"LastEvaluationNotAllowed": "After setting the last evaluation, you are not allowed to add scheduled outbound visits",
|
||||
"CRCSubmit": "PD confirmation status cannot be modified after CRC submission",
|
||||
"BacktrackingVisits": "After the CRC is submitted, the PD confirmation status cannot be changed",
|
||||
"CRCSubmit": "PD confirmation status cannot be modified after IC submission",
|
||||
"BacktrackingVisits": "After the IC is submitted, the PD confirmation status cannot be changed",
|
||||
"ImageUpload": "The subject uploaded the image after this visit, and this visit is not allowed to be set as the last visit",
|
||||
"AssociatedUploaded": "This visit is associated with the uploaded study images and couldn't be deleted",
|
||||
"InPlanCanNotDeleted": "This visit is InPlan and couldn't be deleted",
|
||||
@@ -87,7 +87,7 @@
|
||||
"AccordWithVisitNum": "For the visit plan, the VisitDay with a larger VisitNum should be larger than the VisitDay with a smaller VisitNum",
|
||||
"same/VisitName": "A visit with the same VisitName/VisitNum already existed in the current visit plan",
|
||||
"AlreadyBaseline": "A visit already is baseline in the current visit plan",
|
||||
"IsUploadVideo": "A CRC has uploaded image data for the baseline and is not allowed to modify the baseline",
|
||||
"IsUploadVideo": "A IC has uploaded image data for the baseline and is not allowed to modify the baseline",
|
||||
"VisitHasBeenExecuted": "The visit plan has been assigned to the subjects and executed",
|
||||
"OnlyProgressCanEdit": "Modification validation is allowed only during project initialization or in progress",
|
||||
"NoBaselineNoConfirmation": "No baseline, no confirmation allowed",
|
||||
@@ -121,10 +121,10 @@
|
||||
|
||||
// QCOperationService
|
||||
"AuditQuestionMust": "The audit question must be filled out and saved, otherwise no challenge is allowed to be added",
|
||||
"VisitNoClose": "The current viewer has unclosed query for CRC upload permission. No further query is allowed",
|
||||
"NotFinish": "CRC retransmission request /QC agrees to retransmission challenge and is not allowed to close the challenge until CRC setup retransmission is complete",
|
||||
"VisitNoClose": "The current viewer has unclosed query for IC upload permission. No further query is allowed",
|
||||
"NotFinish": "IC retransmission request /QC agrees to retransmission challenge and is not allowed to close the challenge until IC setup retransmission is complete",
|
||||
"QCHasBeenReplied": "This QC inquiry has been answered",
|
||||
"OperationUserMustBeCRC/PM": "Only CRC and PM are allowed",
|
||||
"OperationUserMustBeCRC/PM": "Only IC and PM are allowed",
|
||||
"CanNotCloseQuery": "Visits that perform conformance checks are not allowed to close queries",
|
||||
"OnlyPMCanSet": "Only PM manual Settings are allowed to pass the consistency check",
|
||||
"CanNotSettingConsistency": "Currently, the PM approves the rollback and does not allow the consistency check to pass",
|
||||
@@ -155,7 +155,7 @@
|
||||
"CanNotSetQCFailed": "QC Failed cannot be set in the unchecked state",
|
||||
"NotInPrimaryQCQCFailed": "The project is configured as a single audit. The current audit status is not InPrimaryQC and cannot be changed to QCFailed",
|
||||
"TrialIsDoubleCheckCanNotQCFailed{0}": "The project is configured with double audit. The current audit status is {0} and cannot be changed to QCFailed",
|
||||
"CRCHasBeenSubmitted": "CRC has submitted an unmodified group confirmation status",
|
||||
"CRCHasBeenSubmitted": "IC has submitted an unmodified group confirmation status",
|
||||
"CannotBeChangedPD": "PD confirmation status cannot be modified for rollback visits",
|
||||
"OtherQCProcessAudit": "Other QC is conducting audit, current operation is not allowed",
|
||||
"ForwardFailed": "Forward failure",
|
||||
|
||||
@@ -59,7 +59,7 @@
|
||||
|
||||
// TrialSiteService
|
||||
"CodeRepeated": "编码不允许重复",
|
||||
"CRCCanNotDeleted": "该站点已与CRC关联,无法删除",
|
||||
"CRCCanNotDeleted": "该站点已与IC关联,无法删除",
|
||||
"SiteCanNotDeleted": "主题已添加到本网站,无法删除",
|
||||
"StudyCanNotDeleted": "该网站已上传研究,无法删除",
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
"ContainsVisitnum": "这个主题的访问计划已经包含了一个访问次数相同的访问",
|
||||
//该患者已经有检查批次设置为末次检查批次,不允许将该检查批次设置为末次检查批次 这个在上面有 TheLastVisit
|
||||
"LastEvaluationNotAllowed": "设置末次评估后,不允许添加计划外检查批次",
|
||||
"CRCSubmit": "CRC提交后,不允许修改PD确认状态",
|
||||
"CRCSubmit": "IC提交后,不允许修改PD确认状态",
|
||||
"BacktrackingVisits": "回退的检查批次,不允许修改PD确认状态",
|
||||
"ImageUpload": "该患者此检查批次后有影像上传,该检查批次不允许设置为末次检查批次",
|
||||
"AssociatedUploaded": "本次访问与上传的研究图片有关,无法删除",
|
||||
@@ -87,7 +87,7 @@
|
||||
"AccordWithVisitNum": "对于访问计划,具有较大VisitNum的VisitDay应该大于具有较小VisitNum的VisitDay",
|
||||
"same/VisitName": "当前访问计划中已经存在具有相同VisitName/VisitNum的访问",
|
||||
"AlreadyBaseline": "已检查批次是当前检查批次计划的基线",
|
||||
"IsUploadVideo": "有CRC已经为基线上传了影像数据,不允许修改基线",
|
||||
"IsUploadVideo": "有IC已经为基线上传了影像数据,不允许修改基线",
|
||||
"VisitHasBeenExecuted": "访问计划已分配给患者并执行",
|
||||
"OnlyProgressCanEdit": "仅仅在项目初始化或者进行中时,才允许修改确认",
|
||||
"NoBaselineNoConfirmation": "没有基线,不允许确认",
|
||||
@@ -122,10 +122,10 @@
|
||||
|
||||
// QCOperationService
|
||||
"AuditQuestionMust": "必须填写审核问题,并保存,否则不允许添加质疑",
|
||||
"VisitNoClose": "当前检查批次有未关闭的 同意CRC上传的质疑,不允许再次添加质疑",
|
||||
"NotFinish": "CRC申请重传的/QC同意重传的质疑,在CRC设置重传完成前不允许关闭质疑",
|
||||
"VisitNoClose": "当前检查批次有未关闭的 同意IC上传的质疑,不允许再次添加质疑",
|
||||
"NotFinish": "IC申请重传的/QC同意重传的质疑,在IC设置重传完成前不允许关闭质疑",
|
||||
"QCHasBeenReplied": "此QC质询已回复",
|
||||
"OperationUserMustBeCRC/PM": "一致性核查对话操作用户 只允许 CRC/PM",
|
||||
"OperationUserMustBeCRC/PM": "一致性核查对话操作用户 只允许 IC/PM",
|
||||
"CanNotCloseQuery": "执行一致性核查的检查批次 不允许关闭质疑",
|
||||
"OnlyPMCanSet": "只允许PM 手动设置一致性核查通过",
|
||||
"CanNotSettingConsistency": "当前是PM同意回退,不允许设置一致性核查通过",
|
||||
@@ -156,7 +156,7 @@
|
||||
"CanNotSetQCFailed": "不审状态下,不允许设置为QC Failed",
|
||||
"NotInPrimaryQCQCFailed": "项目配置为单审 当前审核状态不为 InPrimaryQC,不能变更到 QCFailed",
|
||||
"TrialIsDoubleCheckCanNotQCFailed{0}": "项目配置为双审 当前审核状态为 {0},不能变更到 QCFailed",
|
||||
"CRCHasBeenSubmitted": "CRC已提交了 不能修改入组确认状态",
|
||||
"CRCHasBeenSubmitted": "IC已提交了 不能修改入组确认状态",
|
||||
"CannotBeChangedPD": "回退的检查批次,不允许修改PD确认状态",
|
||||
"OtherQCProcessAudit": "其他QC正在进行审核,当前操作不允许",
|
||||
"ForwardFailed": "转发失败",
|
||||
|
||||
@@ -375,7 +375,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
var needSignCount = 0;
|
||||
|
||||
//CRC 的自动签名 不用管 只用处理PM的就好
|
||||
//IC 的自动签名 不用管 只用处理PM的就好
|
||||
var haveSignedCount = _readingClinicalDataRepository
|
||||
.Where(t => t.TrialId == trialId && t.IsSign && t.ReadingClinicalDataState == ReadingClinicalDataStatus.HaveSigned && t.ReadingId == readingId && t.ClinicalDataTrialSet.UploadRole == UploadRole.PM).Count();
|
||||
|
||||
@@ -384,7 +384,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
if (isbaseLine)
|
||||
{
|
||||
//CRC 的自动签名 不用管 只用处理PM 的就好
|
||||
//IC 的自动签名 不用管 只用处理PM 的就好
|
||||
needSignCount = trialClinicalDataSetList.Where(t => t.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCriterionId) && (t.ClinicalDataLevel == ClinicalLevel.Subject || t.ClinicalDataLevel == ClinicalLevel.SubjectVisit) && t.UploadRole == UploadRole.PM).Count();
|
||||
}
|
||||
else
|
||||
@@ -414,7 +414,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
needSignCount = trialClinicalDataSetList.Where(t => t.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCriterionId) && t.ClinicalDataLevel == ClinicalLevel.OncologyRead && t.UploadRole == UploadRole.PM).Count();
|
||||
}
|
||||
|
||||
//可能仅仅CRC 基线 没有PM
|
||||
//可能仅仅IC 基线 没有PM
|
||||
if (needSignCount == haveSignedCount /*&& needSignCount != 0*/)
|
||||
{
|
||||
isClinicalDataSign = true;
|
||||
|
||||
@@ -148,7 +148,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.Sex), t => t.Sex.Contains(param.Sex))
|
||||
.WhereIf(param.Status != null, t => t.Status == param.Status)
|
||||
.WhereIf(param.SiteId != null, t => t.SiteId == param.SiteId)
|
||||
// CRC 只负责他管理site的患者
|
||||
// IC 只负责他管理site的患者
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.ProjectTo<SubjectExportDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
@@ -554,7 +554,7 @@ namespace IRaCIS.Core.Application.Service.Common
|
||||
.WhereIf(checkQuery.SiteId != null, t => t.SiteId == checkQuery.SiteId)
|
||||
.WhereIf(!string.IsNullOrEmpty(checkQuery.SubjectInfo), t => t.Subject.Code.Contains(checkQuery.SubjectInfo))
|
||||
.WhereIf(checkQuery.VisitPlanArray != null && checkQuery.VisitPlanArray?.Length > 0, svExpression)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))//CRC 过滤负责的site
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))//IC 过滤负责的site
|
||||
.ProjectTo<PMKCheckEXportDTO>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
list = list.OrderBy(t => t.TrialSiteCode).ThenBy(t => t.SubjectCode).ThenBy(t => t.VisitNum).ToList();
|
||||
|
||||
@@ -353,7 +353,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
|
||||
var sendEmailConfig = new SMTPEmailConfig();
|
||||
|
||||
//收件人 如果是CRC CRA 要按照中心发送
|
||||
//收件人 如果是IC CRA 要按照中心发送
|
||||
var toUserTypeEnumList = emailConfig.TrialEmailNoticeUserList.Where(t => t.EmailUserType == EmailUserType.To).Select(c => c.UserType).ToList();
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
public static class QCCommon
|
||||
{
|
||||
/// <summary>
|
||||
/// 验证CRC 是否已提交 已提交 就不允许进行任何操作,如果是IQC 那么还验证是否是当前任务领取人
|
||||
/// 验证IC 是否已提交 已提交 就不允许进行任何操作,如果是IQC 那么还验证是否是当前任务领取人
|
||||
/// </summary>
|
||||
/// <param name="_repository"></param>
|
||||
/// <param name="_userInfo"></param>
|
||||
@@ -24,7 +24,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
if (await _repository.AnyAsync<SubjectVisit>(t => t.Id == subjectVisitId && t.SubmitState == SubmitStateEnum.Submitted &&
|
||||
(!t.QCChallengeList.Any(u => u.ReuploadEnum == QCChanllengeReuploadEnum.QCAgreeUpload))))
|
||||
{
|
||||
throw new BusinessValidationFailedException("CRC 已提交影像,不能进行操作。");
|
||||
throw new BusinessValidationFailedException("IC 已提交影像,不能进行操作。");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,9 +42,9 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
|
||||
|
||||
#region CRC上传、质疑页面
|
||||
#region IC上传、质疑页面
|
||||
/// <summary>
|
||||
/// CRC 检查批次上传列表
|
||||
/// IC 检查批次上传列表
|
||||
/// </summary>
|
||||
/// <param name="visitSearchDTO"></param>
|
||||
/// <returns></returns>
|
||||
@@ -75,8 +75,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
var pageList = await query.ToPagedListAsync(visitSearchDTO.PageIndex, visitSearchDTO.PageSize, visitSearchDTO.SortField, visitSearchDTO.Asc, string.IsNullOrWhiteSpace(visitSearchDTO.SortField), defalutSortArray);
|
||||
|
||||
var config = await _repository.Where<Trial>(t => t.Id == visitSearchDTO.TrialId).ProjectTo<TrialSubjectAndSVConfig>(_mapper.ConfigurationProvider).FirstOrDefaultAsync().IfNullThrowException();
|
||||
config.IsHaveSubjectClinicalData = await _clinicalDataTrialSet.AnyAsync(x => x.TrialId == visitSearchDTO.TrialId && x.IsConfirm && x.ClinicalDataLevel == ClinicalLevel.Subject && x.UploadRole == UploadRole.CRC);
|
||||
config.IsHaveVisitClinicalData = await _clinicalDataTrialSet.AnyAsync(x => x.TrialId == visitSearchDTO.TrialId && x.IsConfirm && x.ClinicalDataLevel == ClinicalLevel.SubjectVisit && x.UploadRole == UploadRole.CRC);
|
||||
config.IsHaveSubjectClinicalData = await _clinicalDataTrialSet.AnyAsync(x => x.TrialId == visitSearchDTO.TrialId && x.IsConfirm && x.ClinicalDataLevel == ClinicalLevel.Subject && x.UploadRole == UploadRole.IC);
|
||||
config.IsHaveVisitClinicalData = await _clinicalDataTrialSet.AnyAsync(x => x.TrialId == visitSearchDTO.TrialId && x.IsConfirm && x.ClinicalDataLevel == ClinicalLevel.SubjectVisit && x.UploadRole == UploadRole.IC);
|
||||
return (pageList, config);
|
||||
|
||||
}
|
||||
@@ -84,7 +84,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// CRC 质疑列表
|
||||
/// IC 质疑列表
|
||||
/// </summary>
|
||||
/// <param name="challengeQuery"></param>
|
||||
/// <returns></returns>
|
||||
@@ -92,7 +92,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
public async Task<(PageOutput<QCCRCChallengeViewModel>, TrialSubjectAndSVConfig)> GetCRCChallengeList(ChallengeQuery challengeQuery)
|
||||
{
|
||||
|
||||
#region CRC 质疑列表 join连表方式
|
||||
#region IC 质疑列表 join连表方式
|
||||
//var query = from qcChanllenge in _qcChallengeRepository.Find(qcChallengeLambda)
|
||||
// join subjectVisit in _subjectVisitRepository.Find() on qcChanllenge.SubjectVisitId equals subjectVisit.Id
|
||||
// join trialSite in _trialSiteRepository.Find(t => t.TrialId == challengeQuery.TrialId) on subjectVisit.SiteId equals trialSite.SiteId
|
||||
@@ -466,7 +466,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
#region 一致性核查 转发页面
|
||||
/// <summary>
|
||||
/// 获取一致性核查列表 CRC/PM 公用
|
||||
/// 获取一致性核查列表 IC/PM 公用
|
||||
/// </summary>
|
||||
/// <param name="checkQuery"></param>
|
||||
/// <returns></returns>
|
||||
@@ -530,7 +530,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
.WhereIf(!string.IsNullOrEmpty(checkQuery.SubjectInfo), t => t.Subject.Code.Contains(checkQuery.SubjectInfo))
|
||||
.WhereIf(checkQuery.VisitPlanArray != null && checkQuery.VisitPlanArray?.Length > 0, svExpression)
|
||||
//.WhereIf(!string.IsNullOrEmpty(checkQuery.VisitPlanInfo), checkQuery.VisitPlanInfo.Contains('.') ? t => t.InPlan == false : t => t.VisitNum == decimal.Parse(checkQuery.VisitPlanInfo))
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))//CRC 过滤负责的site
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))//IC 过滤负责的site
|
||||
.ProjectTo<QCCheckWithModalityView>(_mapper.ConfigurationProvider);
|
||||
|
||||
var pageList = await query.ToPagedListAsync(checkQuery.PageIndex, checkQuery.PageSize, checkQuery.SortField, checkQuery.Asc);
|
||||
@@ -576,7 +576,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
.WhereIf(!string.IsNullOrEmpty(forwardQuery.SubjectInfo), t => t.Subject.Code.Contains(forwardQuery.SubjectInfo))
|
||||
.WhereIf(forwardQuery.VisitPlanArray != null && forwardQuery.VisitPlanArray?.Length > 0, svExpression)
|
||||
//.WhereIf(!string.IsNullOrEmpty(forwardQuery.VisitPlanInfo), forwardQuery.VisitPlanInfo.Contains('.') ? t => t.InPlan == false : t => t.VisitNum == decimal.Parse(forwardQuery.VisitPlanInfo))
|
||||
//.WhereIf(_userInfo.UserTypeEnumInt == (int)UserType.ClinicalResearchCoordinator, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))//CRC 过滤负责的site
|
||||
//.WhereIf(_userInfo.UserTypeEnumInt == (int)UserType.ClinicalResearchCoordinator, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))//IC 过滤负责的site
|
||||
.ProjectTo<ForWardViewModel>(_mapper.ConfigurationProvider);
|
||||
|
||||
return await query.ToPagedListAsync(forwardQuery.PageIndex, forwardQuery.PageSize, forwardQuery.SortField, forwardQuery.Asc);
|
||||
@@ -786,7 +786,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// CRC/PM 看到某次检查批次下的所有质疑和聊天内容 包括初审和复审的 。
|
||||
/// IC/PM 看到某次检查批次下的所有质疑和聊天内容 包括初审和复审的 。
|
||||
/// </summary>
|
||||
/// <param name="subjectVisitId"></param>
|
||||
/// <param name="trialQCProcess"></param>
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
{
|
||||
if (await _qcChallengeRepository.AnyAsync(t => t.IsClosed == false && t.SubjectVisitId == qaQuestionCommand.SubjectVisitId && t.ReuploadEnum == QCChanllengeReuploadEnum.QCAgreeUpload))
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前检查批次未关闭的质疑已设置了同意CRC重传影像。请在CRC完成影像重传后,先关闭原质疑,再添加新的质疑。");
|
||||
throw new BusinessValidationFailedException("当前检查批次未关闭的质疑已设置了同意IC重传影像。请在IC完成影像重传后,先关闭原质疑,再添加新的质疑。");
|
||||
|
||||
}
|
||||
|
||||
@@ -163,7 +163,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
if (dbQCChallenge.ReuploadEnum == QCChanllengeReuploadEnum.CRCRequestReupload || dbQCChallenge.ReuploadEnum == QCChanllengeReuploadEnum.QCAgreeUpload)
|
||||
{
|
||||
throw new BusinessValidationFailedException("CRC已申请重传或者QC同意重传,不允许关闭该质疑。请在QC拒绝重传申请或者CRC设置重传影像后,再关闭质疑。");
|
||||
throw new BusinessValidationFailedException("IC已申请重传或者QC同意重传,不允许关闭该质疑。请在QC拒绝重传申请或者IC设置重传影像后,再关闭质疑。");
|
||||
}
|
||||
|
||||
|
||||
@@ -372,7 +372,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CRC 请求回退
|
||||
/// IC 请求回退
|
||||
/// </summary>
|
||||
/// <param name="subjectVisitId"></param>
|
||||
/// <returns></returns>
|
||||
@@ -394,7 +394,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
{
|
||||
SubjectVisitId = subjectVisitId,
|
||||
UserTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt,
|
||||
TalkContent = "CRC申请回退"
|
||||
TalkContent = "IC申请回退"
|
||||
});
|
||||
|
||||
|
||||
@@ -406,7 +406,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
}
|
||||
else
|
||||
{
|
||||
return ResponseOutput.NotOk("其他CRC已申请处理,请刷新页面");
|
||||
return ResponseOutput.NotOk("其他IC已申请处理,请刷新页面");
|
||||
}
|
||||
|
||||
|
||||
@@ -748,7 +748,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
if (await _subjectVisitRepository.AnyAsync(t => t.Id == subjectVisitId && t.SubmitState == SubmitStateEnum.Submitted &&
|
||||
(!t.QCChallengeList.Any(u => u.ReuploadEnum == QCChanllengeReuploadEnum.QCAgreeUpload))))
|
||||
{
|
||||
return ResponseOutput.NotOk("CRC已经提交,不允许删除。");
|
||||
return ResponseOutput.NotOk("IC已经提交,不允许删除。");
|
||||
}
|
||||
var waitDeleteStudyList = await _dicomStudyRepository.Where(x => ids.Contains(x.Id)).ToListAsync();
|
||||
|
||||
@@ -1090,7 +1090,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CRC RequestToQC 批量提交 [需要签名 不需要对]
|
||||
/// IC RequestToQC 批量提交 [需要签名 不需要对]
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
@@ -1125,11 +1125,11 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
//单个提交提示信息
|
||||
if (dbSubjectVisitList.Count() == 1 && dbSubjectVisitList.First().SubmitState == SubmitStateEnum.Submitted)
|
||||
{
|
||||
return ResponseOutput.NotOk("当前检查批次的影像数据,已经由其他CRC提交。", 3, ApiResponseCodeEnum.NeedTips);
|
||||
return ResponseOutput.NotOk("当前检查批次的影像数据,已经由其他IC提交。", 3, ApiResponseCodeEnum.NeedTips);
|
||||
}
|
||||
else if (dbSubjectVisitList.Any(t => t.SubmitState == SubmitStateEnum.Submitted))
|
||||
{
|
||||
return ResponseOutput.NotOk("当前批量提交检查批次的影像数据,其中部分已由其他CRC提交。", 3, ApiResponseCodeEnum.NeedTips);
|
||||
return ResponseOutput.NotOk("当前批量提交检查批次的影像数据,其中部分已由其他IC提交。", 3, ApiResponseCodeEnum.NeedTips);
|
||||
}
|
||||
|
||||
//获取确认的临床数据配置
|
||||
@@ -1150,13 +1150,13 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
{
|
||||
|
||||
|
||||
////找到需要确认的PDF 临床数据 如果没有CRC 没有上传 那么就添加一条没有文件的记录
|
||||
////找到需要确认的PDF 临床数据 如果没有IC 没有上传 那么就添加一条没有文件的记录
|
||||
|
||||
//var crcNeedConfirmClinicalDataSetList = clinicalDataConfirmList.Where(t => t.UploadRole == UploadRole.CRC && t.ClinicalUploadType == ClinicalUploadType.PDF).ToList();
|
||||
//var crcNeedConfirmClinicalDataSetList = clinicalDataConfirmList.Where(t => t.UploadRole == UploadRole.IC && t.ClinicalUploadType == ClinicalUploadType.PDF).ToList();
|
||||
|
||||
//// 找到CRC 已经自己添加的临床PDF数据文件
|
||||
//// 找到IC 已经自己添加的临床PDF数据文件
|
||||
|
||||
//var crcAddClinicalDataIdList = _readingClinicalDataRepository.Where(t => t.ReadingId == dbSubjectVisit.Id && t.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && t.ClinicalDataTrialSet.ClinicalUploadType == ClinicalUploadType.PDF)
|
||||
//var crcAddClinicalDataIdList = _readingClinicalDataRepository.Where(t => t.ReadingId == dbSubjectVisit.Id && t.ClinicalDataTrialSet.UploadRole == UploadRole.IC && t.ClinicalDataTrialSet.ClinicalUploadType == ClinicalUploadType.PDF)
|
||||
// .Select(t => new { t.ClinicalDataTrialSetId }).ToList();
|
||||
|
||||
//foreach (var crcNeedConfirmClinicalDataSet in crcNeedConfirmClinicalDataSetList)
|
||||
@@ -1181,9 +1181,9 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
dbSubjectVisit.IsConfirmedClinicalData = true;
|
||||
|
||||
|
||||
// CRC 上传的基线数据签名
|
||||
// IC 上传的基线数据签名
|
||||
|
||||
await _readingClinicalDataRepository.UpdatePartialFromQueryAsync(x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC && x.ReadingId == dbSubjectVisit.Id && x.IsSign==false, x => new ReadingClinicalData()
|
||||
await _readingClinicalDataRepository.UpdatePartialFromQueryAsync(x => x.ClinicalDataTrialSet.UploadRole == UploadRole.IC && x.ReadingId == dbSubjectVisit.Id && x.IsSign==false, x => new ReadingClinicalData()
|
||||
{
|
||||
IsSign = true,
|
||||
ReadingClinicalDataState = ReadingClinicalDataStatus.HaveSigned
|
||||
@@ -1682,13 +1682,13 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
if (qcChallenge.ReuploadEnum != QCChanllengeReuploadEnum.CRCRequestReupload)
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前重传状态不为CRC申请重传,不允许设置同意重传");
|
||||
throw new BusinessValidationFailedException("当前重传状态不为IC申请重传,不允许设置同意重传");
|
||||
}
|
||||
|
||||
|
||||
if (await _qcChallengeRepository.CountAsync(t => t.ReuploadEnum == QCChanllengeReuploadEnum.QCAgreeUpload && t.SubjectVisitId == qcChallenge.SubjectVisitId && t.IsClosed == false) >= 1)
|
||||
{
|
||||
return ResponseOutput.NotOk("当前检查批次,有一个未关闭的质疑 QC设置了同意重传,CRC还未完成上传,当前不允许再次设置");
|
||||
return ResponseOutput.NotOk("当前检查批次,有一个未关闭的质疑 QC设置了同意重传,IC还未完成上传,当前不允许再次设置");
|
||||
}
|
||||
|
||||
|
||||
@@ -1751,7 +1751,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// CRC 设置已经重传完成 [需要签名 不需要对]
|
||||
/// IC 设置已经重传完成 [需要签名 不需要对]
|
||||
/// </summary>
|
||||
|
||||
/// <returns></returns>
|
||||
@@ -1807,7 +1807,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
QCChallengeId = qcChallenge.Id,
|
||||
|
||||
TalkContent = "CRC已重传完成"
|
||||
TalkContent = "IC已重传完成"
|
||||
});
|
||||
|
||||
|
||||
@@ -1838,7 +1838,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
|
||||
if (qcChallenge.ReuploadEnum != QCChanllengeReuploadEnum.None && qcChallenge.ReuploadEnum != QCChanllengeReuploadEnum.CRCReuploaded)
|
||||
{
|
||||
throw new BusinessValidationFailedException("当前质疑重传状态不为初始状态|CRC重传完成状态,不允许申请重传");
|
||||
throw new BusinessValidationFailedException("当前质疑重传状态不为初始状态|IC重传完成状态,不允许申请重传");
|
||||
}
|
||||
|
||||
|
||||
@@ -1856,7 +1856,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||
SubjectVisitId = qcChallenge.SubjectVisitId,
|
||||
UserTypeEnum = (UserTypeEnum)_userInfo.UserTypeEnumInt,
|
||||
QCChallengeId = qcChallenge.Id,
|
||||
TalkContent = "CRC申请重传/上传影像"
|
||||
TalkContent = "IC申请重传/上传影像"
|
||||
});
|
||||
|
||||
var isSuccess = await _qcChallengeRepository.SaveChangesAsync();
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.SubmitUserName, u => u.MapFrom(s => s.SubmitUser.FullName))
|
||||
|
||||
.ForMember(d => d.IsHaveClinicalData, u => u.MapFrom(t => t.IsBaseLine ? t.PreviousHistoryList.Any() || t.PreviousOtherList.Any()
|
||||
|| t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.CRC && x.ReadingClinicalDataPDFList.Count() > 0)
|
||||
|| t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.IC && x.ReadingClinicalDataPDFList.Count() > 0)
|
||||
|| t.PreviousSurgeryList.Any() : false));
|
||||
|
||||
|
||||
@@ -367,12 +367,12 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.PreliminaryAuditUserName, u => u.MapFrom(s => s.PreliminaryAuditUser.UserName))
|
||||
.ForMember(d => d.ReviewAuditUserName, u => u.MapFrom(s => s.ReviewAuditUser.UserName))
|
||||
.ForMember(d => d.IsHaveClinicalData, u => u.MapFrom(t => t.IsBaseLine ? t.PreviousHistoryList.Any() || t.PreviousOtherList.Any()
|
||||
|| t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.CRC && x.ReadingClinicalDataPDFList.Count() > 0)
|
||||
|| t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.IC && x.ReadingClinicalDataPDFList.Count() > 0)
|
||||
|| t.PreviousSurgeryList.Any() : false))
|
||||
.ForMember(d => d.DicomStudyCount, u => u.MapFrom(t => t.StudyList.Count()))
|
||||
.ForMember(d => d.NoneDicomStudyCount, u => u.MapFrom(t => t.NoneDicomStudyList.Count(t => t.NoneDicomFileList.Any())));
|
||||
|
||||
//CRC 上传列表
|
||||
//IC 上传列表
|
||||
CreateMap<SubjectVisit, QCCRCVisitViewModel>()/*.IncludeMembers(t=>t.Subject)*/
|
||||
//.ForMember(d => d.SubjectStatus, u => u.MapFrom(s => s.Subject.Status))
|
||||
//.ForMember(d => d.SubjectCode, u => u.MapFrom(s => s.Subject.Code))
|
||||
@@ -385,7 +385,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.Sex, u => u.MapFrom(s => s.Subject.Sex))
|
||||
.ForMember(d => d.Age, u => u.MapFrom(t => t.Subject.Age))
|
||||
.ForMember(d => d.IsHaveClinicalData, u => u.MapFrom(t => t.IsBaseLine ? t.PreviousHistoryList.Any() || t.PreviousOtherList.Any()
|
||||
|| t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.CRC && x.ReadingClinicalDataPDFList.Count() > 0)
|
||||
|| t.ReadingClinicalDataList.Any(x => x.ClinicalDataTrialSet.UploadRole == Domain.Share.UploadRole.IC && x.ReadingClinicalDataPDFList.Count() > 0)
|
||||
|| t.PreviousSurgeryList.Any() : false))
|
||||
|
||||
//.ForMember(d => d.VisitName, u => u.MapFrom(t =>t.InPlan? t.VisitStage.VisitName : t.VisitName))
|
||||
@@ -495,7 +495,7 @@ namespace IRaCIS.Core.Application.Service
|
||||
.ForMember(d => d.CreateUserName, u => u.MapFrom(t => t.User.FirstName + "/" + t.User.LastName));
|
||||
|
||||
|
||||
//CRC 质疑列表
|
||||
//IC 质疑列表
|
||||
CreateMap<QCChallenge, QCCRCChallengeViewModel>()
|
||||
.ForMember(d => d.PreliminaryAuditUserName, u => u.MapFrom(s => s.SubjectVisit.PreliminaryAuditUser.UserName))
|
||||
.ForMember(d => d.PreliminaryAuditUserId, u => u.MapFrom(s => s.SubjectVisit.PreliminaryAuditUserId))
|
||||
|
||||
+13
-13
@@ -168,10 +168,10 @@ namespace IRaCIS.Application.Services
|
||||
#endregion
|
||||
|
||||
|
||||
#region 临床数据CRC 相关
|
||||
#region 临床数据IC 相关
|
||||
|
||||
/// <summary>
|
||||
/// 获取CRC上传的文件
|
||||
/// 获取IC上传的文件
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
@@ -187,7 +187,7 @@ namespace IRaCIS.Application.Services
|
||||
List<GetCRCClinicalDataOutDto> cRCClinicalDataList = await _readingClinicalDataRepository.Where(x => x.ReadingId == inDto.SubjectVisitId)
|
||||
.WhereIf(inDto.IsBaseline, x => x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject || x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.SubjectVisit)
|
||||
.WhereIf(!inDto.IsBaseline, x => x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.SubjectVisit)
|
||||
.Where(x => x.ClinicalDataTrialSet.TrialId == inDto.TrialId && x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC)
|
||||
.Where(x => x.ClinicalDataTrialSet.TrialId == inDto.TrialId && x.ClinicalDataTrialSet.UploadRole == UploadRole.IC)
|
||||
.Select(x => new GetCRCClinicalDataOutDto()
|
||||
{
|
||||
Id = x.Id,
|
||||
@@ -235,12 +235,12 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 添加CRC数据类型
|
||||
/// 添加IC数据类型
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private async Task AddCRCClinicalData(GetCRCClinicalDataInDto inDto)
|
||||
{
|
||||
var cRCClinicalDataIds = await _clinicalDataTrialSetRepository.Where(x => x.TrialId == inDto.TrialId && x.UploadRole == UploadRole.CRC && x.IsConfirm)
|
||||
var cRCClinicalDataIds = await _clinicalDataTrialSetRepository.Where(x => x.TrialId == inDto.TrialId && x.UploadRole == UploadRole.IC && x.IsConfirm)
|
||||
.WhereIf(inDto.IsBaseline, x => x.ClinicalDataLevel == ClinicalLevel.Subject || x.ClinicalDataLevel == ClinicalLevel.SubjectVisit)
|
||||
.WhereIf(!inDto.IsBaseline, x => x.ClinicalDataLevel == ClinicalLevel.SubjectVisit)
|
||||
.Select(x => x.Id).ToListAsync();
|
||||
@@ -325,7 +325,7 @@ namespace IRaCIS.Application.Services
|
||||
//判断是否基线
|
||||
if (isBaseLine)
|
||||
{
|
||||
//CRC 的自动签名 不用管 只用处理PM 的就好
|
||||
//IC 的自动签名 不用管 只用处理PM 的就好
|
||||
needSignCount = trialClinicalDataSetList.Where(t => t.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCritrialId) && (t.ClinicalDataLevel == ClinicalLevel.Subject || t.ClinicalDataLevel == ClinicalLevel.SubjectVisit) && t.UploadRole == UploadRole.PM).Count();
|
||||
}
|
||||
else
|
||||
@@ -333,7 +333,7 @@ namespace IRaCIS.Application.Services
|
||||
needSignCount = trialClinicalDataSetList.Where(t => t.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCritrialId) && t.ClinicalDataLevel == ClinicalLevel.SubjectVisit && t.UploadRole == UploadRole.PM).Count();
|
||||
}
|
||||
|
||||
//可能仅仅CRC 基线 没有PM
|
||||
//可能仅仅IC 基线 没有PM
|
||||
if (needSignCount == haveSignedCount /*&& needSignCount != 0*/)
|
||||
{
|
||||
|
||||
@@ -363,7 +363,7 @@ namespace IRaCIS.Application.Services
|
||||
needSignCount = trialClinicalDataSetList.Where(t => t.TrialClinicalDataSetCriteriaList.Any(c => c.TrialReadingCriterionId == trialReadingCritrialId) && t.ClinicalDataLevel == ClinicalLevel.OncologyRead).Count();
|
||||
}
|
||||
|
||||
//可能仅仅CRC 基线 没有PM
|
||||
//可能仅仅IC 基线 没有PM
|
||||
if (needSignCount == haveSignedCount /*&& needSignCount != 0*/)
|
||||
{
|
||||
//将该标准 该subject 该阅片期|肿瘤学 任务临床数据状态变更
|
||||
@@ -577,7 +577,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.IQC)
|
||||
{
|
||||
inDto.UploadRole = UploadRole.CRC;
|
||||
inDto.UploadRole = UploadRole.IC;
|
||||
}
|
||||
var isBaseLine = await _subjectVisitRepository.AnyAsync(x => x.Id == inDto.ReadingId && x.IsBaseLine);
|
||||
|
||||
@@ -633,7 +633,7 @@ namespace IRaCIS.Application.Services
|
||||
TrialClinicalDataSetCriteriaList=x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList,
|
||||
Id = x.Id,
|
||||
UploadRole = x.ClinicalDataTrialSet.UploadRole,
|
||||
IsCRCUpload = x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC,
|
||||
IsCRCUpload = x.ClinicalDataTrialSet.UploadRole == UploadRole.IC,
|
||||
FileList = x.ReadingClinicalDataPDFList.Select(y => new GetFileDto()
|
||||
{
|
||||
Id = y.Id,
|
||||
@@ -686,7 +686,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
var resultQuery = _readingClinicalDataRepository.Where(x => x.SubjectId == inDto.SubjectId)
|
||||
.Where(x => x.ReadingId == inDto.ReadingId || (x.SubjectId == inDto.SubjectId && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject))
|
||||
//.WhereIf(inDto.UploadRole == UploadRole.CRC, x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC)
|
||||
//.WhereIf(inDto.UploadRole == UploadRole.IC, x => x.ClinicalDataTrialSet.UploadRole == UploadRole.IC)
|
||||
|
||||
.Where(x => x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(t=>t.TrialReadingCriterionId==inDto.TrialReadingCriterionId))
|
||||
.Select(x => new GetReadingClinicalDataListOutDto()
|
||||
@@ -700,7 +700,7 @@ namespace IRaCIS.Application.Services
|
||||
ClinicalUploadType = x.ClinicalDataTrialSet.ClinicalUploadType,
|
||||
Id = x.Id,
|
||||
UploadRole = x.ClinicalDataTrialSet.UploadRole,
|
||||
IsCRCUpload = x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC,
|
||||
IsCRCUpload = x.ClinicalDataTrialSet.UploadRole == UploadRole.IC,
|
||||
IsBlind = x.IsBlind,
|
||||
IsComplete = x.IsComplete,
|
||||
FileCount = x.FileCount,
|
||||
@@ -717,7 +717,7 @@ namespace IRaCIS.Application.Services
|
||||
});
|
||||
|
||||
var result = await resultQuery.ToListAsync();
|
||||
//result = result.Where(x => !(x.UploadRole == UploadRole.CRC && x.ClinicalUploadType == ClinicalUploadType.PDF && x.FileList.Count() == 0)).ToList();
|
||||
//result = result.Where(x => !(x.UploadRole == UploadRole.IC && x.ClinicalUploadType == ClinicalUploadType.PDF && x.FileList.Count() == 0)).ToList();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -349,7 +349,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
public string ClinicalUploadTypeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否为CRC上传
|
||||
/// 是否为IC上传
|
||||
/// </summary>
|
||||
public bool IsCRCUpload { get; set; }
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
|
||||
|
||||
/// <summary> Setting页面 为 site 勾选CRC用户列表</summary>
|
||||
/// <summary> Setting页面 为 site 勾选IC用户列表</summary>
|
||||
[HttpPost]
|
||||
public async Task<PageOutput<AssginSiteCRCListDTO>> GetSiteCRCScreeningList(SiteCRCQuery param)
|
||||
{
|
||||
@@ -187,7 +187,7 @@ namespace IRaCIS.Application.Services
|
||||
#endregion
|
||||
|
||||
|
||||
#region 自动添加CRC 到Site 里
|
||||
#region 自动添加IC 到Site 里
|
||||
if (await _repository.AnyAsync<User>(t => t.Id == item.UserId && t.UserTypeRole.UserTypeEnum == UserTypeEnum.ClinicalResearchCoordinator))
|
||||
{
|
||||
await _repository.AddAsync(new TrialSiteUser() { TrialId = trialId, SiteId = Guid.Parse("db83e2f5-1f2e-408f-a45b-08d8e1dcace0"), UserId =item.UserId });
|
||||
|
||||
@@ -177,7 +177,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
}
|
||||
|
||||
|
||||
/// <summary>获取某一Site下面的负责的CRC列表</summary>
|
||||
/// <summary>获取某一Site下面的负责的IC列表</summary>
|
||||
[HttpGet, Route("{trialId:guid}/{siteId:guid}")]
|
||||
public async Task<List<UserTrialDTO>> GetTrialSiteCRCList(Guid trialId, Guid siteId)
|
||||
{
|
||||
@@ -250,7 +250,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
|
||||
//if (await _repository.AnyAsync<TrialSiteUser>(t => t.TrialId == trialId && t.SiteId == siteId))
|
||||
//{
|
||||
// return ResponseOutput.NotOk("The site has been associated with CRC, and couldn't be deleted.");
|
||||
// return ResponseOutput.NotOk("The site has been associated with IC, and couldn't be deleted.");
|
||||
//}
|
||||
|
||||
if (await _repository.AnyAsync<Subject>(t => t.SiteId == siteId && t.TrialId == trialId))
|
||||
@@ -284,7 +284,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
|
||||
|
||||
|
||||
/// <summary> 批量添加Site下 CRC的负责人 </summary>
|
||||
/// <summary> 批量添加Site下 IC的负责人 </summary>
|
||||
[HttpPost]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
@@ -298,7 +298,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
return ResponseOutput.Result(true);
|
||||
}
|
||||
|
||||
/// <summary> 删除CRC人员</summary>
|
||||
/// <summary> 删除IC人员</summary>
|
||||
[HttpDelete, Route("{id:guid}/{trialId:guid}/{isDelete:bool}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter), Arguments = new object[] { "AfterStopCannNotOpt" })]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM)]
|
||||
@@ -312,14 +312,14 @@ namespace IRaCIS.Core.Application.Services
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目下的 site 下拉框数据 CRC只看到他负责的
|
||||
/// 获取项目下的 site 下拉框数据 IC只看到他负责的
|
||||
/// </summary>
|
||||
/// <param name="trialId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("{trialId:guid}")]
|
||||
public async Task<IEnumerable<TrialSiteForSelect>> GetTrialSiteSelect(Guid trialId)
|
||||
{
|
||||
//CRC只看到他负责的
|
||||
//IC只看到他负责的
|
||||
|
||||
var list = await _trialSiteRepository.Where(t => t.TrialId == trialId)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
@@ -332,7 +332,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
|
||||
public async Task<IEnumerable<string>> GetTrialSiteCodeSelect(Guid trialId, bool isIncludeVirtualSite = true)
|
||||
{
|
||||
//CRC只看到他负责的
|
||||
//IC只看到他负责的
|
||||
|
||||
var list = await _trialSiteRepository.Where(t => t.TrialId == trialId)
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
@@ -360,7 +360,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
|
||||
if (await _repository.AnyAsync<TrialSiteUser>(t => t.TrialId == trialId && t.SiteId == siteId))
|
||||
{
|
||||
return ResponseOutput.NotOk("The site has been associated with CRC, and couldn't be deleted.");
|
||||
return ResponseOutput.NotOk("The site has been associated with IC, and couldn't be deleted.");
|
||||
}
|
||||
|
||||
if (await _repository.AnyAsync<Subject>(t => t.SiteId == siteId && t.TrialId == trialId))
|
||||
|
||||
@@ -117,7 +117,7 @@ namespace IRaCIS.Application.Services
|
||||
.WhereIf(!string.IsNullOrWhiteSpace(param.Sex), t => t.Sex.Contains(param.Sex))
|
||||
.WhereIf(param.Status != null, t => t.Status == param.Status)
|
||||
.WhereIf(param.SiteId != null, t => t.SiteId == param.SiteId)
|
||||
// CRC 只负责他管理site的患者
|
||||
// IC 只负责他管理site的患者
|
||||
.WhereIf(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ClinicalResearchCoordinator || _userInfo.UserTypeEnumInt == (int)UserTypeEnum.CRA, t => t.TrialSite.CRCUserList.Any(t => t.UserId == _userInfo.Id))
|
||||
.ProjectTo<SubjectQueryView>(_mapper.ConfigurationProvider);
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ namespace IRaCIS.Core.Application.Services
|
||||
|
||||
dbBeforeEntity = await _subjectVisitRepository.InsertFromDTOAsync(svCommand, false, verifyExp1, verifyExp2, verifyExp3);
|
||||
|
||||
//var cRCClinicalDataIds = await _clinicalDataTrialSetRepository.Where(x => x.TrialId == svCommand.TrialId && x.UploadRole == UploadRole.CRC && x.IsConfirm && x.ClinicalDataLevel == ClinicalLevel.SubjectVisit)
|
||||
//var cRCClinicalDataIds = await _clinicalDataTrialSetRepository.Where(x => x.TrialId == svCommand.TrialId && x.UploadRole == UploadRole.IC && x.IsConfirm && x.ClinicalDataLevel == ClinicalLevel.SubjectVisit)
|
||||
|
||||
//.Select(x => x.Id).ToListAsync();
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ namespace IRaCIS.Core.Application.Triggers
|
||||
// 触发临床数据
|
||||
if (context.ChangeType == ChangeType.Added)
|
||||
{
|
||||
var cRCClinicalDatas = await _clinicalDataTrialSetRepository.Where(x => x.TrialId == context.Entity.TrialId && x.UploadRole == UploadRole.CRC && x.IsConfirm)
|
||||
var cRCClinicalDatas = await _clinicalDataTrialSetRepository.Where(x => x.TrialId == context.Entity.TrialId && x.UploadRole == UploadRole.IC && x.IsConfirm)
|
||||
|
||||
.Select(x => new
|
||||
{
|
||||
|
||||
@@ -228,7 +228,7 @@ namespace IRaCIS.Core.Application.MediatR.Handlers
|
||||
dbSV.CheckState = CheckStateEnum.CVIng;
|
||||
dbSV.CheckChallengeState = CheckChanllengeTypeEnum.PMWaitCRCReply;
|
||||
|
||||
//讲核查结果发送消息给CRC
|
||||
//讲核查结果发送消息给IC
|
||||
dbSV.CheckChallengeDialogList.Add(new CheckChallengeDialog()
|
||||
{
|
||||
SubjectVisitId = subjectVisitId,
|
||||
|
||||
Reference in New Issue
Block a user