diff --git a/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs b/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs index f837d9c4c..65eb55aba 100644 --- a/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs +++ b/IRaCIS.Core.API/Controllers/UploadDownLoadController.cs @@ -312,9 +312,6 @@ namespace IRaCIS.Core.API.Controllers _logger.LogError(e.Message + e.StackTrace); archiveResult.ErrorFiles.Add(fileName); - - _provider.Remove("StudyUid_" + archiveStudyCommand.StudyInstanceUid); - } @@ -353,11 +350,6 @@ namespace IRaCIS.Core.API.Controllers studyMonitor.IsSuccess = true; - - //_studyService.UploadOrReUploadNeedTodo(archiveStudyCommand, archivedStudyIds, ref archiveResult, ); - - - } else { diff --git a/IRaCIS.Core.API/Startup.cs b/IRaCIS.Core.API/Startup.cs index a126dd3e0..7bf6254c8 100644 --- a/IRaCIS.Core.API/Startup.cs +++ b/IRaCIS.Core.API/Startup.cs @@ -182,7 +182,7 @@ namespace IRaCIS.Core.API app.UseLogDashboard("/LogDashboard"); //hangfire - //app.UseHangfireConfig(env); + app.UseHangfireConfig(env); ////ʱ //app.UseHttpReports(); diff --git a/IRaCIS.Core.API/appsettings.Development.json b/IRaCIS.Core.API/appsettings.Development.json index 472565ed7..e9f58c77f 100644 --- a/IRaCIS.Core.API/appsettings.Development.json +++ b/IRaCIS.Core.API/appsettings.Development.json @@ -7,7 +7,8 @@ } }, "ConnectionStrings": { - "RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true" + "RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_New_Tet;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true", + "Hangfire": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Hangfire_IRaCIS;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true" }, "BasicSystemConfig": { diff --git a/IRaCIS.Core.API/appsettings.Production.json b/IRaCIS.Core.API/appsettings.Production.json index 25771f48f..7daa550ea 100644 --- a/IRaCIS.Core.API/appsettings.Production.json +++ b/IRaCIS.Core.API/appsettings.Production.json @@ -8,7 +8,8 @@ }, //"RootUrl": "http://123.56.181.144:8060/", "ConnectionStrings": { - "RemoteNew": "Server=101.132.193.237,1433;Database=IRaCIS.Production;User ID=sa;Password=zhanying2021;TrustServerCertificate=true" + "RemoteNew": "Server=101.132.193.237,1433;Database=IRaCIS.Production;User ID=sa;Password=zhanying2021;TrustServerCertificate=true", + "Hangfire": "Server=101.132.193.237,1433;Database=Hangfire.IRaCIS.Production;User ID=sa;Password=zhanying2021;TrustServerCertificate=true" }, "BasicSystemConfig": { diff --git a/IRaCIS.Core.API/appsettings.Staging.json b/IRaCIS.Core.API/appsettings.Staging.json index 5f31dbb97..79ee99b21 100644 --- a/IRaCIS.Core.API/appsettings.Staging.json +++ b/IRaCIS.Core.API/appsettings.Staging.json @@ -7,7 +7,8 @@ } }, "ConnectionStrings": { - "RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_Verify;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true" + "RemoteNew": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=IRaCIS_Verify;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true", + "Hangfire": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Hangfire_IRaCIS;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true" }, "BasicSystemConfig": { diff --git a/IRaCIS.Core.API/appsettings.json b/IRaCIS.Core.API/appsettings.json index a3e317b68..c200d0770 100644 --- a/IRaCIS.Core.API/appsettings.json +++ b/IRaCIS.Core.API/appsettings.json @@ -1,7 +1,6 @@ { "ConnectionStrings": { - "hang": "Server=ZHOU;Database=IRaCIS;User ID=sa;Password=sa123456;", - "Hangfire": "Server=123.56.94.154,1433\\MSSQLSERVER;Database=Hangfire_IRaCIS;User ID=sa;Password=dev123456DEV;TrustServerCertificate=true" + "hang": "Server=ZHOU;Database=IRaCIS;User ID=sa;Password=sa123456;" }, "JwtSetting": { "SecurityKey": "3e6dbfa227234a03977a2f421bdb7f4f", // 密钥 diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs index 4b325717c..efed6d456 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/DicomArchiveService.cs @@ -209,7 +209,7 @@ namespace IRaCIS.Core.Application.Services /* StudyTime = dataset.GetSingleValueOrDefault(DicomTag.StudyDate, DateTime.Now).Add(dataset.GetSingleValueOrDefault(DicomTag.StudyTime, DateTime.Now).TimeOfDay),*///dataset.GetDateTime(DicomTag.StudyDate, DicomTag.StudyTime), StudyTime = dataset.GetSingleValueOrDefault(DicomTag.StudyDate, string.Empty) == string.Empty ? null : dataset.GetSingleValue(DicomTag.StudyDate).Add(dataset.GetSingleValueOrDefault(DicomTag.StudyTime, string.Empty) == string.Empty ? TimeSpan.Zero : dataset.GetSingleValue(DicomTag.StudyTime).TimeOfDay), Modalities = modality, - ModalityForEdit = dicModalityList.Contains(modality) ? modality : String.Empty, + ModalityForEdit = dicModalityList.Contains(modality) ? (modality=="MR"?"MRI": modality) : String.Empty, Description = dataset.GetSingleValueOrDefault(DicomTag.StudyDescription, string.Empty), InstitutionName = dataset.GetSingleValueOrDefault(DicomTag.InstitutionName, string.Empty), PatientId = dataset.GetSingleValueOrDefault(DicomTag.PatientID, string.Empty), diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/_MapConfig.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/_MapConfig.cs index a006e6a27..c2b67ffd1 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/_MapConfig.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/_MapConfig.cs @@ -52,6 +52,7 @@ namespace IRaCIS.Core.Application.Service .ForMember(o => o.StudyCode, t => t.MapFrom(u => u.DicomStudy.StudyCode)) .ForMember(o => o.InstanceList, t => t.MapFrom(u => u.DicomInstanceList.Select(t=>t.Id).ToArray())) + .ForMember(o => o.InstancePathList, t => t.MapFrom(u => u.DicomInstanceList.OrderBy(t=>t.InstanceNumber).Select(t => t.Path))) ; CreateMap() diff --git a/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs b/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs index 5ef295020..3171fa5e7 100644 --- a/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs +++ b/IRaCIS.Core.Application/Service/QC/DTO/QARecordViewModel.cs @@ -423,6 +423,8 @@ namespace IRaCIS.Core.Application.Contracts.DTO //public bool IsDicomData { get; set; } = true; public Guid[] InstanceList = new Guid[0]; + + public List InstancePathList = new List(); } diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs index 07efa0cd7..a03d8119f 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/PersonalWorkstation.cs @@ -45,7 +45,7 @@ namespace IRaCIS.Core.Application TotalNeedSignTrialDocCount = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin ? 0 - : await _trialDocumentRepository.AsQueryable(true) + : await _trialDocumentRepository.AsQueryable(true).Where(t => t.Trial.TrialStatusStr != StaticData.TrialState.TrialStopped) .Where(t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .Where(t => t.IsDeleted == false || (t.IsDeleted == true && t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id))) @@ -54,7 +54,7 @@ namespace IRaCIS.Core.Application HaveSignedTrialDocCount = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin ? 0 - : await _trialDocumentRepository + : await _trialDocumentRepository.Where(t => t.Trial.TrialStatusStr != StaticData.TrialState.TrialStopped) .Where( t => t.Trial.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId)) .SelectMany(t => t.TrialDocConfirmedUserList) @@ -63,7 +63,7 @@ namespace IRaCIS.Core.Application TotalNeedSignSystemDocCount = _userInfo.UserTypeEnumInt == (int)UserTypeEnum.SuperAdmin ? 0 : await _systemDocumentRepository - .Where(t => t.IsDeleted == false || (t.IsDeleted == true && t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id))) + .Where(t => t.IsDeleted == false || (t.IsDeleted == true && t.SystemDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime !=null))) .SelectMany(t => t.NeedConfirmedUserTypeList) .CountAsync(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId), @@ -146,7 +146,7 @@ namespace IRaCIS.Core.Application } else { - var trialDocStat = await _trialRepository + var trialDocStat = await _trialRepository.Where(t=>t.TrialStatusStr != StaticData.TrialState.TrialStopped) .Where(t => t.TrialUserList.Any(t => t.UserId == _userInfo.Id)) .WhereIf(!_userInfo.IsAdmin, c => c.TrialDocumentList.Where(t => t.NeedConfirmedUserTypeList.Any(t => t.NeedConfirmUserTypeId == _userInfo.UserTypeId) && !t.TrialDocConfirmedUserList.Any(t => t.ConfirmUserId == _userInfo.Id && t.ConfirmTime!=null)).Count() > 0) .ProjectTo(_mapper.ConfigurationProvider, new { userTypeEnumInt = _userInfo.UserTypeEnumInt, userId = _userInfo.Id, userTypeId = _userInfo.UserTypeId }) diff --git a/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs b/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs index 07f5f4b0e..a4d8abe43 100644 --- a/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs +++ b/IRaCIS.Core.Application/Service/WorkLoad/EnrollService.cs @@ -179,9 +179,6 @@ namespace IRaCIS.Application.Services } - - - /// /// 入组流程-向CRO提交医生[Submit] /// diff --git a/IRaCIS.Core.Application/_MediatR/Handlers/ConsistencyVerificationHandler.cs b/IRaCIS.Core.Application/_MediatR/Handlers/ConsistencyVerificationHandler.cs index fdac7873d..ae7813c98 100644 --- a/IRaCIS.Core.Application/_MediatR/Handlers/ConsistencyVerificationHandler.cs +++ b/IRaCIS.Core.Application/_MediatR/Handlers/ConsistencyVerificationHandler.cs @@ -61,7 +61,7 @@ namespace IRaCIS.Core.Application.MediatR.Handlers SiteCode = trialSite.TrialSiteCode, StudyDate = study.StudyTime == null?string.Empty: ((DateTime)study.StudyTime).ToString("yyyy-MM-dd"), StudyId = study.Id, - Modality = study.Modalities, + Modality = study.ModalityForEdit, SubjectCode = subject.Code, VisitName = sv.VisitName, }; diff --git a/IRaCIS.Core.Domain/SQLFile/Sql脚本.sql b/IRaCIS.Core.Domain/SQLFile/Sql脚本.sql index e2ae3c629..3f4c058ef 100644 --- a/IRaCIS.Core.Domain/SQLFile/Sql脚本.sql +++ b/IRaCIS.Core.Domain/SQLFile/Sql脚本.sql @@ -50,3 +50,7 @@ update VisitTask set TrialReadingCriterionId=(select top 1 Id from ReadingQue select * from EnrollReadingCategory where TrialReadingCriterionId is null select * from VisitTask where TrialReadingCriterionId is null + + update Site set Site.Code = (select b.code2 from (select Id,row_number() over(order by Site.SiteName) code2 from Site) b where b.Id =Site.Id) + update Site set SiteCode= 'S'+ RIGHT('0000'+CAST(Site.Code as varchar(10)),4) +