diff --git a/IRaCIS.Core.API/appsettings.Prod_Study.json b/IRaCIS.Core.API/appsettings.Prod_Study.json new file mode 100644 index 000000000..b04f38c44 --- /dev/null +++ b/IRaCIS.Core.API/appsettings.Prod_Study.json @@ -0,0 +1,48 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + } + }, + "AliyunOSS": { + "regionId": "cn-shanghai", + "region": "oss-cn-shanghai", + "endpoint": "https://oss-cn-shanghai.aliyuncs.com", + "accessKeyId": "LTAI5tKvzs7ed3UfSpNk3xwQ", + "accessKeySecret": "zTIceGEShlZDGnLrCFfIGFE7TXVRio", + "bucketName": "zy-sir-store", + "viewEndpoint": "https://zy-sir-cache.oss-cn-shanghai.aliyuncs.com" + }, + + "ConnectionStrings": { + "RemoteNew": "Server=47.117.165.18,1434;Database=Prod_Study;User ID=sa;Password=WHxckj@2019;TrustServerCertificate=true", + "Hangfire": "Server=47.117.165.18,1434;Database=Prod_Study.hangfire;User ID=sa;Password=WHxckj@2019;TrustServerCertificate=true" + }, + + "BasicSystemConfig": { + + "OpenUserComplexPassword": false, + + "OpenSignDocumentBeforeWork": false, + + "OpenTrialRelationDelete": true, + + "OpenLoginLimit": false, + "LoginMaxFailCount": 5, + + "LoginFailLockMinutes": 30 + + }, + + "SystemEmailSendConfig": { + "Port": 465, + "Host": "smtp.qiye.aliyun.com", + "FromEmail": "study@extimaging.com", + "FromName": "study.extimaging", + "AuthorizationCode": "zhanying123", + "SiteUrl": "https://study.extimaging.com/login" + } + +} diff --git a/IRaCIS.Core.Application/Service/ImageAndDoc/ImageShareService.cs b/IRaCIS.Core.Application/Service/ImageAndDoc/ImageShareService.cs index e84fb9df6..ab21ac4fd 100644 --- a/IRaCIS.Core.Application/Service/ImageAndDoc/ImageShareService.cs +++ b/IRaCIS.Core.Application/Service/ImageAndDoc/ImageShareService.cs @@ -5,25 +5,27 @@ using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.Configuration; using IRaCIS.Core.Application.Auth; +using EasyCaching.Core; namespace IRaCIS.Core.Application.Services { [AllowAnonymous, ApiExplorerSettings(GroupName = "Image")] public class ImageShareService : BaseService, IImageShareService { - + private readonly IEasyCachingProvider _provider; private readonly IRepository _imageShareRepository; private readonly IRepository _studyRepository; private readonly IConfiguration _configuration; private readonly ITokenService _tokenService; - public ImageShareService(IRepository imageShareRepository, IRepository studyRepository, IConfiguration configuration, ITokenService tokenService) + public ImageShareService(IRepository imageShareRepository, IRepository studyRepository, IConfiguration configuration, ITokenService tokenService, IEasyCachingProvider provider) { _imageShareRepository = imageShareRepository; _studyRepository = studyRepository; _configuration = configuration; _tokenService = tokenService; + _provider = provider; } [HttpPost] @@ -110,6 +112,7 @@ namespace IRaCIS.Core.Application.Services return ResponseOutput.NotOk(_localizer["ISS_ShareExpiration"]); } + var vitrualUserId = Guid.NewGuid(); var resource = new ResourceInfo() { StudyId = imageShare.StudyId, @@ -127,7 +130,7 @@ namespace IRaCIS.Core.Application.Services })) }; - + await _provider.SetAsync(vitrualUserId.ToString(), resource.Token, TimeSpan.FromDays(7)); return ResponseOutput.Ok(resource); } diff --git a/IRaCIS.Core.Application/Service/Institution/SiteService.cs b/IRaCIS.Core.Application/Service/Institution/SiteService.cs index 3ccc8139f..137d4ffd0 100644 --- a/IRaCIS.Core.Application/Service/Institution/SiteService.cs +++ b/IRaCIS.Core.Application/Service/Institution/SiteService.cs @@ -27,7 +27,7 @@ namespace IRaCIS.Application.Services { var siteQueryable = _siteRepository - .WhereIf(!string.IsNullOrWhiteSpace(searchModel.SiteName), t => t.SiteName.Contains(searchModel.SiteName)) + .WhereIf(!string.IsNullOrWhiteSpace(searchModel.SiteName), t => t.SiteName.Contains(searchModel.SiteName)||t.SiteNameCN.Contains(searchModel.SiteName)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.AliasName), t => t.AliasName.Contains(searchModel.AliasName)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.City), t => t.City.Contains(searchModel.City)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.Country), t => t.Country.Contains(searchModel.Country)) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs index 60cc90cc6..a787d8d4f 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingImageTaskViewModel.cs @@ -3,6 +3,7 @@ using MassTransit; using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; +using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; @@ -2276,6 +2277,42 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto //public List TableQuestions { get; set; } public List Childrens { get; set; } + + [NotMapped] + public List RelevanceValueList + { + get + { + try + { + return this.RelevanceValue.Split(',').ToList(); + } + catch (Exception) + { + + return new List(); + } + } + + } + + [NotMapped] + public List ParentTriggerValueList + { + get + { + try + { + return this.ParentTriggerValue.Split(',').ToList(); + } + catch (Exception) + { + + return new List(); + } + } + + } } public class GetTrialReadingQuestionOutDto diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs index 6fad583bd..636943014 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialService.cs @@ -286,8 +286,16 @@ namespace IRaCIS.Application.Services await _repository.BatchDeleteAsync(o => o.SubjectVisit.TrialId == trialId); await _repository.BatchDeleteAsync(o => o.TrialId == trialId); + + await _repository.BatchDeleteAsync(o => o.ClinicalForm.TrialId == trialId); + await _repository.BatchDeleteAsync(o => o.ClinicalForm.TrialId == trialId); + await _repository.BatchDeleteAsync(o => o.TrialId == trialId); + await _repository.BatchDeleteAsync(o => o.TrialId == trialId); await _repository.BatchDeleteAsync(o => o.TrialReadingCriterion.TrialId == trialId); + + await _repository.BatchDeleteAsync(o => o.TrialReadingCriterion.TrialId == trialId); + await _repository.BatchDeleteAsync(o => o.TrialId == trialId); await _repository.BatchDeleteAsync(t => t.TrialId == trialId); await _repository.BatchDeleteAsync(t => t.TrialId == trialId); @@ -375,9 +383,6 @@ namespace IRaCIS.Application.Services await _repository.BatchDeleteAsync(t => t.TrialId == trialId); - - - await _repository.BatchDeleteAsync(t => t.TrialId == trialId); await _repository.BatchDeleteAsync(t => t.TrialId == trialId); await _repository.BatchDeleteAsync(t => t.TrialId == trialId); diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs index 9145bcad1..e3dc9b5c9 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialSiteService.cs @@ -194,7 +194,7 @@ namespace IRaCIS.Core.Application.Services var siteQueryable = _siteRepository.AsQueryable(true) - .WhereIf(!string.IsNullOrWhiteSpace(searchModel.SiteName), t => t.SiteName.Contains(searchModel.SiteName)) + .WhereIf(!string.IsNullOrWhiteSpace(searchModel.SiteName), t => t.SiteName.Contains(searchModel.SiteName)|| t.SiteNameCN.Contains(searchModel.SiteName)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.AliasName), t => t.AliasName.Contains(searchModel.AliasName)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.City), t => t.City.Contains(searchModel.City)) .WhereIf(!string.IsNullOrWhiteSpace(searchModel.Country), t => t.Country.Contains(searchModel.Country)) diff --git a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs index 74158eeb2..f1702dd28 100644 --- a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs +++ b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs @@ -419,12 +419,20 @@ namespace IRaCIS.Core.Application.Services item.InstanceCount = item.InstanceList.Count(); + item.Description = "Key Series"; + + var modalityList = await _repository.Where(s => thisSeriesIdIds.Contains(s.Id)).OrderBy(s => s.SeriesNumber). + ThenBy(s => s.SeriesTime).Select(x => x.Modality).Distinct().ToListAsync(); ; + item.Modality = string.Join(",", modalityList); thisVisitTaskStudy.SeriesList.Add(item); thisVisitTaskStudy.SeriesCount = thisVisitTaskStudy.SeriesList.Count(); } + + + result.Add(thisVisitTaskStudy); } diff --git a/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidusTrial.cs b/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidusTrial.cs index 7ead42443..37f656f98 100644 --- a/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidusTrial.cs +++ b/IRaCIS.Core.Domain/Reading/ReadingCriterion/CriterionNidusTrial.cs @@ -15,11 +15,14 @@ namespace IRaCIS.Core.Domain.Models [Table("CriterionNidusTrial")] public class CriterionNidusTrial : Entity, IAuditAdd { - - /// + [JsonIgnore] + [ForeignKey("CriterionId")] + public ReadingQuestionCriterionTrial TrialReadingCriterion { get; set; } + + /// /// CriterionId /// - [Required] + [Required] public Guid CriterionId { get; set; } ///