修改一版
parent
440790a01a
commit
83480730f0
|
@ -580,6 +580,11 @@
|
|||
上传方式
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataTrialSetAddOrEdit.UploadRole">
|
||||
<summary>
|
||||
上传角色
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataTrialSetAddOrEdit.IsEnable">
|
||||
<summary>
|
||||
是否启用
|
||||
|
@ -610,6 +615,11 @@
|
|||
临床级别
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataSystemSetAddOrEdit.UploadRole">
|
||||
<summary>
|
||||
上传角色
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataSystemSetAddOrEdit.ClinicalUploadType">
|
||||
<summary>
|
||||
上传方式
|
||||
|
@ -645,6 +655,11 @@
|
|||
创建人
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataTrialSetView.UploadRole">
|
||||
<summary>
|
||||
上传角色
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataTrialSetView.TrialId">
|
||||
<summary>
|
||||
项目ID
|
||||
|
@ -690,6 +705,11 @@
|
|||
上传方式
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataSystemSetView.UploadRole">
|
||||
<summary>
|
||||
上传角色
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalDataSystemSetView.CreateTime">
|
||||
<summary>
|
||||
创建时间
|
||||
|
@ -1085,6 +1105,11 @@
|
|||
临床级别
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingClinicalDataListOutDto.UploadRole">
|
||||
<summary>
|
||||
上传角色
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetReadingClinicalDataListOutDto.ClinicalUploadType">
|
||||
<summary>
|
||||
上传方式
|
||||
|
@ -1155,6 +1180,11 @@
|
|||
是否是基线
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalDataSelectIndto.UploadRole">
|
||||
<summary>
|
||||
上传角色
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.GetTrialClinicalDataSelectOutDto.ClinicalDataSetName">
|
||||
<summary>
|
||||
名称
|
||||
|
|
|
@ -96,16 +96,6 @@ namespace IRaCIS.Application.Services
|
|||
.WhereIf(inDto.ClinicalUploadType != null, x => x.ClinicalUploadType == inDto.ClinicalUploadType)
|
||||
.WhereIf(inDto.ClinicalDataSetName != String.Empty, x => x.ClinicalDataSetName.Contains(inDto.ClinicalDataSetName))
|
||||
.ProjectTo<ClinicalDataTrialSetView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
|
||||
var crcClinicalData = await _previousPDFRepository.AnyAsync(x => x.TrialId == inDto.TrialId);
|
||||
|
||||
trialClinicalDataList.ForEach(x =>
|
||||
{
|
||||
if (x.ClinicalDataSetName == "既往局部治疗史")
|
||||
{
|
||||
x.IsUsed = crcClinicalData;
|
||||
}
|
||||
});
|
||||
return trialClinicalDataList;
|
||||
|
||||
}
|
||||
|
|
|
@ -93,6 +93,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
[Required(ErrorMessage = "ReadingId为null")]
|
||||
public Guid ReadingId { get; set; }
|
||||
|
||||
public UploadRole UploadRole { get; set; }
|
||||
}
|
||||
|
||||
public class GetReadingClinicalDataPDFListIndto:PageInput
|
||||
|
@ -211,6 +213,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上传角色
|
||||
/// </summary>
|
||||
public UploadRole UploadRole { get; set; }
|
||||
|
||||
public Guid SubjectId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -148,7 +148,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
public class GetReadingPastResultListInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
[NotDefault]
|
||||
public Guid SubjectId { get; set; }
|
||||
}
|
||||
|
||||
public class SaveJudgeVisitTaskResult
|
||||
|
|
|
@ -25,14 +25,13 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
private readonly IRepository<ReadingClinicalData> _readingClinicalDataRepository;
|
||||
private readonly IRepository<ClinicalDataTrialSet> _clinicalDataTrialSetRepository;
|
||||
private readonly IRepository<ReadingClinicalDataView> _readingClinicalDataViewRepository;
|
||||
|
||||
private readonly IRepository<PreviousPDF> _previousPDFRepository;
|
||||
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
||||
private readonly IRepository<ReadingClinicalDataPDF> _readingClinicalDataPDFRepository;
|
||||
|
||||
public ReadingClinicalDataService(IRepository<ReadingClinicalData> readingClinicalDataRepository,
|
||||
IRepository<ClinicalDataTrialSet> clinicalDataTrialSetRepository,
|
||||
IRepository<ReadingClinicalDataView> readingClinicalDataViewRepository,
|
||||
IRepository<PreviousPDF> previousPDFRepository,
|
||||
IRepository<SubjectVisit> subjectVisitRepository,
|
||||
IRepository<ReadingClinicalDataPDF> readingClinicalDataPDFRepository
|
||||
|
@ -40,7 +39,6 @@ namespace IRaCIS.Application.Services
|
|||
{
|
||||
this._readingClinicalDataRepository = readingClinicalDataRepository;
|
||||
this._clinicalDataTrialSetRepository = clinicalDataTrialSetRepository;
|
||||
this._readingClinicalDataViewRepository = readingClinicalDataViewRepository;
|
||||
this._previousPDFRepository = previousPDFRepository;
|
||||
this._subjectVisitRepository = subjectVisitRepository;
|
||||
this._readingClinicalDataPDFRepository = readingClinicalDataPDFRepository;
|
||||
|
@ -194,48 +192,35 @@ namespace IRaCIS.Application.Services
|
|||
[HttpPost]
|
||||
public async Task<PageOutput<GetReadingClinicalDataListOutDto>> GetReadingClinicalDataList(GetReadingClinicalDataListIndto inDto)
|
||||
{
|
||||
var isBaseLine = await _subjectVisitRepository.AnyAsync(x => x.Id == inDto.ReadingId && x.VisitNum == 0);
|
||||
var result = await _readingClinicalDataViewRepository.Where(x=>x.SubjectId==inDto.SubjectId)
|
||||
.Where(x=>x.ReadingId==inDto.ReadingId||x.ReadingId==null)
|
||||
.WhereIf(!isBaseLine,x=>x.IsCRCUpload==false).ProjectTo<GetReadingClinicalDataListOutDto>(_mapper.ConfigurationProvider).ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField == null ? nameof(GetReadingClinicalDataListOutDto.ClinicalDataSetName) : inDto.SortField,
|
||||
inDto.Asc);
|
||||
foreach (var item in result.CurrentPageData)
|
||||
{
|
||||
item.ClinicalDataLevelName = item.ClinicalDataLevel.GetDisplayName();
|
||||
item.ClinicalUploadTypeName = item.ClinicalUploadType.GetDisplayName();
|
||||
|
||||
if (item.IsCRCUpload)
|
||||
{
|
||||
item.FileList = await _previousPDFRepository.Where(x => x.SubjectId == inDto.SubjectId).Select(y => new GetFileDto()
|
||||
var isBaseLine = await _subjectVisitRepository.AnyAsync(x => x.Id == inDto.ReadingId && x.IsBaseLine);
|
||||
var resultQuery = _readingClinicalDataRepository.Where(x => x.SubjectId == inDto.SubjectId)
|
||||
.Where(x => x.ReadingId == inDto.ReadingId)
|
||||
.WhereIf(inDto.UploadRole == UploadRole.CRC, x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC)
|
||||
.WhereIf(inDto.UploadRole == UploadRole.PM && !isBaseLine, x => x.ClinicalDataTrialSet.UploadRole == UploadRole.PM)
|
||||
.Select(x => new GetReadingClinicalDataListOutDto() {
|
||||
ClinicalDataLevel = x.ClinicalDataTrialSet.ClinicalDataLevel,
|
||||
SubjectId = x.SubjectId,
|
||||
ClinicalDataSetName = x.ClinicalDataTrialSet.ClinicalDataSetName,
|
||||
ClinicalDataTrialSetId = x.ClinicalDataTrialSetId,
|
||||
IsSign = x.IsSign,
|
||||
ClinicalUploadType = x.ClinicalDataTrialSet.ClinicalUploadType,
|
||||
Id = x.Id,
|
||||
UploadRole=x.ClinicalDataTrialSet.UploadRole,
|
||||
IsCRCUpload = x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC,
|
||||
FileList = x.ReadingClinicalDataPDFList.Select(y => new GetFileDto()
|
||||
{
|
||||
Id = y.Id,
|
||||
FileName = y.FileName,
|
||||
Path = y.Path
|
||||
}).ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item.ClinicalDataLevel != ClinicalLevel.Subject)
|
||||
{
|
||||
item.FileList = await _readingClinicalDataPDFRepository.Where(y => y.ReadingClinicalDataId == item.Id).Select(y => new GetFileDto()
|
||||
{
|
||||
Id = y.Id,
|
||||
FileName = y.FileName,
|
||||
Path = y.Path
|
||||
}).ToListAsync();
|
||||
}
|
||||
else
|
||||
{
|
||||
item.FileList = await _readingClinicalDataPDFRepository.Where(y => y.SubjectId == item.SubjectId).Select(y => new GetFileDto()
|
||||
{
|
||||
Id = y.Id,
|
||||
FileName = y.FileName,
|
||||
Path = y.Path
|
||||
}).ToListAsync();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}).ToList()
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
var result=await resultQuery.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, inDto.SortField == null ? nameof(GetReadingClinicalDataListOutDto.ClinicalDataSetName) : inDto.SortField,
|
||||
inDto.Asc);
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
private readonly IRepository<NoneDicomStudy> _noneDicomStudyRepository;
|
||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IVisitTaskHelpeService _visitTaskHelpeService;
|
||||
private readonly IRepository<SubjectVisit> _subjectVisitRepository;
|
||||
private readonly IRepository<Subject> _subjectRepository;
|
||||
|
@ -42,6 +43,7 @@ namespace IRaCIS.Application.Services
|
|||
IMapper mapper,
|
||||
IRepository<NoneDicomStudy> noneDicomStudyRepository,
|
||||
IRepository<VisitTask> visitTaskRepository,
|
||||
IRepository<Trial> TrialRepository,
|
||||
IVisitTaskHelpeService visitTaskHelpeService,
|
||||
IRepository<SubjectVisit> subjectVisitRepository,
|
||||
IRepository<Subject> subjectRepository,
|
||||
|
@ -54,6 +56,7 @@ namespace IRaCIS.Application.Services
|
|||
base._mapper = mapper;
|
||||
this._noneDicomStudyRepository = noneDicomStudyRepository;
|
||||
this._visitTaskRepository = visitTaskRepository;
|
||||
this._trialRepository = TrialRepository;
|
||||
this._visitTaskHelpeService = visitTaskHelpeService;
|
||||
this._subjectVisitRepository = subjectVisitRepository;
|
||||
this._subjectRepository = subjectRepository;
|
||||
|
@ -171,11 +174,19 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
List<NoneDicomStudyView> result=await _noneDicomStudyRepository.Where(t => visitIds.Contains(t.SubjectVisitId))
|
||||
.ProjectTo<NoneDicomStudyView>(_mapper.ConfigurationProvider, new { token = _userInfo.UserToken }).ToListAsync();
|
||||
|
||||
var trialInfo = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => new
|
||||
{
|
||||
x.IsReadingShowPreviousResults,
|
||||
x.IsReadingShowSubjectInfo,
|
||||
}).FirstOrDefaultAsync();
|
||||
return (result, new {
|
||||
VisitTaskId= task.VisistTaskId,
|
||||
SubjectId=task.SubjectId,
|
||||
SubjectCode=task.SubjectCode,
|
||||
ReadingCategory= task.ReadingCategory,
|
||||
IsReadingShowPreviousResults= trialInfo.IsReadingShowPreviousResults,
|
||||
IsReadingShowSubjectInfo=trialInfo.IsReadingShowSubjectInfo,
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -388,7 +399,7 @@ namespace IRaCIS.Application.Services
|
|||
[HttpPost]
|
||||
public async Task<List<GetReadingPastResultListOutDto>> GetReadingPastResultList(GetReadingPastResultListInDto inDto)
|
||||
{
|
||||
var readingPastResultList =await _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId && x.DoctorUserId == _userInfo.Id)
|
||||
var readingPastResultList =await _visitTaskRepository.Where(x => x.TrialId == inDto.TrialId&&x.SubjectId==inDto.SubjectId && x.DoctorUserId == _userInfo.Id)
|
||||
.ProjectTo<GetReadingPastResultListOutDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
return readingPastResultList;
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
.ForMember(d => d.SiteCodes, u => u.MapFrom(s => s.ReadingPeriodSites.Select(x => x.TrialSite.TrialSiteCode)))
|
||||
.ForMember(d => d.PlanCount, u => u.MapFrom(s => s.ReadingPeriodPlanList.Count));
|
||||
|
||||
CreateMap<ReadingClinicalDataView, GetReadingClinicalDataListOutDto>();
|
||||
//CreateMap<ReadingClinicalDataView, GetReadingClinicalDataListOutDto>();
|
||||
// CreateMap<ReadingClinicalData, GetReadingClinicalDataListOutDto>()
|
||||
//.ForMember(d => d.ClinicalDataLevel, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalDataLevel))
|
||||
//.ForMember(d => d.ClinicalDataLevelName, u => u.MapFrom(s => s.ClinicalDataTrialSet.ClinicalDataSetName))
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
using IRaCIS.Core.Domain.Share;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
@ -8,54 +7,54 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
{
|
||||
public class ReadingClinicalDataView : Entity
|
||||
{
|
||||
//public class ReadingClinicalDataView : Entity
|
||||
//{
|
||||
|
||||
/// <summary>
|
||||
/// 项目ID
|
||||
/// </summary>
|
||||
public Guid TrialId { get; set; }
|
||||
// /// <summary>
|
||||
// /// 项目ID
|
||||
// /// </summary>
|
||||
// public Guid TrialId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受试者ID
|
||||
/// </summary>
|
||||
public Guid SubjectId { get; set; }
|
||||
// /// <summary>
|
||||
// /// 受试者ID
|
||||
// /// </summary>
|
||||
// public Guid SubjectId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 阅片
|
||||
/// </summary>
|
||||
public Guid? ReadingId { get; set; }
|
||||
// /// <summary>
|
||||
// /// 阅片
|
||||
// /// </summary>
|
||||
// public Guid? ReadingId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 项目配置临床类型ID
|
||||
/// </summary>
|
||||
public Guid ClinicalDataTrialSetId { get; set; }
|
||||
// /// <summary>
|
||||
// /// 项目配置临床类型ID
|
||||
// /// </summary>
|
||||
// public Guid ClinicalDataTrialSetId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 项目配置临床类型Name
|
||||
/// </summary>
|
||||
public string ClinicalDataSetName { get; set; }
|
||||
// /// <summary>
|
||||
// /// 项目配置临床类型Name
|
||||
// /// </summary>
|
||||
// public string ClinicalDataSetName { get; set; }
|
||||
|
||||
|
||||
public ClinicalUploadType ClinicalUploadType { get; set; }
|
||||
// public ClinicalUploadType ClinicalUploadType { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 临床数据级别
|
||||
/// </summary>
|
||||
public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
// /// <summary>
|
||||
// /// 临床数据级别
|
||||
// /// </summary>
|
||||
// public ClinicalLevel ClinicalDataLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否为CRC上传
|
||||
/// </summary>
|
||||
public bool IsCRCUpload { get; set; }
|
||||
// /// <summary>
|
||||
// /// 是否为CRC上传
|
||||
// /// </summary>
|
||||
// public bool IsCRCUpload { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否签名
|
||||
/// </summary>
|
||||
public bool IsSign { get; set; }
|
||||
// /// <summary>
|
||||
// /// 是否签名
|
||||
// /// </summary>
|
||||
// public bool IsSign { get; set; }
|
||||
|
||||
}
|
||||
//}
|
||||
}
|
||||
|
|
|
@ -194,7 +194,7 @@ namespace IRaCIS.Core.Infra.EFCore
|
|||
|
||||
public virtual DbSet<ReadingQuestionTrial> ReadingQuestionTrial { get; set; }
|
||||
|
||||
public virtual DbSet<ReadingClinicalDataView> ReadingClinicalDataView { get; set; }
|
||||
//public virtual DbSet<ReadingClinicalDataView> ReadingClinicalDataView { get; set; }
|
||||
|
||||
public virtual DbSet<ReadingClinicalDataPDF> ReadingClinicalDataPDF { get; set; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue