From 76965111fea1af33b3db8d40d3800e19a1e9c402 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 6 Jun 2023 10:10:49 +0800 Subject: [PATCH 1/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=20=E5=8D=95=E9=80=89=E5=8F=98=E4=B8=BA?= =?UTF-8?q?=E5=A4=9A=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Doctor/DoctorListService.cs | 7 ++-- .../Service/Financial/DTO/PaymentModel.cs | 2 +- .../Service/Financial/FinancialService.cs | 20 +++++---- .../Service/Stat/DTO/StatisticsViewModel.cs | 3 +- .../TrialSiteUser/DTO/TrialViewModel.cs | 28 ++++++++++--- .../Service/TrialSiteUser/TrialService.cs | 31 +++++++++++++- .../Service/TrialSiteUser/_MapConfig.cs | 2 +- .../Trial/TrialExpedited.cs | 11 +++++ IRaCIS.Core.Domain/SQLFile/20230606号.sql | 30 +++++++++++++ IRaCIS.Core.Domain/Trial/Trial.cs | 42 +++++++++++++++---- 10 files changed, 146 insertions(+), 30 deletions(-) create mode 100644 IRaCIS.Core.Domain/SQLFile/20230606号.sql diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs index ae38017c0..deb966060 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs @@ -67,9 +67,9 @@ namespace IRaCIS.Application.Services ReviewerSelectionQueryDTO selectionQuery) { //项目配置需要的医生过滤 2表示混合 - var trialConfig = await _repository.Where(s => s.Id == selectionQuery.TrialId).Select(t=>new { t.AttendedReviewerType ,t.TrialType} ).FirstOrDefaultAsync().IfNullThrowException(); + var trialConfig = await _repository.Where(s => s.Id == selectionQuery.TrialId).Select(t=>new { t.AttendedReviewerTypeEnumList ,t.TrialType} ).FirstOrDefaultAsync().IfNullThrowException(); - var nation = trialConfig.AttendedReviewerType; + //var nation = trialConfig.AttendedReviewerType; // 临床项目经验 多选 var evaluationCriteriaCount = selectionQuery.EvaluationCriteriaIdList.Count(); @@ -78,7 +78,8 @@ namespace IRaCIS.Application.Services var guidList = selectionQuery.ReadingTypeIdList.Concat(selectionQuery.SubspecialityIdList).Concat(selectionQuery.TitleIdList); - var query = _doctorRepository.WhereIf(nation != AttendedReviewerType.USAndCN, t => t.Nation ==(int) nation) + var query = _doctorRepository/*.WhereIf(nation != AttendedReviewerType.USAndCN, t => t.Nation ==(int) nation)*/ + .WhereIf(selectionQuery.DepartmentId != null, t => t.DepartmentId == selectionQuery.DepartmentId) .WhereIf(selectionQuery.SpecialityId != null, t => t.SpecialityId == selectionQuery.SpecialityId) .WhereIf(trialConfig.TrialType == TrialType.NoneOfficial, t => t.IsVirtual ==true) diff --git a/IRaCIS.Core.Application/Service/Financial/DTO/PaymentModel.cs b/IRaCIS.Core.Application/Service/Financial/DTO/PaymentModel.cs index af3648915..3b70b23fd 100644 --- a/IRaCIS.Core.Application/Service/Financial/DTO/PaymentModel.cs +++ b/IRaCIS.Core.Application/Service/Financial/DTO/PaymentModel.cs @@ -174,6 +174,6 @@ namespace IRaCIS.Application.Contracts public DateTime BeginDate { get; set; } public DateTime EndDate { get; set; } - public AttendedReviewerType? AttendedReviewerType { get; set; } + //public AttendedReviewerType? AttendedReviewerType { get; set; } } } \ No newline at end of file diff --git a/IRaCIS.Core.Application/Service/Financial/FinancialService.cs b/IRaCIS.Core.Application/Service/Financial/FinancialService.cs index d47b6a4f4..7ddd39012 100644 --- a/IRaCIS.Core.Application/Service/Financial/FinancialService.cs +++ b/IRaCIS.Core.Application/Service/Financial/FinancialService.cs @@ -552,10 +552,12 @@ namespace IRaCIS.Application.Services trialLambda = trialLambda.And(u => u.TrialCode.Contains(trialCode)); } - if (queryParam.AttendedReviewerType != null) - { - trialLambda = trialLambda.And(u => u.AttendedReviewerType == queryParam.AttendedReviewerType); - } + //if (queryParam.AttendedReviewerType != null) + //{ + // trialLambda = trialLambda.And(u => u.AttendedReviewerType == queryParam.AttendedReviewerType); + //} + + Expression> doctorLambda = x => true; @@ -936,15 +938,17 @@ namespace IRaCIS.Application.Services { trialLambda = trialLambda.And(u => u.CROId == param.CroId); } + if (!string.IsNullOrWhiteSpace(param.TrialCode)) { var trialCode = param.TrialCode.Trim(); trialLambda = trialLambda.And(u => u.TrialCode.Contains(trialCode)); } - if (param.AttendedReviewerType != null) - { - trialLambda = trialLambda.And(u => u.AttendedReviewerType == param.AttendedReviewerType); - } + + //if (param.AttendedReviewerType != null) + //{ + // trialLambda = trialLambda.And(u => u.AttendedReviewerType == param.AttendedReviewerType); + //} var lockedPaymentIdAndYearMonth = _paymentRepository.Where(t => t.IsLock && t.YearMonthDate >= bDate && t.YearMonthDate <= eDate).Select(t => new { PaymentId = t.Id, t.YearMonth, t.DoctorId }); diff --git a/IRaCIS.Core.Application/Service/Stat/DTO/StatisticsViewModel.cs b/IRaCIS.Core.Application/Service/Stat/DTO/StatisticsViewModel.cs index a08ddc969..b94104803 100644 --- a/IRaCIS.Core.Application/Service/Stat/DTO/StatisticsViewModel.cs +++ b/IRaCIS.Core.Application/Service/Stat/DTO/StatisticsViewModel.cs @@ -148,7 +148,8 @@ namespace IRaCIS.Application.Contracts //医生付费类型 CN US public int? Nation { get; set; } - public AttendedReviewerType? AttendedReviewerType { get; set; } + + //public AttendedReviewerType? AttendedReviewerType { get; set; } } public class StatisticsWorkloadQueryParam : PageInput diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs index 66397ab3e..3c2ccfcc2 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs @@ -1,6 +1,7 @@ using IRaCIS.Core.Infrastructure.Extention; using IRaCIS.Core.Domain.Share; using Newtonsoft.Json; +using System.ComponentModel.DataAnnotations.Schema; namespace IRaCIS.Application.Contracts { @@ -30,7 +31,7 @@ namespace IRaCIS.Application.Contracts public int? GRRReviewers { get; set; } public int TotalReviewers { get; set; } public int? Expedited { get; set; } - public int? AttendedReviewerType { get; set; } + //研究方案号 public string ResearchProgramNo { get; set; } = string.Empty; @@ -44,12 +45,22 @@ namespace IRaCIS.Application.Contracts // 负责人PI public string HeadPI { get; set; } = string.Empty; - public Guid DeclarationTypeId { get; set; } + //public Guid DeclarationTypeId { get; set; } + //public int? AttendedReviewerType { get; set; } public Guid IndicationTypeId { get; set; } public Guid? PhaseId { get; set; } + public string DeclarationTypeOther { get; set; } + public List DeclarationTypeEnumList { get; set; } + + public List AttendedReviewerTypeEnumList { get; set; } + public string DeclarationTypes { get; set; } + public string AttendedReviewerTypes { get; set; } + public string AttendedReviewerTypeOther { get; set; } + + } @@ -116,7 +127,7 @@ namespace IRaCIS.Application.Contracts //统计字段 public string Phase { get; set; } = string.Empty; - public string DeclarationType { get; set; } = string.Empty; + public string IndicationType { get; set; } = string.Empty; @@ -140,6 +151,9 @@ namespace IRaCIS.Application.Contracts public bool IsDeleted { get; set; } public bool IsLocked { get; set; } + + + //public string DeclarationType { get; set; } = string.Empty; //public int? SubjectCount { get; set; } //public int? StudyCount { get; set; } = 0; @@ -174,7 +188,11 @@ namespace IRaCIS.Application.Contracts public class TrialQueryDTO : PageInput { - public Guid? DeclarationTypeId { get; set; } + //public Guid? DeclarationTypeId { get; set; } + + public List DeclarationTypeEnumList { get; set; }=new List(); + + public List AttendedReviewerTypeEnumList { get; set; } = new List(); public Guid? IndicationTypeId { get; set; } public Guid? SponsorId { get; set; } @@ -200,7 +218,7 @@ namespace IRaCIS.Application.Contracts public DateTime? BeginDate { get; set; } public DateTime? EndDate { get; set; } public int? Expedited { get; set; } - public AttendedReviewerType? AttendedReviewerType { get; set; } + //public AttendedReviewerType? AttendedReviewerType { get; set; } } public class ReviewerTrialQueryDTO : PageInput diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs index 63cdeb120..b37a547db 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs @@ -9,6 +9,8 @@ using IRaCIS.Core.Infrastructure; using Microsoft.Extensions.Options; using static IRaCIS.Core.Domain.Share.StaticData; using Microsoft.AspNetCore.Authorization; +using System.Linq.Expressions; +using System.Linq; namespace IRaCIS.Application.Services { @@ -49,6 +51,23 @@ namespace IRaCIS.Application.Services var multiCriteriaSelectCount = searchParam.CriterionIds.Count; var multiReviewTypeSelectCount = searchParam.ReviewTypeIds.Count; + Expression> trialDeclarationTypeExpression = x => true; + + + + foreach (var item in searchParam.DeclarationTypeEnumList) + { + trialDeclarationTypeExpression = trialDeclarationTypeExpression.And(t => t.DeclarationTypes.Contains($"|{item}|")); + } + + Expression> trialAttendedReviewerTypeExpression = x => true; + + foreach (var item in searchParam.AttendedReviewerTypeEnumList) + { + trialAttendedReviewerTypeExpression = trialAttendedReviewerTypeExpression.And(t => t.AttendedReviewerTypes.Contains($"|{item}|")); + } + + var query = _trialRepository.AsQueryable().IgnoreQueryFilters() .WhereIf(!string.IsNullOrEmpty(searchParam.TrialStatusStr), o => o.TrialStatusStr.Contains(searchParam.TrialStatusStr)) .WhereIf(searchParam.SponsorId != null, o => o.SponsorId == searchParam.SponsorId) @@ -58,12 +77,17 @@ namespace IRaCIS.Application.Services .WhereIf(!string.IsNullOrEmpty(searchParam.ResearchProgramNo), o => o.ResearchProgramNo.Contains(searchParam.ResearchProgramNo)) .WhereIf(!string.IsNullOrWhiteSpace(searchParam.ExperimentName), o => o.ExperimentName.Contains(searchParam.ExperimentName)) .WhereIf(searchParam.PhaseId != null, o => o.PhaseId == searchParam.PhaseId) - .WhereIf(searchParam.DeclarationTypeId != null, o => o.DeclarationTypeId == searchParam.DeclarationTypeId) + + .WhereIf(searchParam.DeclarationTypeEnumList.Count>0 , trialDeclarationTypeExpression) + .WhereIf(searchParam.AttendedReviewerTypeEnumList.Count > 0, trialAttendedReviewerTypeExpression) + + //.WhereIf(searchParam.AttendedReviewerType != null, o => o.AttendedReviewerType == searchParam.AttendedReviewerType) + .WhereIf(searchParam.IndicationTypeId != null, o => o.IndicationTypeId == searchParam.IndicationTypeId) .WhereIf(searchParam.CROId != null, o => o.CROId == searchParam.CROId) .WhereIf(searchParam.BeginDate != null, o => o.CreateTime >= searchParam.BeginDate) .WhereIf(searchParam.EndDate != null, o => o.CreateTime <= searchParam.EndDate) - .WhereIf(searchParam.AttendedReviewerType != null, o => o.AttendedReviewerType == searchParam.AttendedReviewerType) + .WhereIf(multiModalityIdSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.Modality) == multiModalityIdSelectCount) .WhereIf(multiCriteriaSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.Criterion) == multiCriteriaSelectCount) .WhereIf(multiReviewTypeSelectCount > 0, t => t.TrialDicList.Count(t => t.KeyName == StaticData.ReviewType) == multiReviewTypeSelectCount) @@ -171,6 +195,9 @@ namespace IRaCIS.Application.Services trial.TrialCode = (trial.TrialType == TrialType.NoneOfficial ? "T0" : yearStr.Substring(yearStr.Length - 2)) + trial.TrialCode + currentYearMaxCodeNext.ToString("D3"); + trial.DeclarationTypes = $"|{string.Join('|', trialAddModel.DeclarationTypeEnumList)}|"; + trial.AttendedReviewerTypes = $"|{string.Join('|', trialAddModel.AttendedReviewerTypes)}|"; + //多选信息 trialAddModel.ModalityIds.ForEach(modalityId => trial.TrialDicList.Add(new TrialDictionary() { DictionaryId = modalityId, KeyName = StaticData.Modality, TrialId = trial.Id })); trialAddModel.CriterionIds.ForEach(criterionId => trial.TrialDicList.Add(new TrialDictionary() { DictionaryId = criterionId, KeyName = StaticData.Criterion, TrialId = trial.Id })); diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs index 4ec110bde..0801003c1 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/_MapConfig.cs @@ -70,7 +70,7 @@ namespace IRaCIS.Core.Application.Service //.ForMember(d => d.Code, u => u.MapFrom(s => s.TrialCode)) .ForMember(d => d.Sponsor, u => u.MapFrom(s => s.Sponsor.SponsorName)) .ForMember(d => d.Phase, u => u.MapFrom(s => s.Phase.MappedValue)) - .ForMember(d => d.DeclarationType, u => u.MapFrom(s => s.DeclarationType.MappedValue)) + //.ForMember(d => d.DeclarationType, u => u.MapFrom(s => s.DeclarationType.MappedValue)) .ForMember(d => d.IndicationType, u => u.MapFrom(s => s.IndicationType.MappedValue)) .ForMember(d => d.CRO, u => u.MapFrom(s => s.CRO.CROName)) .ForMember(d => d.ReviewMode, u => u.MapFrom(s => s.ReviewMode.MappedValue)) diff --git a/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs b/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs index beb621e46..292b25a77 100644 --- a/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs +++ b/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs @@ -35,4 +35,15 @@ USAndCN=2, } + + public enum DeclarationType + { + Other=-1, + + US=0, + + CN=1, + EU=2, + JP=3 + } } \ No newline at end of file diff --git a/IRaCIS.Core.Domain/SQLFile/20230606号.sql b/IRaCIS.Core.Domain/SQLFile/20230606号.sql new file mode 100644 index 000000000..603aa7f8d --- /dev/null +++ b/IRaCIS.Core.Domain/SQLFile/20230606号.sql @@ -0,0 +1,30 @@ + +--新增字段 +ALTER TABLE [dbo].[Trial] ADD [AttendedReviewerTypeOther] varchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT '' NOT NULL +GO + +ALTER TABLE [dbo].[Trial] ADD [AttendedReviewerTypes] varchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT '' NOT NULL +GO + +ALTER TABLE [dbo].[Trial] ADD [DeclarationTypeOther] varchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT '' NOT NULL +GO + +ALTER TABLE [dbo].[Trial] ADD [DeclarationTypes] varchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT '' NOT NULL +GO + + +--维护sql +UPDATE Trial SET AttendedReviewerTypes = '|' + CAST(AttendedReviewerType AS VARCHAR(10)) + '|' + +update Trial set DeclarationTypes ='|' + (select Code from Dictionary where Id= Trial.DeclarationTypeId) + '|' + + + +--验证sql +select DISTINCT AttendedReviewerType ,AttendedReviewerTypes, DeclarationTypeId, Dictionary.Code,DeclarationTypes,Dictionary.[Value] from Trial inner join Dictionary on Trial.DeclarationTypeId=Dictionary.Id + + + +--删除多余字段 +ALTER TABLE [dbo].[Trial] DROP COLUMN [DeclarationTypeId]; +ALTER TABLE [dbo].[Trial] DROP COLUMN [AttendedReviewerType]; \ No newline at end of file diff --git a/IRaCIS.Core.Domain/Trial/Trial.cs b/IRaCIS.Core.Domain/Trial/Trial.cs index c5e627c91..41456b09b 100644 --- a/IRaCIS.Core.Domain/Trial/Trial.cs +++ b/IRaCIS.Core.Domain/Trial/Trial.cs @@ -45,11 +45,6 @@ namespace IRaCIS.Core.Domain.Models [JsonIgnore] public List TrialSiteUserList { get; set; } = new List(); - [JsonIgnore] - [ForeignKey("DeclarationTypeId")] - public Dictionary DeclarationType { get; set; } - - public Guid DeclarationTypeId { get; set; } = Guid.Empty; public Guid IndicationTypeId { get; set; } = Guid.Empty; public Guid? PhaseId { get; set; } = Guid.Empty; @@ -142,13 +137,39 @@ namespace IRaCIS.Core.Domain.Models public DateTime UpdateTime { get; set; } public Guid UpdateUserId { get; set; } - public AttendedReviewerType AttendedReviewerType { get; set; } = AttendedReviewerType.CN;//0ȫйҽ 1ҽ 2йҽҲҽ + + + + // + //public AttendedReviewerType AttendedReviewerType { get; set; } = AttendedReviewerType.CN;//0ȫйҽ 1ҽ 2йҽҲҽ + + //// + //[JsonIgnore] + //[ForeignKey("DeclarationTypeId")] + //public Dictionary DeclarationType { get; set; } + + // + //public Guid DeclarationTypeId { get; set; } = Guid.Empty; + + + public string DeclarationTypeOther { get; set; } + public string DeclarationTypes { get; set; } + + [NotMapped] + public List DeclarationTypeEnumList => AttendedReviewerTypes.Split('|', StringSplitOptions.RemoveEmptyEntries) + .Select(s => Enum.Parse(typeof(DeclarationType), s)).Cast().ToList(); + + [NotMapped] + public List AttendedReviewerTypeEnumList=> AttendedReviewerTypes.Split('|',StringSplitOptions.RemoveEmptyEntries) + .Select(s => Enum.Parse(typeof(AttendedReviewerType), s)).Cast().ToList(); + + public string AttendedReviewerTypes { get; set; } + public string AttendedReviewerTypeOther { get; set; } + + public bool VisitPlanConfirmed { get; set; } - - - /// /// ߱ž /// @@ -359,6 +380,9 @@ namespace IRaCIS.Core.Domain.Models public bool IsConfigureEmail { get; set; } = false; #endregion + + + ///// ///// ͼǷбע ///// From 0c228fab1f01fdc4c574fd50f149237f0e7d336c Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 6 Jun 2023 11:34:11 +0800 Subject: [PATCH 2/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A1=AE=E8=AE=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/TrialSiteUser/DTO/TrialViewModel.cs | 6 ++---- IRaCIS.Core.Domain/Common/FrontAuditConfig.cs | 2 +- IRaCIS.Core.Domain/SQLFile/20230606号.sql | 6 ------ IRaCIS.Core.Domain/Trial/Trial.cs | 4 ++-- 4 files changed, 5 insertions(+), 13 deletions(-) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs index 3c2ccfcc2..4db9d45a7 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialViewModel.cs @@ -52,13 +52,11 @@ namespace IRaCIS.Application.Contracts public Guid? PhaseId { get; set; } - public string DeclarationTypeOther { get; set; } public List DeclarationTypeEnumList { get; set; } public List AttendedReviewerTypeEnumList { get; set; } - public string DeclarationTypes { get; set; } - public string AttendedReviewerTypes { get; set; } - public string AttendedReviewerTypeOther { get; set; } + public string DeclarationTypes { get; set; }=string.Empty; + public string AttendedReviewerTypes { get; set; } = string.Empty; diff --git a/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs b/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs index 1604fa680..ec584d892 100644 --- a/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs +++ b/IRaCIS.Core.Domain/Common/FrontAuditConfig.cs @@ -56,7 +56,7 @@ namespace IRaCIS.Core.Domain.Models /// /// 标识 /// - public string Identification { get; set; } + public string Identification { get; set; } = string.Empty; public Guid? ParentId { get; set; } diff --git a/IRaCIS.Core.Domain/SQLFile/20230606号.sql b/IRaCIS.Core.Domain/SQLFile/20230606号.sql index 603aa7f8d..cefb74b31 100644 --- a/IRaCIS.Core.Domain/SQLFile/20230606号.sql +++ b/IRaCIS.Core.Domain/SQLFile/20230606号.sql @@ -1,14 +1,9 @@  --新增字段 -ALTER TABLE [dbo].[Trial] ADD [AttendedReviewerTypeOther] varchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT '' NOT NULL -GO ALTER TABLE [dbo].[Trial] ADD [AttendedReviewerTypes] varchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT '' NOT NULL GO -ALTER TABLE [dbo].[Trial] ADD [DeclarationTypeOther] varchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT '' NOT NULL -GO - ALTER TABLE [dbo].[Trial] ADD [DeclarationTypes] varchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT '' NOT NULL GO @@ -19,7 +14,6 @@ UPDATE Trial SET AttendedReviewerTypes = '|' + CAST(AttendedReviewerType AS VARC update Trial set DeclarationTypes ='|' + (select Code from Dictionary where Id= Trial.DeclarationTypeId) + '|' - --验证sql select DISTINCT AttendedReviewerType ,AttendedReviewerTypes, DeclarationTypeId, Dictionary.Code,DeclarationTypes,Dictionary.[Value] from Trial inner join Dictionary on Trial.DeclarationTypeId=Dictionary.Id diff --git a/IRaCIS.Core.Domain/Trial/Trial.cs b/IRaCIS.Core.Domain/Trial/Trial.cs index 41456b09b..9c5529c8c 100644 --- a/IRaCIS.Core.Domain/Trial/Trial.cs +++ b/IRaCIS.Core.Domain/Trial/Trial.cs @@ -152,7 +152,7 @@ namespace IRaCIS.Core.Domain.Models //public Guid DeclarationTypeId { get; set; } = Guid.Empty; - public string DeclarationTypeOther { get; set; } + public string DeclarationTypes { get; set; } [NotMapped] @@ -164,7 +164,7 @@ namespace IRaCIS.Core.Domain.Models .Select(s => Enum.Parse(typeof(AttendedReviewerType), s)).Cast().ToList(); public string AttendedReviewerTypes { get; set; } - public string AttendedReviewerTypeOther { get; set; } + From 01018737fd32ea865841f86f56fcd4e244991865 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 6 Jun 2023 11:54:20 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=8F=82=E4=B8=8E?= =?UTF-8?q?=E7=B1=BB=E5=9E=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/TrialSiteUser/TrialService.cs | 5 ++++- IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs | 3 ++- IRaCIS.Core.Domain/Trial/Trial.cs | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs index b37a547db..f94b6ea74 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs @@ -196,7 +196,7 @@ namespace IRaCIS.Application.Services trial.DeclarationTypes = $"|{string.Join('|', trialAddModel.DeclarationTypeEnumList)}|"; - trial.AttendedReviewerTypes = $"|{string.Join('|', trialAddModel.AttendedReviewerTypes)}|"; + trial.AttendedReviewerTypes = $"|{string.Join('|', trialAddModel.AttendedReviewerTypeEnumList)}|"; //多选信息 trialAddModel.ModalityIds.ForEach(modalityId => trial.TrialDicList.Add(new TrialDictionary() { DictionaryId = modalityId, KeyName = StaticData.Modality, TrialId = trial.Id })); @@ -269,6 +269,9 @@ namespace IRaCIS.Application.Services } _mapper.Map(updateModel, trial); + trial.DeclarationTypes = $"|{string.Join('|', updateModel.DeclarationTypeEnumList)}|"; + trial.AttendedReviewerTypes = $"|{string.Join('|', updateModel.AttendedReviewerTypeEnumList)}|"; + var success = await _repository.SaveChangesAsync(); return ResponseOutput.Ok(trial); diff --git a/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs b/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs index 292b25a77..9b274db35 100644 --- a/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs +++ b/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs @@ -33,7 +33,8 @@ US=1, - USAndCN=2, + EU=2, + Other=3 } public enum DeclarationType diff --git a/IRaCIS.Core.Domain/Trial/Trial.cs b/IRaCIS.Core.Domain/Trial/Trial.cs index 9c5529c8c..3b9013783 100644 --- a/IRaCIS.Core.Domain/Trial/Trial.cs +++ b/IRaCIS.Core.Domain/Trial/Trial.cs @@ -153,7 +153,7 @@ namespace IRaCIS.Core.Domain.Models - public string DeclarationTypes { get; set; } + public string DeclarationTypes { get; set; } = string.Empty; [NotMapped] public List DeclarationTypeEnumList => AttendedReviewerTypes.Split('|', StringSplitOptions.RemoveEmptyEntries) @@ -163,7 +163,7 @@ namespace IRaCIS.Core.Domain.Models public List AttendedReviewerTypeEnumList=> AttendedReviewerTypes.Split('|',StringSplitOptions.RemoveEmptyEntries) .Select(s => Enum.Parse(typeof(AttendedReviewerType), s)).Cast().ToList(); - public string AttendedReviewerTypes { get; set; } + public string AttendedReviewerTypes { get; set; }=string.Empty; From 8a232be59f8dfde06aec3842983ca222b8d8cc83 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 6 Jun 2023 14:30:37 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/TrialSiteUser/TrialService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs index f94b6ea74..b419bca76 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs @@ -195,8 +195,8 @@ namespace IRaCIS.Application.Services trial.TrialCode = (trial.TrialType == TrialType.NoneOfficial ? "T0" : yearStr.Substring(yearStr.Length - 2)) + trial.TrialCode + currentYearMaxCodeNext.ToString("D3"); - trial.DeclarationTypes = $"|{string.Join('|', trialAddModel.DeclarationTypeEnumList)}|"; - trial.AttendedReviewerTypes = $"|{string.Join('|', trialAddModel.AttendedReviewerTypeEnumList)}|"; + trial.DeclarationTypes = $"|{string.Join('|', trialAddModel.DeclarationTypeEnumList.Select(x => ((int)x).ToString()).ToList())}|"; + trial.AttendedReviewerTypes = $"|{string.Join('|', trialAddModel.AttendedReviewerTypeEnumList.Select(x => ((int)x).ToString()).ToList())}|"; //多选信息 trialAddModel.ModalityIds.ForEach(modalityId => trial.TrialDicList.Add(new TrialDictionary() { DictionaryId = modalityId, KeyName = StaticData.Modality, TrialId = trial.Id })); @@ -269,8 +269,8 @@ namespace IRaCIS.Application.Services } _mapper.Map(updateModel, trial); - trial.DeclarationTypes = $"|{string.Join('|', updateModel.DeclarationTypeEnumList)}|"; - trial.AttendedReviewerTypes = $"|{string.Join('|', updateModel.AttendedReviewerTypeEnumList)}|"; + trial.DeclarationTypes = $"|{string.Join('|', updateModel.DeclarationTypeEnumList.Select(x => ((int)x).ToString()).ToList())}|"; + trial.AttendedReviewerTypes = $"|{string.Join('|', updateModel.AttendedReviewerTypeEnumList.Select(x => ((int)x).ToString()).ToList())}|"; var success = await _repository.SaveChangesAsync(); return ResponseOutput.Ok(trial); From 43a720e09eb99f93e1e6454dfd6d7d625bf38b29 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 6 Jun 2023 14:54:05 +0800 Subject: [PATCH 5/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9E=9A=E4=B8=BE?= =?UTF-8?q?=E5=80=BC=E5=8F=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs b/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs index 9b274db35..4216552ad 100644 --- a/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs +++ b/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs @@ -34,17 +34,19 @@ US=1, EU=2, + Other=3 + } public enum DeclarationType { - Other=-1, + Other=3, - US=0, + US=1, - CN=1, + CN=0, EU=2, - JP=3 + JP=4 } } \ No newline at end of file From d3c0e5979a6977afe9e91e656a3ac223857f691a Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 6 Jun 2023 15:11:55 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9E=9A=E4=B8=BE?= =?UTF-8?q?=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs | 2 +- IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs | 2 ++ IRaCIS.Core.Domain/Trial/Trial.cs | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs b/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs index deb966060..d1344f775 100644 --- a/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs +++ b/IRaCIS.Core.Application/Service/Doctor/DoctorListService.cs @@ -79,7 +79,7 @@ namespace IRaCIS.Application.Services var guidList = selectionQuery.ReadingTypeIdList.Concat(selectionQuery.SubspecialityIdList).Concat(selectionQuery.TitleIdList); var query = _doctorRepository/*.WhereIf(nation != AttendedReviewerType.USAndCN, t => t.Nation ==(int) nation)*/ - + .WhereIf(selectionQuery.DepartmentId != null, t => t.DepartmentId == selectionQuery.DepartmentId) .WhereIf(selectionQuery.SpecialityId != null, t => t.SpecialityId == selectionQuery.SpecialityId) .WhereIf(trialConfig.TrialType == TrialType.NoneOfficial, t => t.IsVirtual ==true) diff --git a/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs b/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs index 4216552ad..8a794bf0e 100644 --- a/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs +++ b/IRaCIS.Core.Domain.Share/Trial/TrialExpedited.cs @@ -46,7 +46,9 @@ US=1, CN=0, + EU=2, + JP=4 } } \ No newline at end of file diff --git a/IRaCIS.Core.Domain/Trial/Trial.cs b/IRaCIS.Core.Domain/Trial/Trial.cs index 3b9013783..dec43ae0e 100644 --- a/IRaCIS.Core.Domain/Trial/Trial.cs +++ b/IRaCIS.Core.Domain/Trial/Trial.cs @@ -156,7 +156,7 @@ namespace IRaCIS.Core.Domain.Models public string DeclarationTypes { get; set; } = string.Empty; [NotMapped] - public List DeclarationTypeEnumList => AttendedReviewerTypes.Split('|', StringSplitOptions.RemoveEmptyEntries) + public List DeclarationTypeEnumList => DeclarationTypes.Split('|', StringSplitOptions.RemoveEmptyEntries) .Select(s => Enum.Parse(typeof(DeclarationType), s)).Cast().ToList(); [NotMapped] From f8c3064b070a653bb399df5e9d67a7f496ba43dd Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 6 Jun 2023 16:08:32 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E5=A4=84=E7=90=86=E7=94=9F=E6=88=90?= =?UTF-8?q?=E4=BB=BB=E5=8A=A1=E8=84=8F=E6=95=B0=E6=8D=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Service/Allocation/VisitTaskHelpeService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs index c7e5e28ca..12696a4a1 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs @@ -237,7 +237,7 @@ namespace IRaCIS.Core.Application.Service //为防止脏数据 这里也多判断一次 var existCurrentVisitTaskList = _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == subjectVisit.SubjectId && t.TrialReadingCriterionId == trialReadingCriterionConfig.TrialReadingCriterionId && t.TaskState == TaskState.Effect - && t.TaskAllocationState == TaskAllocationState.NotAllocate && t.DoctorUserId == null && t.SourceSubjectVisitId == subjectVisit.Id).ToList(); + && t.SourceSubjectVisitId == subjectVisit.Id).ToList(); if (trialReadingCriterionConfig.ReadingType == ReadingMethod.Double) { From af4aec6a696f230303284306bd2c71e39cd47a08 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Tue, 6 Jun 2023 17:18:39 +0800 Subject: [PATCH 8/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9bm=E9=87=8D=E9=98=85?= =?UTF-8?q?=E5=BD=B1=E5=93=8D=E5=88=97=E8=A1=A8=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Allocation/VisitTaskHelpeService.cs | 11 +++- .../Service/Allocation/VisitTaskService.cs | 66 +++++++++++-------- 2 files changed, 45 insertions(+), 32 deletions(-) diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs index 12696a4a1..75fdb7488 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskHelpeService.cs @@ -115,7 +115,7 @@ namespace IRaCIS.Core.Application.Service public async Task AddConvertedTask(Guid taskId) { - + var taskInfo = await _visitTaskRepository.Where(x => x.Id == taskId).IgnoreAutoIncludes().AsNoTracking().FirstNotNullAsync(); taskInfo.ReadingTaskState = ReadingTaskState.WaitReading; @@ -148,7 +148,7 @@ namespace IRaCIS.Core.Application.Service }); - + await _visitTaskRepository.SaveChangesAsync(); } @@ -1290,6 +1290,11 @@ namespace IRaCIS.Core.Application.Service //加一个去重的判断 IR 申请重阅的时候,有脏数据 (例如多个follow 2 ),但是生成时候不生成 + //var existTask = _visitTaskRepository.Where(t => t.TrialId == trialId && t.SubjectId == reReadingVisitTask.SubjectId + //&& t.TrialReadingCriterionId == reReadingVisitTask.TrialReadingCriterionId && t.TaskState == TaskState.Effect + // && t.SourceSubjectVisitId == reReadingVisitTask.SourceSubjectVisitId && t.ArmEnum == reReadingVisitTask.ArmEnum && t.DoctorUserId == reReadingVisitTask.DoctorUserId).FirstOrDefault(); + + var newTask = await _visitTaskRepository.AddAsync(new VisitTask() { @@ -1322,7 +1327,7 @@ namespace IRaCIS.Core.Application.Service IsNeedClinicalDataSign = reReadingVisitTask.IsNeedClinicalDataSign, IsClinicalDataSign = reReadingVisitTask.IsClinicalDataSign, BeforeConvertedTaskId = reReadingVisitTask.BeforeConvertedTaskId, - ReReadingApplyState= ReReadingApplyState.Default, + ReReadingApplyState = ReReadingApplyState.Default, // TaskAllocationState = reReadingVisitTask.TaskAllocationState, // AllocateTime = DateTime.Now, //DoctorUserId = reReadingVisitTask.DoctorUserId, diff --git a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs index 0c022b8df..3d43b495d 100644 --- a/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/VisitTaskService.cs @@ -1538,6 +1538,9 @@ namespace IRaCIS.Core.Application.Service.Allocation //是否是一致性分析任务 正常申请 会影响一致性分析任务 filterExpression = filterExpression.And(t => t.IsAnalysisCreate == origenalTask.IsAnalysisCreate); + //IR 申请1.1 基线重阅,影响附加评估两个IR所有的任务 + var isIR1Point1AdditionalAssessmentBaseline = false; + //附加评估 IR 和PM 看到的影响列表不一样 //1.1 有附加评估,会影响其他标准的任务 @@ -1555,7 +1558,10 @@ namespace IRaCIS.Core.Application.Service.Allocation // 1.1 基线任务影响BM任务 if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && _subjectVisitRepository.Any(t => t.Id == origenalTask.SourceSubjectVisitId && t.IsBaseLine == true)) { - filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB); + + isIR1Point1AdditionalAssessmentBaseline = true; + + //filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB); } // 1.1 非基线任务不影响BM任务 else @@ -1795,6 +1801,17 @@ namespace IRaCIS.Core.Application.Service.Allocation )) || t.Id == origenalTask.Id) ; } + else if (isIR1Point1AdditionalAssessmentBaseline) + { + filterExpression = filterExpression.And(t => t.VisitTaskNum >= origenalTask.VisitTaskNum && + ((( + ((t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == origenalTask.DoctorUserId) + // 裁判 肿瘤学是另外的医生做 + || t.ReadingCategory == ReadingCategory.Judge + || t.ReadingCategory == ReadingCategory.Oncology + ) && t.TrialReadingCriterionId == origenalTask.TrialReadingCriterionId) || (t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB)) + ); + } else { filterExpression = filterExpression.And(t => t.VisitTaskNum >= origenalTask.VisitTaskNum && @@ -2579,7 +2596,8 @@ namespace IRaCIS.Core.Application.Service.Allocation filterExpression = filterExpression.And(t => t.IsAnalysisCreate == filterObj.IsAnalysisCreate); - + //IR 申请1.1 基线重阅,影响附加评估所有的任务 + var isIR1Point1AdditionalAssessmentBaseline = false; //附加评估 IR 和PM 看到的影响列表不一样 if (criterionConfig.CriterionType == CriterionType.RECIST1Point1 && criterionConfig.IsAdditionalAssessment) @@ -2593,7 +2611,11 @@ namespace IRaCIS.Core.Application.Service.Allocation // 1.1 基线任务影响BM任务 if (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager && _subjectVisitRepository.Any(t=>t.Id==filterObj.SourceSubjectVisitId && t.IsBaseLine==true)) { - filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB); + + isIR1Point1AdditionalAssessmentBaseline=true; + //filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB); + + } // 1.1 非基线任务不影响BM任务 else @@ -2629,27 +2651,6 @@ namespace IRaCIS.Core.Application.Service.Allocation || (_userInfo.UserTypeEnumInt == (int)UserTypeEnum.IndependentReviewer && applyId == null)) { - - //if (criterionConfig.CriterionType == CriterionType.RECIST1Point1 && criterionConfig.IsAdditionalAssessment) - //{ - // if(_userInfo.UserTypeEnumInt == (int)UserTypeEnum.ProjectManager) - // { - // filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId || t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB); - // } - // else - // { - // filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId); - // } - - - //} - //else - //{ - // //默认影响的都是该标准的任务 - // filterExpression = filterExpression.And(t => t.TrialReadingCriterionId == filterObj.TrialReadingCriterionId); - //} - - //当前任务及其之后的所有访视任务、全局任务、裁判任务、肿瘤学阅片任务 //有序 @@ -2662,11 +2663,6 @@ namespace IRaCIS.Core.Application.Service.Allocation //影响当前医生 以及当前医生之后的 1、访视任务 已经读完的 //2、后续任务如果是全局、肿瘤学阅片任务,状态为阅片完成标记为重阅重置;若在阅片中,则标记为失效;若为待阅片,则标记为失效; //3、当前任务、后续访视任务或者全局任务触发了裁判任务,若裁判任务状态为阅片完成,则标记为重阅重置;若在阅片中或待阅片,则标记为失效 - // filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum && - //((t.DoctorUserId == filterObj.DoctorUserId && ((t.ReadingCategory == ReadingCategory.Visit && t.ReadingTaskState == ReadingTaskState.HaveSigned) || t.ReadingCategory == ReadingCategory.Global)) - // || - // t.ReadingCategory == ReadingCategory.Judge || t.ReadingCategory == ReadingCategory.Oncology) - // ); //申请的是转化的,那么影响列表要排除转化之前的 if (criterionConfig.CriterionType == CriterionType.IRECIST1Point1 && filterObj.BeforeConvertedTaskId != null) @@ -2682,6 +2678,18 @@ namespace IRaCIS.Core.Application.Service.Allocation )) || t.Id == filterObj.Id) ; } + // IR 申请1.1 基线重阅,影响附加评估所有的任务 + else if (isIR1Point1AdditionalAssessmentBaseline) + { + filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum && + ((( + ((t.ReadingCategory == ReadingCategory.Visit || t.ReadingCategory == ReadingCategory.Global) && t.DoctorUserId == filterObj.DoctorUserId) + // 裁判 肿瘤学是另外的医生做 + || t.ReadingCategory == ReadingCategory.Judge + || t.ReadingCategory == ReadingCategory.Oncology + )&& t.TrialReadingCriterionId==filterObj.TrialReadingCriterionId )||( t.TrialReadingCriterion.CriterionType == CriterionType.RECIST1Pointt1_MB)) + ); + } else { filterExpression = filterExpression.And(t => t.VisitTaskNum >= filterObj.VisitTaskNum && From b9f78c5f0be9f313fbadb9b9073b3ce6f717f4ae Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Wed, 7 Jun 2023 08:57:27 +0800 Subject: [PATCH 9/9] =?UTF-8?q?=E4=BF=AE=E6=94=B9uat?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Domain/SQLFile/20230606号.sql | 6 ++--- .../SQLFile/4.21号发布后维护.sql | 23 +++++++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/IRaCIS.Core.Domain/SQLFile/20230606号.sql b/IRaCIS.Core.Domain/SQLFile/20230606号.sql index cefb74b31..a4ff35eb7 100644 --- a/IRaCIS.Core.Domain/SQLFile/20230606号.sql +++ b/IRaCIS.Core.Domain/SQLFile/20230606号.sql @@ -1,4 +1,6 @@  +update FrontAuditConfig set Identification='' where Identification is NULL + --新增字段 ALTER TABLE [dbo].[Trial] ADD [AttendedReviewerTypes] varchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT '' NOT NULL @@ -18,7 +20,3 @@ update Trial set DeclarationTypes ='|' + (select Code from Dictionary where Id= select DISTINCT AttendedReviewerType ,AttendedReviewerTypes, DeclarationTypeId, Dictionary.Code,DeclarationTypes,Dictionary.[Value] from Trial inner join Dictionary on Trial.DeclarationTypeId=Dictionary.Id - ---删除多余字段 -ALTER TABLE [dbo].[Trial] DROP COLUMN [DeclarationTypeId]; -ALTER TABLE [dbo].[Trial] DROP COLUMN [AttendedReviewerType]; \ No newline at end of file diff --git a/IRaCIS.Core.Domain/SQLFile/4.21号发布后维护.sql b/IRaCIS.Core.Domain/SQLFile/4.21号发布后维护.sql index 85eb8ce4f..f21e13bd7 100644 --- a/IRaCIS.Core.Domain/SQLFile/4.21号发布后维护.sql +++ b/IRaCIS.Core.Domain/SQLFile/4.21号发布后维护.sql @@ -159,6 +159,29 @@ on OrganInfo.Id=OrganTrialInfo.OrganInfoId where OrganTrialInfo.OrganType is nul +update FrontAuditConfig set Identification='' where Identification is NULL + +--新增字段 + +ALTER TABLE [dbo].[Trial] ADD [AttendedReviewerTypes] varchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT '' NOT NULL +GO + +ALTER TABLE [dbo].[Trial] ADD [DeclarationTypes] varchar(255) COLLATE Chinese_PRC_CI_AS DEFAULT '' NOT NULL +GO + + +--维护sql +UPDATE Trial SET AttendedReviewerTypes = '|' + CAST(AttendedReviewerType AS VARCHAR(10)) + '|' + +update Trial set DeclarationTypes ='|' + (select Code from Dictionary where Id= Trial.DeclarationTypeId) + '|' + + +--验证sql +select DISTINCT AttendedReviewerType ,AttendedReviewerTypes, DeclarationTypeId, Dictionary.Code,DeclarationTypes,Dictionary.[Value] from Trial inner join Dictionary on Trial.DeclarationTypeId=Dictionary.Id + + + +