diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs index 7aed50550..faa794da4 100644 --- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs @@ -162,7 +162,8 @@ namespace IRaCIS.Core.Application.Service.Inspection }; query = query.WhereIf(dto.SiteId != null, x => x.SiteId == dto.SiteId) - .Where(x => (x.TrialId == dto.TrialId) || (x.TrialId == null && x.CreateTime >= trialData.CreateTime && x.CreateTime <= trialData.TrialFinishTime)) + //.Where(x => (x.TrialId == dto.TrialId) || (x.TrialId == null && x.CreateTime >= trialData.CreateTime && x.CreateTime <= trialData.TrialFinishTime)) + .Where(x => x.TrialId == dto.TrialId ) #region 废弃 // .WhereIf(dto.BatchId != null && dto.ObjectRelationParentId == null && dto.GeneralId == null, x => x.BatchId == dto.BatchId) @@ -190,7 +191,7 @@ namespace IRaCIS.Core.Application.Service.Inspection .WhereIf(dto.StartTime != null, x => x.CreateTime >= dto.StartTime) .WhereIf(dto.EndTime != null, x => x.CreateTime <= dto.EndTime) .WhereIf(dto.ModuleType != null, x => x.ModuleTypeId == dto.ModuleType) - .WhereIf(!dto.Description.IsNullOrEmpty(), x => x.Description == dto.Description) + .WhereIf(!dto.Description.IsNullOrEmpty(), x => x.Description.Contains(dto.Description)|| x.DescriptionCN.Contains(dto.Description)) .WhereIf(!dto.OpByUserName.IsNullOrEmpty(), x => x.CreateUserName.Contains(dto.OpByUserName)) //.WhereIf(!dto.SubjectInfo.IsNullOrEmpty(), x => x.SubjectCode.Contains(dto.SubjectInfo)) .WhereIf(dto.IsSign != null, x => x.IsSign == dto.IsSign); diff --git a/IRaCIS.Core.Application/Service/Third-partyProject/DTO/UltrasonicDicomViewModel.cs b/IRaCIS.Core.Application/Service/Third-partyProject/DTO/UltrasonicDicomViewModel.cs index 9b76956a4..176a33719 100644 --- a/IRaCIS.Core.Application/Service/Third-partyProject/DTO/UltrasonicDicomViewModel.cs +++ b/IRaCIS.Core.Application/Service/Third-partyProject/DTO/UltrasonicDicomViewModel.cs @@ -70,6 +70,8 @@ namespace IRaCIS.Core.Application.Service.Third_partyProject.DTO public Guid TrialReadingCriterionId { get; set; } public string TrialReadingCriterionName { get; set; } + + public List StudyInstanceUidList { get; set; } } public class UpdateTaskImageStateCommand diff --git a/IRaCIS.Core.Application/Service/Third-partyProject/_MapConfig.cs b/IRaCIS.Core.Application/Service/Third-partyProject/_MapConfig.cs index 8ed74ac65..e9cd0ad3c 100644 --- a/IRaCIS.Core.Application/Service/Third-partyProject/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/Third-partyProject/_MapConfig.cs @@ -24,6 +24,9 @@ namespace IRaCIS.Core.Application.Service .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.TrialReadingCriterionName, t => t.MapFrom(u => u.TrialReadingCriterion.CriterionName)) + .ForMember(o => o.StudyInstanceUidList, t => t.MapFrom(u => u.SourceSubjectVisit.StudyList.Select(t=>t.StudyInstanceUid))) + + ; } } diff --git a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs index 41d14d141..beeff70cb 100644 --- a/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs +++ b/IRaCIS.Core.Infra.EFCore/Common/AuditingData.cs @@ -919,10 +919,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common .Where(t => t.TrialEmailNoticeConfigId == entity.Id).Select(t => new { t.TrialEmailNoticeConfigId, t.EmailUserType, t.UserType }).ToList(); - if (_userInfo.RequestUrl == "TrialEmailNoticeConfig/getTrialEmailNoticeConfigList") - { - extraIdentification = "/Auto"; - } + await InsertInspection(entity, type, x => new InspectionConvertDTO() { @@ -1491,6 +1488,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common } #endregion + #region 中心调研 + + // 中心调研表 foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialSiteSurvey))) { @@ -1532,78 +1532,10 @@ namespace IRaCIS.Core.Infra.EFCore.Common }); } + #endregion - // 既往手术史 - foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(PreviousSurgery))) - { - var type = GetEntityAuditOpt(item); - var entity = item.Entity as PreviousSurgery; - - await InsertInspection(entity, type, x => new InspectionConvertDTO() - { - IsDistinctionInterface = false, - - SubjectVisitId = x.SubjectVisitId, - - ObjectRelationParentId = x.SubjectVisitId, - - ObjectRelationParentId2 = x.ClinicalDataTrialSetId, - - }, new - { - Type = ClinicalFileType.PreviousSurgery - }); - } - - // 既往放疗史 - foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(PreviousHistory))) - { - - var type = GetEntityAuditOpt(item); - - var entity = item.Entity as PreviousHistory; - - await InsertInspection(entity, type, x => new InspectionConvertDTO() - { - - - IsDistinctionInterface = false, - - SubjectVisitId = x.SubjectVisitId, - - ObjectRelationParentId2 = x.ClinicalDataTrialSetId, - - ObjectRelationParentId = x.SubjectVisitId, - }, new - { - Type = ClinicalFileType.PreviousHistory - }); - } - - // 其他治疗史 - foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(PreviousOther))) - { - var type = GetEntityAuditOpt(item); - - var entity = item.Entity as PreviousOther; - - await InsertInspection(entity, type, x => new InspectionConvertDTO() - { - - IsDistinctionInterface = false, - - SubjectVisitId = x.SubjectVisitId, - - ObjectRelationParentId2 = x.ClinicalDataTrialSetId, - - ObjectRelationParentId = x.SubjectVisitId, - }, new - { - Type = ClinicalFileType.PreviousOther - }); - } //系统 Qc 问题 foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(QCQuestion))) @@ -1691,6 +1623,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common } + #region 项目参与人员 项目site + + // 项目中心 Site未稽查 foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(TrialSite))) @@ -1760,6 +1695,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common }); } + #endregion // 受试者 foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(Subject))) @@ -1902,6 +1838,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common ); } + #region Dicom 非Dicom 既往手术史..临床数据 + // Dicom foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(DicomStudy))) { @@ -1952,6 +1890,78 @@ namespace IRaCIS.Core.Infra.EFCore.Common }); } + // 既往手术史 + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(PreviousSurgery))) + { + var type = GetEntityAuditOpt(item); + + var entity = item.Entity as PreviousSurgery; + + await InsertInspection(entity, type, x => new InspectionConvertDTO() + { + IsDistinctionInterface = false, + + SubjectVisitId = x.SubjectVisitId, + + ObjectRelationParentId = x.SubjectVisitId, + + ObjectRelationParentId2 = x.ClinicalDataTrialSetId, + + }, new + { + Type = ClinicalFileType.PreviousSurgery + }); + } + + // 既往放疗史 + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(PreviousHistory))) + { + + var type = GetEntityAuditOpt(item); + + var entity = item.Entity as PreviousHistory; + + await InsertInspection(entity, type, x => new InspectionConvertDTO() + { + + + IsDistinctionInterface = false, + + SubjectVisitId = x.SubjectVisitId, + + ObjectRelationParentId2 = x.ClinicalDataTrialSetId, + + ObjectRelationParentId = x.SubjectVisitId, + }, new + { + Type = ClinicalFileType.PreviousHistory + }); + } + + // 其他治疗史 + foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(PreviousOther))) + { + var type = GetEntityAuditOpt(item); + + var entity = item.Entity as PreviousOther; + + await InsertInspection(entity, type, x => new InspectionConvertDTO() + { + + IsDistinctionInterface = false, + + SubjectVisitId = x.SubjectVisitId, + + ObjectRelationParentId2 = x.ClinicalDataTrialSetId, + + ObjectRelationParentId = x.SubjectVisitId, + }, new + { + Type = ClinicalFileType.PreviousOther + }); + } + + #endregion #region 阅片人入组