diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index d2695775..1fddd8d2 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -477,17 +477,17 @@ 截止访视 + + + 访视计划ID + + 受试者ID - - - 是否加急 - - - + 名称 @@ -2995,11 +2995,11 @@ - + - 新增或者修改 + 添加阅片期 - + diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs b/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs index 18b5e569..cc03e7bd 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs @@ -19,6 +19,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public class ReadModuleAddDto { + public Guid TrialId { get; set; } + /// /// 截止日期 /// @@ -27,22 +29,23 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// /// 截止访视 /// - public Guid? ExpirationVisit { get; set; } + public decimal? ExpirationVisit { get; set; } + + /// + /// 访视计划ID + /// + public Guid? VisitStageId { get; set; } /// /// 受试者ID /// public Guid SubjectId { get; set; } - /// - /// 是否加急 - /// - public bool? IsUrgent { get; set; } /// /// 名称 /// - public string Name { get; set; } + public string SubjectVisitName { get; set; } } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs index 42d02f62..57055513 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs @@ -141,8 +141,12 @@ namespace IRaCIS.Application.Services return GetReadModuleOutDto; } - - + /// + /// 添加阅片期 + /// + /// + /// + [HttpPost] public async Task AddReadModule(ReadModuleAddDto dto) { var visits =await _subjectVisitRepository.Where(x => x.SubjectId == dto.SubjectId && x.InPlan).Select(x => new @@ -150,6 +154,8 @@ namespace IRaCIS.Application.Services x.Id, x.LatestScanDate, x.VisitNum, + x.IsUrgent, + }).ToListAsync(); if (dto.ExpirationDate != null) @@ -159,8 +165,7 @@ namespace IRaCIS.Application.Services if (dto.ExpirationVisit != null) { - var visitstage =await _visitstageRepository.FirstOrDefaultAsync(x => x.Id == dto.ExpirationVisit); - visits = visits.Where(x => x.VisitNum <= visitstage.VisitNum).ToList(); + visits = visits.Where(x => x.VisitNum <= dto.ExpirationVisit).ToList(); } var visit = visits.OrderByDescending(x => x.VisitNum).FirstOrDefault(); @@ -171,8 +176,8 @@ namespace IRaCIS.Application.Services { SubjectId = dto.SubjectId, ModuleType = ModuleTypeEnum.Read, - IsUrgent = dto.IsUrgent, - ModuleName = dto.Name, + IsUrgent = visit.IsUrgent, + ModuleName = dto.SubjectVisitName, SubjectVisitId = visit.Id, Status = ReadModuleEnum.ImageRead, }); @@ -189,17 +194,17 @@ namespace IRaCIS.Application.Services } - /// - /// 新增或者修改 - /// - /// - /// - [HttpPost] - public async Task AddOrUpdateReadModuleService(ReadModuleAddOrEdit addOrEditReadModule) - { - var entity = await _repository.InsertOrUpdateAsync(addOrEditReadModule, true); - return ResponseOutput.Ok(entity.Id.ToString()); - } + ///// + ///// 新增或者修改 + ///// + ///// + ///// + //[HttpPost] + //public async Task AddOrUpdateReadModuleService(ReadModuleAddOrEdit addOrEditReadModule) + //{ + // var entity = await _repository.InsertOrUpdateAsync(addOrEditReadModule, true); + // return ResponseOutput.Ok(entity.Id.ToString()); + //}