diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
index 16efecd4b..37aeeb3ce 100644
--- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
+++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml
@@ -427,6 +427,86 @@
+
+
+ 页码
+
+
+
+
+ 每页大小
+
+
+
+
+ 排序字段
+
+
+
+
+ 排序字段
+
+
+
+
+ 当前页索引
+
+
+
+
+ 每页的记录条数
+
+
+
+
+ 数据总数
+
+
+
+
+ 最大长度
+
+
+
+
+ 数据
+
+
+
+
+ 截止访视
+
+
+
+
+ 项目ID
+
+
+
+
+ 阅片期名称
+
+
+
+
+ 页码
+
+
+
+
+ 每页大小
+
+
+
+
+ 排序字段
+
+
+
+
+ 排序字段
+
+
项目外部人员 录入流程相关
@@ -2352,6 +2432,13 @@
发送验证码 修改邮箱(已经登陆修改) New
+
+
+ Result 为true 的时候 认为链接没有失效
+
+
+
+
重置密码为 默认密码
@@ -2440,6 +2527,27 @@
+
+
+ 新增或者修改
+
+
+
+
+
+
+ 分页获取
+
+
+
+
+
+
+ 删除
+
+
+
+
获取读片模块
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs b/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs
index 091e8b5e1..031112417 100644
--- a/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/GetReadModuleDto.cs
@@ -9,11 +9,31 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
{
public class GetReadModuleDto
{
- public Guid TrialId { get; set; }
+ public Guid? TrialId { get; set; }
+
+ ///
+ /// 页码
+ ///
+ public int PageIndex { get; set; } = 1;
+
+ ///
+ /// 每页大小
+ ///
+ public int PageSize { get; set; } = 10;
+
+ ///
+ /// 排序字段
+ ///
+ public string? SortField { get; set; }
+
+ ///
+ /// 排序字段
+ ///
+ public bool SortAsc { get; set; } = true;
}
- public class GetReadModuleOutDto: ReadModule
- {
+ public class GetReadModuleOutDto : ReadModule
+ {
public string SubjectCode { get; set; }
@@ -25,6 +45,37 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public Guid? SiteId { get; set; }
}
+ public class GetReadModuleResultDto
+ {
+ ///
+ /// 当前页索引
+ ///
+ public int PageIndex { get; set; }
+
+ ///
+ /// 每页的记录条数
+ ///
+ public int PageSize { get; set; }
+
+ ///
+ /// 数据总数
+ ///
+ public long TotalCount { get; set; } = 0;
+
+ ///
+ /// 最大长度
+ ///
+ public int MaxLength { get; set; }
+
+ ///
+ /// 数据
+ ///
+ public List CurrentPageData { get; set; }
+
+
+ }
+
+
public class GetReadModuleDtoOut
{
diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingPeriodSetViewModel.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingPeriodSetViewModel.cs
new file mode 100644
index 000000000..ff7079dd0
--- /dev/null
+++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingPeriodSetViewModel.cs
@@ -0,0 +1,58 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Threading.Tasks;
+
+namespace IRaCIS.Core.Application.Service.Reading.Dto
+{
+ public class ReadingPeriodSetAddOrEdit : ReadingPeriodSet
+ {
+ }
+
+
+ public class ReadingPeriodSetView : ReadingPeriodSet
+ {
+
+ }
+
+ public class ReadingPeriodSetQuery
+ {
+
+ ///
+ /// 截止访视
+ ///
+ public decimal? ExpirationVisit { get; set; }
+
+ ///
+ /// 项目ID
+ ///
+ public Guid? TrialId { get; set; }
+
+ ///
+ /// 阅片期名称
+ ///
+ public string? ReadingPeriodName { get; set; }
+
+ ///
+ /// 页码
+ ///
+ public int PageIndex { get; set; } = 1;
+
+ ///
+ /// 每页大小
+ ///
+ public int PageSize { get; set; } = 10;
+
+
+ ///
+ /// 排序字段
+ ///
+ public string? SortField { get; set; }
+
+ ///
+ /// 排序字段
+ ///
+ public bool SortAsc { get; set; } = true;
+ }
+}
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs
index a169d2f84..f1f6a9c43 100644
--- a/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs
+++ b/IRaCIS.Core.Application/Service/Reading/ReadModuleService.cs
@@ -16,10 +16,14 @@ namespace IRaCIS.Application.Services
{
public IRepository _subjectVisitRepository;
- public ReadModuleService(IRepository subjectVisitRepository
+ private readonly IRepository _subjectRepository;
+
+ public ReadModuleService(IRepository subjectVisitRepository,
+ IRepository subjectRepository
)
{
_subjectVisitRepository = subjectVisitRepository;
+ this._subjectRepository = subjectRepository;
}
@@ -27,35 +31,52 @@ namespace IRaCIS.Application.Services
/// 获取读片模块
///
[HttpPost]
- public async Task> GetReadModule(GetReadModuleDto dto)
+ public async Task GetReadModule(GetReadModuleDto dto)
{
- var visits = await _subjectVisitRepository.Where(x => x.TrialId == dto.TrialId).Include(x=>x.Subject).Include(x => x.Site)
- .Select(x=>new GetReadModuleOutDto ()
- {
- CreateTime=x.CreateTime,
- Id=x.Id,
- SubjectId=x.SubjectId,
- SubjectVisitId=x.Id,
- IsUrgent=x.IsUrgent,
- ModuleName= x.InPlan?"计划内访视":"计划外访视",
- ModuleType= x.InPlan? ModuleTypeEnum.InPlanSubjectVisit: ModuleTypeEnum.OutPlanSubjectVisit,
- SubjectCode=x.Subject.Code,
- SiteCode=x.Site.SiteCode,
- SiteId=x.Site.Id,
- VisitName=x.VisitName,
- }).ToListAsync();
- var data = visits.GroupBy(x => new { x.SiteId, x.SubjectId, x.SiteCode, x.SubjectCode }).Select(x => new GetReadModuleDtoOut()
+ var subjectquery = _subjectRepository.WhereIf(dto.TrialId!=null, x => x.TrialId == dto.TrialId).Include(x => x.SubjectVisitList).Include(x=>x.Site)
+ .Select(x => new GetReadModuleDtoOut
+ {
+ SiteCode = x.Site.SiteCode,
+ SiteId = x.SiteId,
+ SubjectCode = x.Code,
+ SubjectId = x.Id,
+ Data=x.SubjectVisitList.Select(y=>new GetReadModuleOutDto()
+ {
+ CreateTime = y.CreateTime,
+ Id = y.Id,
+ SubjectId = x.Id,
+ SubjectVisitId = y.Id,
+ IsUrgent = x.IsUrgent,
+ ModuleName = y.InPlan ? "计划内访视" : "计划外访视",
+ ModuleType = y.InPlan ? ModuleTypeEnum.InPlanSubjectVisit : ModuleTypeEnum.OutPlanSubjectVisit,
+ SubjectCode = y.Subject.Code,
+ SiteCode = x.Site.SiteCode,
+ SiteId = x.Site.Id,
+ VisitName = y.VisitName,
+
+ }).ToList()
+
+ });
+
+
+ var pageList = await subjectquery.ToPagedListAsync(dto.PageIndex, dto.PageSize, dto.SortField == null ? "SiteCode" : dto.SortField,
+ dto.SortAsc);
+
+
+ GetReadModuleResultDto resultDto = new GetReadModuleResultDto()
{
+ CurrentPageData = pageList.CurrentPageData.ToList(),
+ PageSize = pageList.PageSize,
+ MaxLength = pageList.CurrentPageData.ToList().Max(x => x.Data.Count),
+ PageIndex = pageList.PageIndex,
+ TotalCount = pageList.TotalCount,
- SiteCode = x.Key.SiteCode,
- SiteId = x.Key.SiteId,
- SubjectCode = x.Key.SubjectCode,
- SubjectId = x.Key.SubjectId,
- Data = x.ToList().OrderBy(y => y.ModuleType).ToList(),
- }).ToList();
+ };
- return data;
+
+
+ return resultDto;
}
diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs
new file mode 100644
index 000000000..0b221da7e
--- /dev/null
+++ b/IRaCIS.Core.Application/Service/Reading/ReadingPeriodSetService.cs
@@ -0,0 +1,75 @@
+using IRaCIS.Application.Interfaces;
+using IRaCIS.Core.Infra.EFCore;
+using IRaCIS.Core.Domain.Share;
+using IRaCIS.Core.Application.Filter;
+using Microsoft.AspNetCore.Mvc;
+using IRaCIS.Core.Application.Service.WorkLoad.DTO;
+using Microsoft.AspNetCore.Authorization;
+using IRaCIS.Core.Application.Auth;
+using IRaCIS.Core.Application.Service.Reading.Dto;
+using IRaCIS.Core.Domain.Share.Reading;
+
+namespace IRaCIS.Application.Services
+{
+ [ApiExplorerSettings(GroupName = "Reading")]
+ public class ReadingPeriodSetService : BaseService
+ {
+
+ public IRepository _subjectVisitRepository;
+ private readonly IRepository _readingPeriodSetRepository;
+
+ public ReadingPeriodSetService(IRepository subjectVisitRepository,
+ IRepository ReadingPeriodSetRepository
+ )
+ {
+ _subjectVisitRepository = subjectVisitRepository;
+ _readingPeriodSetRepository = ReadingPeriodSetRepository;
+ }
+
+
+ ///
+ /// 新增或者修改
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task AddOrUpdateReadingPeriodSet(ReadingPeriodSetAddOrEdit addOrEditReadingPeriodSet)
+ {
+ var entity = await _repository.InsertOrUpdateAsync(addOrEditReadingPeriodSet, true);
+ return ResponseOutput.Ok(entity.Id.ToString());
+ }
+
+ ///
+ /// 分页获取
+ ///
+ ///
+ ///
+ [HttpPost]
+ public async Task> GetReadingPeriodSetList(ReadingPeriodSetQuery query)
+ {
+
+ var readquery =_readingPeriodSetRepository.AsQueryable()
+ .WhereIf(query.TrialId!=null,x=>x.TrialId==query.TrialId)
+ .WhereIf(query.ReadingPeriodName != null, x => x.ReadingPeriodName.Contains(query.ReadingPeriodName))
+ .ProjectTo(_mapper.ConfigurationProvider);
+ var pageList= await readquery.ToPagedListAsync(query.PageIndex, query.PageSize, query.SortField == null ? "CreateTime" : query.SortField,
+ query.SortAsc);
+
+ return pageList;
+ }
+
+
+
+ ///
+ /// 删除
+ ///
+ ///
+ ///
+ [HttpDelete("{readingPeriodSetId:guid}")]
+ public async Task DeleteReadingPeriodSet(Guid readingPeriodSetId)
+ {
+ var success = await _repository.BatchDeleteAsync(t => t.Id == readingPeriodSetId);
+ return ResponseOutput.Result(success);
+ }
+ }
+}
diff --git a/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
new file mode 100644
index 000000000..1c08e1152
--- /dev/null
+++ b/IRaCIS.Core.Application/Service/Reading/_MapConfig.cs
@@ -0,0 +1,21 @@
+using AutoMapper;
+using IRaCIS.Application.Contracts;
+using IRaCIS.Core.Application.Contracts;
+using IRaCIS.Core.Application.Service.Reading.Dto;
+using IRaCIS.Core.Application.ViewModel;
+using IRaCIS.Core.Domain.Models;
+
+namespace IRaCIS.Core.Application.Service
+{
+ public class ReadingConfig : Profile
+ {
+ public ReadingConfig()
+ {
+ CreateMap().ReverseMap();
+
+ CreateMap();
+
+ }
+ }
+
+}
diff --git a/IRaCIS.Core.Application/_MediatR/Handlers/ConsistencyVerificationHandler.cs b/IRaCIS.Core.Application/_MediatR/Handlers/ConsistencyVerificationHandler.cs
index 5cbf5bc43..29e1c716f 100644
--- a/IRaCIS.Core.Application/_MediatR/Handlers/ConsistencyVerificationHandler.cs
+++ b/IRaCIS.Core.Application/_MediatR/Handlers/ConsistencyVerificationHandler.cs
@@ -120,7 +120,7 @@ namespace IRaCIS.Core.Application.MediatR.Handlers
foreach (var item in sv.StudyList)
{
num++;
- dialogMsg.AppendLine($"
{num}.{item.StudyDate}{item.Modality} 在导入模板中不存在 不存在!");
+ dialogMsg.AppendLine($"
{num}.{item.StudyDate}{item.Modality} 在导入模板中不存在!");
}
dialogMsg.AppendLine(@$"
说明:为高效解决/处理以上全部质疑问题,麻烦您准确核实实际影像检查情况。请注意影像日期与实际检查的日期可能会不一致,部分检查(如PET -CT)可能同时存在多种模态影像。准确核实后,请回复该访视正确的影像检查情况。");
@@ -149,7 +149,7 @@ namespace IRaCIS.Core.Application.MediatR.Handlers
{
dialogMsg.AppendLine($"核对EDC数据,完全一致, 审核通过");
- dialogMsg.AppendLine(@$"
说明:为高效解决/处理以上全部质疑问题,麻烦您准确核实实际影像检查情况。请注意影像日期与实际检查的日期可能会不一致,部分检查(如PET -CT)可能同时存在多种模态影像。准确核实后,请回复该访视正确的影像检查情况。");
+ // dialogMsg.AppendLine(@$"
说明:为高效解决/处理以上全部质疑问题,麻烦您准确核实实际影像检查情况。请注意影像日期与实际检查的日期可能会不一致,部分检查(如PET -CT)可能同时存在多种模态影像。准确核实后,请回复该访视正确的影像检查情况。");
dbSV.CheckState = CheckStateEnum.CVPassed;
dbSV.CheckPassedTime = DateTime.Now;
dbSV.CheckResult = "核对EDC数据,完全一致";
diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
index 718d90871..5e7378294 100644
--- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
+++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs
@@ -53,4 +53,58 @@ namespace IRaCIS.Core.Domain.Share.Reading
///
Site=1,
}
+
+
+ ///
+ /// 状态
+ ///
+ public enum ReadingPeriodStatus
+ {
+ ///
+ /// 全部
+ ///
+ None = 0,
+
+ ///
+ /// 已生效
+ ///
+ TakeEffect = 1,
+
+ ///
+ /// 已撤销
+ ///
+ Revocation=2,
+ }
+
+ ///
+ /// 阅片模块状态
+ ///
+ public enum ReadModuleEnum
+ {
+ ///
+ /// 影像上传
+ ///
+ ImageUpload=0,
+
+ ///
+ /// 影像质控
+ ///
+ ImageQuality = 1,
+
+ ///
+ /// 一致性核查及分配
+ ///
+ ConsistencyCheck = 2,
+
+ ///
+ /// 影像阅片
+ ///
+ ImageRead = 3,
+
+ ///
+ /// 阅片完成
+ ///
+ ReadComplete = 4,
+
+ }
}
diff --git a/IRaCIS.Core.Domain/Reading/ReadModule.cs b/IRaCIS.Core.Domain/Reading/ReadModule.cs
index 1f6700146..60b874103 100644
--- a/IRaCIS.Core.Domain/Reading/ReadModule.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadModule.cs
@@ -43,7 +43,7 @@ namespace IRaCIS.Core.Domain.Models
///
/// 状态
///
- public int? Status { get; set; }
+ public ReadModuleEnum? Status { get; set; }
///
/// 创建时间
diff --git a/IRaCIS.Core.Domain/Reading/ReadingPeriodSet.cs b/IRaCIS.Core.Domain/Reading/ReadingPeriodSet.cs
index 49982dd5a..9a67725c7 100644
--- a/IRaCIS.Core.Domain/Reading/ReadingPeriodSet.cs
+++ b/IRaCIS.Core.Domain/Reading/ReadingPeriodSet.cs
@@ -43,12 +43,12 @@ namespace IRaCIS.Core.Domain.Models
///
/// 截止访视
///
- public decimal ExpirationVisit { get; set; }
+ public decimal? ExpirationVisit { get; set; }
///
/// 状态
///
- public int? Status { get; set; }
+ public ReadingPeriodStatus? Status { get; set; }
///
/// 创建时间