阅片期稽查记录
This commit is contained in:
@@ -1,15 +1,7 @@
|
||||
using IRaCIS.Application.Interfaces;
|
||||
using IRaCIS.Core.Infra.EFCore;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Application.Filter;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
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 MassTransit;
|
||||
using Panda.DynamicWebApi.Attributes;
|
||||
using IRaCIS.Core.Application.Contracts;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using System.Linq.Dynamic.Core;
|
||||
using IRaCIS.Core.Application.Service;
|
||||
@@ -71,89 +63,6 @@ namespace IRaCIS.Application.Services
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取读片计划列表 byZhouhang
|
||||
/// </summary>
|
||||
/// <param name="dto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<(PageOutput<ReadPlanView>, object)> GetReadPlanList(GetReadModuleDto dto)
|
||||
{
|
||||
var subjectQuery = _subjectRepository
|
||||
.WhereIf(dto.TrialId != null, x => x.TrialId == dto.TrialId)
|
||||
.WhereIf(dto.SubjectId != null, x => x.Id == dto.SubjectId)
|
||||
.WhereIf(dto.TrialSiteCode != null, x => x.TrialSite.TrialSiteCode == dto.TrialSiteCode)
|
||||
.WhereIf(dto.SubjectCode != null, x => x.Code == dto.SubjectCode)
|
||||
|
||||
|
||||
|
||||
.Select(x => new ReadPlanView
|
||||
{
|
||||
TrialSiteCode = x.TrialSite.TrialSiteCode,
|
||||
SiteCode = x.TrialSite.TrialSiteCode,
|
||||
SiteId = x.SiteId,
|
||||
SubjectCode = x.Code,
|
||||
SubjectId = x.Id,
|
||||
|
||||
//Data = x.SubjectVisitList.OrderByDescending(y => y.VisitNum).Select(y => new GetReadModuleOutDto()
|
||||
//{
|
||||
// Id = y.Id, //id
|
||||
// Name = y.VisitName,
|
||||
// ModuleType = y.InPlan ? ModuleTypeEnum.InPlanSubjectVisit : ModuleTypeEnum.OutPlanSubjectVisit, // 模块类型
|
||||
// IsUrgent = x.IsUrgent, // 是否加急
|
||||
// SubjectVisitId = y.Id, // 访视ID
|
||||
// SubjectVisitName = y.VisitName, // 访视名称
|
||||
// Status = ReadingCommon.GetVisitSubmitStateEnum(y), // 状态
|
||||
// CreateTime = y.CreateTime, // 创建时间
|
||||
// SubjectCode = y.Subject.Code, // 受试者code
|
||||
// TrialSiteCode = x.TrialSite.TrialSiteCode, // 中心Code
|
||||
// VisitNum = y.VisitNum,
|
||||
|
||||
// IsFinalVisit = y.IsFinalVisit, // 是否为末次评估
|
||||
// OutPlanPreviousVisitId = y.OutPlanPreviousVisitId, // 上一访视
|
||||
// OutPlanPreviousVisitName = y.OutPlanPreviousVisit.VisitName, // 上一访视名称
|
||||
// SiteId = x.Site.Id, // 中心ID
|
||||
// IsVisit = true, // 是否为访视
|
||||
// PDState = y.PDState, // PD 进展
|
||||
// IsEnrollmentConfirm = y.IsEnrollmentConfirm, // 入组
|
||||
// SubjectId = x.Id,
|
||||
//}).ToList(),
|
||||
|
||||
//ReadModuleData = x.ReadModuleList.Select(
|
||||
// z => new GetReadModuleOutDto()
|
||||
// {
|
||||
// CreateTime = z.CreateTime,
|
||||
// Id = z.Id,
|
||||
// Name = z.ModuleName,
|
||||
// SubjectId = x.Id,
|
||||
// ModuleType = z.ModuleType,
|
||||
// Status = ReadingCommon.GetVisitSubmitStateEnum(z.SubjectVisit),
|
||||
// SubjectCode = x.Code,
|
||||
// TrialSiteCode = x.TrialSite.TrialSiteCode,
|
||||
// SubjectVisitId = z.SubjectVisitId,
|
||||
// SubjectVisitName = z.SubjectVisit.VisitName, // 截止访视名称
|
||||
// CutOffVisitId = z.SubjectVisitId, // 截止访视
|
||||
// CutOffVisitName = z.SubjectVisit.VisitName, // 截止访视名称
|
||||
// ReadModuleId = z.ReadModuleId,
|
||||
// ReadModuleName = z.ReadModuleModel.ModuleName,
|
||||
// IsUrgent = z.IsUrgent
|
||||
// }).ToList(),
|
||||
|
||||
});
|
||||
|
||||
var pageList = await subjectQuery.ToPagedListAsync(dto.PageIndex, dto.PageSize, dto.SortField == null || dto.SortField == string.Empty ? "SiteCode" : dto.SortField,
|
||||
dto.Asc);
|
||||
|
||||
return (pageList, new
|
||||
{
|
||||
MaxLength = pageList.CurrentPageData.ToList().Count()
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取读片模块
|
||||
/// </summary>
|
||||
@@ -215,17 +124,6 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
|
||||
|
||||
|
||||
///// <summary>
|
||||
///// 访视阅片完成添加阅片期模块
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//public async Task<IResponseOutput> VisitFinishReadingAddReadModule(VisitFinishReadingAddReadModuleInDto inDto)
|
||||
//{
|
||||
// var subjectVisit = await _subjectRepository.FirstOrDefaultNoTrackingAsync(x => x.Id == inDto.SubjectVisitId);
|
||||
// List<ReadingPeriodSet> readingPeriodSets= _readingPeriodSetRepository.Where(x=>x.TrialId==inDto.TrialId&&x.IsTakeEffect=&&(x.ReadingScope==ReadingScopeEnum.All||(x.ReadingScope==ReadingScopeEnum.Site&&x.ReadingPeriodSites.Select(y=>y.SiteId).Contains(subjectVisit.SiteId))))
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 获取单条详情信息
|
||||
/// </summary>
|
||||
@@ -445,18 +343,6 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 新增或者修改
|
||||
///// </summary>
|
||||
///// <param name="addOrEditReadModule"></param>
|
||||
///// <returns></returns>
|
||||
//[HttpPost]
|
||||
//public async Task<IResponseOutput> AddOrUpdateReadModuleService(ReadModuleAddOrEdit addOrEditReadModule)
|
||||
//{
|
||||
// var entity = await _repository.InsertOrUpdateAsync<ReadModule, ReadModuleAddOrEdit>(addOrEditReadModule, true);
|
||||
// return ResponseOutput.Ok(entity.Id.ToString());
|
||||
//}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -446,6 +446,7 @@ namespace IRaCIS.Application.Services
|
||||
{
|
||||
TaskState = TaskState.Adbandon
|
||||
});
|
||||
|
||||
await _readModuleRepository.DeleteFromQueryAsync(x => x.ReadingPeriodSetId == indto.Id);
|
||||
}
|
||||
|
||||
@@ -469,8 +470,10 @@ namespace IRaCIS.Application.Services
|
||||
[HttpDelete("{readingPeriodSetId:guid}")]
|
||||
public async Task<IResponseOutput> DeleteReadingPeriodSet(Guid readingPeriodSetId)
|
||||
{
|
||||
var success = await _repository.BatchDeleteAsync<ReadingPeriodSet>(t => t.Id == readingPeriodSetId);
|
||||
return ResponseOutput.Result(success);
|
||||
await _readingPeriodSetRepository.DeleteFromQueryAsync(t => t.Id == readingPeriodSetId,true);
|
||||
await _readingPeriodPlanRepository.DeleteFromQueryAsync(t => t.ReadingPeriodSetId == readingPeriodSetId, true);
|
||||
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -433,8 +433,10 @@ namespace IRaCIS.Application.Services
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// optType 0表示回退,回退之后,列表没这条数据了, 1表示出组,需要填写出组时间
|
||||
/// optType 0表示入组,列表没这条数据了, 1表示出组,需要填写出组时间 废弃
|
||||
/// </summary>
|
||||
/// <param name="trialId"></param>
|
||||
/// <param name="doctorId"></param>
|
||||
@@ -444,6 +446,7 @@ namespace IRaCIS.Application.Services
|
||||
[HttpPost("{trialId:guid}/{doctorId:guid}/{optType:int}")]
|
||||
[TypeFilter(typeof(TrialResourceFilter))]
|
||||
[Authorize(Policy = IRaCISPolicy.PM_APM_SPM_CPM)]
|
||||
[Obsolete]
|
||||
public async Task<IResponseOutput> EnrollBackOrOut(Guid trialId, Guid doctorId, int optType, DateTime? outEnrollTime)
|
||||
{
|
||||
var intoGroupItem = await _enrollRepository.FirstOrDefaultAsync(t => t.TrialId == trialId && t.DoctorId == doctorId);
|
||||
|
||||
Reference in New Issue
Block a user