diff --git a/IRaCIS.Core.API/Audit of MINT - 副本.pdf b/IRaCIS.Core.API/Audit of MINT - 副本.pdf new file mode 100644 index 000000000..8680cc668 Binary files /dev/null and b/IRaCIS.Core.API/Audit of MINT - 副本.pdf differ diff --git a/IRaCIS.Core.API/Audit of MINT.pdf b/IRaCIS.Core.API/Audit of MINT.pdf new file mode 100644 index 000000000..8680cc668 Binary files /dev/null and b/IRaCIS.Core.API/Audit of MINT.pdf differ diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 3637f7341..50a03c6a9 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -494,7 +494,7 @@ 项目ID - + 是否勾选 @@ -559,7 +559,7 @@ 系统的ClinicalDataSetId - + 是否勾选 @@ -1099,11 +1099,6 @@ 下拉ID - - - 下拉ID - - 临床级别 diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ClinicalDataServiceViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ClinicalDataServiceViewModel.cs index a25ef623f..65ce1bb68 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ClinicalDataServiceViewModel.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ClinicalDataServiceViewModel.cs @@ -45,7 +45,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// /// 是否勾选 /// - public bool IsCheck { get; set; } + public bool IsConfirm { get; set; } } public class ClinicalDataSystemSetAddOrEdit @@ -129,7 +129,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// /// 是否勾选 /// - public bool IsCheck { get; set; } + public bool IsConfirm { get; set; } /// /// 是否来自于系统数据 diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingClinicalDataService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingClinicalDataService.cs index 16a78d990..af1e1dbc6 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingClinicalDataService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingClinicalDataService.cs @@ -79,6 +79,7 @@ namespace IRaCIS.Application.Services await _readingClinicalDataRepository.AddAsync(entity, true); + var success = await _readingClinicalDataRepository.SaveChangesAsync(); return ResponseOutput.Ok(entity.Id); } else @@ -131,9 +132,11 @@ namespace IRaCIS.Application.Services { List clinicalList = await _clinicalDataTrialSetRepository.Where(x=>x.TrialId==inDto.TrialId&&x.IsConfirm&&x.ClinicalDataSetName!= "既往局部治疗史") + .WhereIf(inDto.IsVisit,x=>x.ClinicalDataLevel == ClinicalLevel.Subject||x.ClinicalDataLevel== ClinicalLevel.SubjectVisit) + .WhereIf(!inDto.IsVisit, x => x.ClinicalDataLevel == ClinicalLevel.Subject || x.ClinicalDataLevel == ClinicalLevel.Read) //.WhereIf(inDto.ReadingClinicalDataId==null, x=> _readingClinicalDataPDFRepository.Where(y=>y.ObjectId==inDto.ObjectId&&)) - + .Select(x => new GetTrialClinicalDataSelectOutDto() { ClinicalDataLevel = x.ClinicalDataLevel, @@ -141,7 +144,6 @@ namespace IRaCIS.Application.Services ClinicalUploadType = x.ClinicalUploadType, ClinicalDataLevelName = x.ClinicalDataLevel.GetDisplayName(), ClinicalUploadTypeName = x.ClinicalUploadType.GetDisplayName(), - Id = x.Id }).ToListAsync() ; return clinicalList; diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs index e237bd4fd..138c74780 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs @@ -118,16 +118,23 @@ namespace IRaCIS.Application.Services { - var visitQuery = _subjectVisitRepository.Where(x => x.TrialId == inDto.TrialId && x.InPlan&&x.LatestScanDate!=null) + // 当前项目 最晚拍片日期不为null 中心筛选 + var visitQuery = _subjectVisitRepository.Where(x => x.TrialId == inDto.TrialId &&x.LatestScanDate!=null&&!x.IsLostVisit) .WhereIf(inDto.SiteIds.Count != 0, x => inDto.SiteIds.Contains(x.SiteId)); + + // 已经存在的访视 需要排除 var existsBubjectVisitsQuery= _readModuleRepository.Where(y => y.ReadingSetType == inDto.ReadingSetType && y.TrialId == inDto.TrialId).Select(x => x.SubjectVisitId); visitQuery = visitQuery.Where(x => !existsBubjectVisitsQuery.Contains(x.Id)) .WhereIf(inDto.ExpirationDate != null, x => x.LatestScanDate <= inDto.ExpirationDate.Value) .WhereIf(inDto.ExpirationVisitNum != null, x => x.VisitNum == inDto.ExpirationVisitNum); var subjectIdlist = await visitQuery.OrderBy(x => x.SubjectId).Select(x => x.SubjectId).Distinct().Skip((inDto.PageIndex - 1) * inDto.PageSize).Take(inDto.PageSize).ToListAsync(); + + var totalCount = visitQuery.Select(x => x.SubjectId).Distinct().Count(); + var visitlist = await visitQuery.Include(x => x.Subject).Include(x => x.TrialSite).Where(x => subjectIdlist.Contains(x.SubjectId)).ToListAsync(); + var subjectVisits = visitlist.GroupBy(x => x.SubjectId).Select(x => new { SubjectId = x.Key,