diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.xml b/IRaCIS.Core.API/IRaCIS.Core.API.xml index 89b498ac5..2566f292e 100644 --- a/IRaCIS.Core.API/IRaCIS.Core.API.xml +++ b/IRaCIS.Core.API/IRaCIS.Core.API.xml @@ -213,13 +213,6 @@ - - - 提交阅片裁判表单 - - - - 配置 基础逻辑信息并确认 diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 6e78c30c1..bbf0af739 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -855,7 +855,7 @@ 裁决日期 CODTC - + 获取中心设备信息 @@ -10532,21 +10532,6 @@ 默认SegmentName - - - 仲裁模式 - - - - - 裁判规则 - - - - - 仲裁对象 - - 返回对象 @@ -11992,31 +11977,6 @@ 阅片期名称 - - - 类型 - - - - - 问题类型 - - - - - 字典code - - - - - 单位 - - - - - 答案组合 - - 标准ID @@ -12378,21 +12338,6 @@ 仲裁规则 - - - 仲裁模式 - - - - - 裁判规则 - - - - - 裁判任务生成 - - 需要 @@ -14423,11 +14368,6 @@ - - - 编辑裁判规则配置 - - 新增修改项目问题标准(项目) @@ -14529,22 +14469,11 @@ 阅片问题.标准 - + 阅片问题.标准 - - - 获取项目阅片标准各访视的裁判规则配置。 - 未配置规则的访视问题也会返回,供前端直接进行配置。 - - - - - 编辑项目阅片标准各访视的裁判规则配置。 - - 设置项目问题导出 @@ -14914,7 +14843,7 @@ - + IR影像阅片 @@ -15351,30 +15280,6 @@ - - - 获取单访视裁判答案 - - - - - - - 获取裁判表单 - - - - - 编辑裁判表单 - - - - - 提交裁判表单 - - - - 获取裁判阅片任务信息 @@ -15408,16 +15313,6 @@ - - - 应用访视裁判规则 以及剔除排除的问题 - - - - - 应用访视裁判规则 以及剔除排除的问题 - - 发送微信通知 diff --git a/IRaCIS.Core.Application/Service/Common/Export/ExcelExportService.cs b/IRaCIS.Core.Application/Service/Common/Export/ExcelExportService.cs index c8438f4f8..edee8f66a 100644 --- a/IRaCIS.Core.Application/Service/Common/Export/ExcelExportService.cs +++ b/IRaCIS.Core.Application/Service/Common/Export/ExcelExportService.cs @@ -85,9 +85,23 @@ namespace IRaCIS.Core.Application.Service.Common [HttpPost] public async Task GetSiteSurveyEquipmentList_Export(SiteSurveyEquipmentQuery inQuery, [FromServices] IRepository _trialSiteEquipmentSurveyRepository, + [FromServices] IRepository _trialSiteSurveyRepository, [FromServices] IDictionaryService _dictionaryService) { + + + //找到该中心最新的调研记录 + var groupSelectIdQuery = + _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId) + .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId) + .GroupBy(t => t.TrialSiteId) + .Select(g => g.OrderByDescending(u => u.CreateTime).Select(t => t.Id).First()); + + var query = _trialSiteEquipmentSurveyRepository.Where(t => t.TrialSiteSurvey.TrialId == inQuery.TrialId) + .IgnoreQueryFilters().Where(t => groupSelectIdQuery.Contains(t.TrialSiteSurveyId)) + .WhereIf(inQuery.IsDeleted != null, t => t.TrialSiteSurvey.IsDeleted == inQuery.IsDeleted) + .WhereIf(inQuery.State != null, t => t.TrialSiteSurvey.State == inQuery.State) .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteSurvey.TrialSiteId == inQuery.TrialSiteId) .WhereIf(inQuery.TrialSiteCode.IsNotNullOrEmpty(), t => t.TrialSiteSurvey.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode)) .WhereIf(inQuery.TrialSiteName.IsNotNullOrEmpty(), t => t.TrialSiteSurvey.TrialSite.TrialSiteAliasName.Contains(inQuery.TrialSiteName) || @@ -99,26 +113,26 @@ namespace IRaCIS.Core.Application.Service.Common var config = JsonConvert.DeserializeObject(siteSurveryConfig) ?? new TrialExtraConfig(); - var fields = new List<(string FieldName, int excelIndex)>() - { + var fields = new List<(string FieldName, int excelIndex)>() + { - ("Parameters", 8), - ("ManufacturerType", 9), - ("ScannerType", 10), - ("MagneticFieldStrengthType", 11), - ("BodyCoilChannelCount", 12), - ("HasDedicatedPdfFatQuantificationSequence", 13), - ("PdfFatQuantificationSequenceType", 14), - //("OtherSequenceSpecification", 14), - ("HasT2R2Correction", 15), - ("CanFullyExportPdfParameterMapsAndRawDicom", 16), - ("Note", 17), - }; + ("Parameters", 9), + ("ManufacturerType", 10), + ("ScannerType", 11), + ("MagneticFieldStrengthType", 12), + ("BodyCoilChannelCount", 13), + ("HasDedicatedPdfFatQuantificationSequence", 14), + ("PdfFatQuantificationSequenceType", 15), + //("OtherSequenceSpecification", 15), + ("HasT2R2Correction", 16), + ("CanFullyExportPdfParameterMapsAndRawDicom", 17), + ("Note", 18), + }; var viewNameList = config.EquipmentControlFieldList.Where(t => t.IsView == true).Select(t => t.FiledName).ToList(); - var columnsToDelete = fields.Where(f => !viewNameList.Any(t=>f.FieldName==t)).Select(f => f.excelIndex).Distinct().OrderByDescending(i => i).ToList(); + var columnsToDelete = fields.Where(f => !viewNameList.Any(t => f.FieldName == t)).Select(f => f.excelIndex).Distinct().OrderByDescending(i => i).ToList(); //var defalutSortArray = new string[] { /*nameof(TrialSiteSurveyView.LanguageType) + " desc", nameof(TrialSiteSurveyView.ShowOrder)*/ }; @@ -145,7 +159,18 @@ namespace IRaCIS.Core.Application.Service.Common [FromServices] IRepository _trialSiteSurveyRepository, [FromServices] IDictionaryService _dictionaryService) { - var query = _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId) + + //找到该中心最新的调研记录 + var groupSelectIdQuery = + _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId) + .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId) + .GroupBy(t => t.TrialSiteId) + .Select(g => g.OrderByDescending(u => u.CreateTime).Select(t => t.Id).First()); + + var query = _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId).IgnoreQueryFilters() + .Where(t => groupSelectIdQuery.Contains(t.Id)) + .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) + .WhereIf(inQuery.State != null, t => t.State == inQuery.State) .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId) .WhereIf(inQuery.TrialSiteCode.IsNotNullOrEmpty(), t => t.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode)) .WhereIf(inQuery.TrialSiteName.IsNotNullOrEmpty(), t => t.TrialSite.TrialSiteAliasName.Contains(inQuery.TrialSiteName) || @@ -162,20 +187,21 @@ namespace IRaCIS.Core.Application.Service.Common var fields = new List<(string FieldName, int excelIndex)>() { - ("AverageEngravingCycle", 7), - ("IsConfirmImagingTechnologist", 8), - ("EfficacyEvaluatorType", 9), - ("IsFollowStudyParameters", 10), - ("NotFollowReson", 10), - + ("AverageEngravingCycle", 8), + ("IsRoutineMRIPDEE", 9), + ("MRIPDFFScanTime", 10), + ("MRIPDFFLeadTime", 11), + ("MRIPDFFOther", 12), + ("IsAuthorizeRadiologistsParticipate", 13), + ("AssignFixedTechnologists", 14), + ("IsConfirmImagingTechnologist", 15), + ("NotConfirmReson", 16), + ("EfficacyEvaluatorType", 17), - ("IsRoutineMRIPDEE", 11), - ("MRIPDFFScanTime", 12), - ("MRIPDFFLeadTime", 13), - ("MRIPDFFOther", 14), - ("AssignFixedTechnologists", 15), - ("ISStrictManualBurnFlag", 16), - ("NotStrictManualBurnFlagReason",16) + ("IsFollowStudyParameters", 18), + ("NotFollowReson", 19), + ("ISStrictManualBurnFlag", 20), + ("NotStrictManualBurnFlagReason",21) }; diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs index 96cc917a4..08500b416 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/DTO/TrialSiteSurveyViewModel.cs @@ -507,6 +507,12 @@ namespace IRaCIS.Core.Application.Contracts public string UserName { get; set; } = string.Empty; public string Phone { get; set; } = string.Empty; public string Email { get; set; } = string.Empty; + + [DictionaryTranslate("YesOrNo")] + public bool IsDeleted { get; set; } + + [DictionaryTranslate("ResearchRecord")] + public TrialSiteSurveyEnum State { get; set; } } public class SiteSurveyEquipmentQuery : PageInput @@ -518,6 +524,10 @@ namespace IRaCIS.Core.Application.Contracts public string? TrialSiteCode { get; set; } public string? TrialSiteName { get; set; } + + public bool? IsDeleted { get; set; } + + public TrialSiteSurveyEnum? State { get; set; } } public class SiteSurveyInfoQuery : PageInput @@ -530,6 +540,10 @@ namespace IRaCIS.Core.Application.Contracts public string? TrialSiteCode { get; set; } public string? TrialSiteName { get; set; } + + public bool? IsDeleted { get; set; } + + public TrialSiteSurveyEnum? State { get; set; } } public class SiteSurveyInfoDto diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs index fd935ace9..4d0d46e97 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/TrialSiteSurveyService.cs @@ -1489,7 +1489,18 @@ namespace IRaCIS.Core.Application.Contracts [HttpPost] public async Task GetSiteSurveyEquipmentList(SiteSurveyEquipmentQuery inQuery) { - var pageList = await _trialSiteEquipmentSurveyRepository.Where(t => t.TrialSiteSurvey.TrialId == inQuery.TrialId) + + //找到该中心最新的调研记录 + var groupSelectIdQuery = + _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId) + .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId) + .GroupBy(t => t.TrialSiteId) + .Select(g => g.OrderByDescending(u => u.CreateTime).Select(t => t.Id).First()); + + var pageList = await _trialSiteEquipmentSurveyRepository.Where(t => t.TrialSiteSurvey.TrialId == inQuery.TrialId).IgnoreQueryFilters() + .Where(t => groupSelectIdQuery.Contains(t.TrialSiteSurveyId)) + .WhereIf(inQuery.IsDeleted != null, t => t.TrialSiteSurvey.IsDeleted == inQuery.IsDeleted) + .WhereIf(inQuery.State != null, t => t.TrialSiteSurvey.State == inQuery.State) .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteSurvey.TrialSiteId == inQuery.TrialSiteId) .WhereIf(inQuery.TrialSiteCode.IsNotNullOrEmpty(), t => t.TrialSiteSurvey.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode)) .WhereIf(inQuery.TrialSiteName.IsNotNullOrEmpty(), t => t.TrialSiteSurvey.TrialSite.TrialSiteAliasName.Contains(inQuery.TrialSiteName) || @@ -1511,7 +1522,18 @@ namespace IRaCIS.Core.Application.Contracts [HttpPost] public async Task GetSiteSurveyInfoList(SiteSurveyInfoQuery inQuery) { - var pageList = await _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId) + + //找到该中心最新的调研记录 + var groupSelectIdQuery = + _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId) + .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId) + .GroupBy(t => t.TrialSiteId) + .Select(g => g.OrderByDescending(u => u.CreateTime).Select(t => t.Id).First()); + + var pageList = await _trialSiteSurveyRepository.Where(t => t.TrialId == inQuery.TrialId).IgnoreQueryFilters() + .Where(t => groupSelectIdQuery.Contains(t.Id)) + .WhereIf(inQuery.IsDeleted != null, t => t.IsDeleted == inQuery.IsDeleted) + .WhereIf(inQuery.State != null, t => t.State == inQuery.State) .WhereIf(inQuery.TrialSiteId != null, t => t.TrialSiteId == inQuery.TrialSiteId) .WhereIf(inQuery.TrialSiteCode.IsNotNullOrEmpty(), t => t.TrialSite.TrialSiteCode.Contains(inQuery.TrialSiteCode)) .WhereIf(inQuery.TrialSiteName.IsNotNullOrEmpty(), t => t.TrialSite.TrialSiteAliasName.Contains(inQuery.TrialSiteName) || diff --git a/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs b/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs index a15587eb9..cf1575976 100644 --- a/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/SiteSurvey/_MapConfig.cs @@ -102,6 +102,8 @@ namespace IRaCIS.Core.Application.AutoMapper CreateMap(); CreateMap() + .ForMember(d => d.IsDeleted, u => u.MapFrom(s => s.TrialSiteSurvey.IsDeleted)) + .ForMember(d => d.State, u => u.MapFrom(s => s.TrialSiteSurvey.State)) .ForMember(d => d.Email, u => u.MapFrom(s => s.TrialSiteSurvey.Email)) .ForMember(d => d.Phone, u => u.MapFrom(s => s.TrialSiteSurvey.Phone)) .ForMember(d => d.UserName, u => u.MapFrom(s => s.TrialSiteSurvey.UserName))