S-002 临床数据修改
parent
7f966b0a24
commit
c67dcb1d5c
|
@ -433,20 +433,24 @@ namespace IRaCIS.Core.Application.Service
|
|||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<GetCRCConfirmListOutDto>> GetCRCConfirmList(GetCRCConfirmListInDto inDto)
|
||||
public async Task<PageOutput<GetCRCConfirmListOutDto>> GetCRCConfirmList(GetCRCConfirmListInDto inDto)
|
||||
{
|
||||
List<GetCRCConfirmListOutDto> result = await _readModuleRepository.Where(x => x.TrialId == inDto.TrialId)
|
||||
.WhereIf(inDto.ReadModuleId!=null,x=>x.Id==inDto.ReadModuleId)
|
||||
.Select(x => new GetCRCConfirmListOutDto()
|
||||
{
|
||||
SubjectId= x.SubjectId,
|
||||
IsCRCConfirm = x.IsCRCConfirm,
|
||||
LatestScanDate = x.SubjectVisit.LatestScanDate,
|
||||
ReadingSetType = x.ReadingSetType,
|
||||
IsPMConfirm = x.IsPMConfirm,
|
||||
SubjectCode=x.Subject.Code,
|
||||
ReadModuleId = x.Id,
|
||||
}).OrderBy(x => x.LatestScanDate).ToListAsync();
|
||||
var query = _readModuleRepository.Where(x => x.TrialId == inDto.TrialId)
|
||||
.WhereIf(inDto.ReadModuleId != null, x => x.Id == inDto.ReadModuleId)
|
||||
.Select(x => new GetCRCConfirmListOutDto()
|
||||
{
|
||||
SubjectId = x.SubjectId,
|
||||
IsCRCConfirm = x.IsCRCConfirm,
|
||||
LatestScanDate = x.SubjectVisit.LatestScanDate,
|
||||
ReadingSetType = x.ReadingSetType,
|
||||
IsPMConfirm = x.IsPMConfirm,
|
||||
SubjectCode = x.Subject.Code,
|
||||
ReadModuleId = x.Id,
|
||||
});
|
||||
|
||||
|
||||
var result = await query.ToPagedListAsync(inDto.PageIndex, inDto.PageSize, string.IsNullOrWhiteSpace(inDto.SortField) ? nameof(GetCRCConfirmListOutDto.LatestScanDate) : inDto.SortField, inDto.Asc);
|
||||
|
||||
var formList = await _clinicalFormRepository.Where(x => x.TrialId == inDto.TrialId)
|
||||
.Where(x => x.ClinicalDataTrialSet.UploadRole == UploadRole.CRC)
|
||||
.Where(x => x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.ImageRead || x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.OncologyRead)
|
||||
|
@ -461,7 +465,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
ClinicalDataSetEnName=x.ClinicalDataTrialSet.ClinicalDataSetEnName,
|
||||
}).ToListAsync();
|
||||
var confirmList = await _readModuleCriterionFromRepository.Where(x => x.TrialId == inDto.TrialId).Include(x=>x.ClinicalForm).Include(x=>x.ClinicalForm.ClinicalDataTrialSet).ToListAsync();
|
||||
result.ForEach(x =>
|
||||
result.CurrentPageData.ForEach(x =>
|
||||
{
|
||||
if (x.IsCRCConfirm)
|
||||
{
|
||||
|
@ -516,8 +520,10 @@ namespace IRaCIS.Core.Application.Service
|
|||
{
|
||||
ReadModuleId = inDto.ReadModuleId,
|
||||
TrialId = inDto.TrialId,
|
||||
PageIndex=1,
|
||||
PageSize=9999,
|
||||
|
||||
})).SelectMany(x => x.ClinicalFormIdList).ToList();
|
||||
})).CurrentPageData.SelectMany(x => x.ClinicalFormIdList).ToList();
|
||||
|
||||
result.ForEach(x => {
|
||||
|
||||
|
|
|
@ -99,7 +99,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public string Answer { get; set; } = string.Empty;
|
||||
}
|
||||
|
||||
public class GetCRCConfirmListInDto
|
||||
public class GetCRCConfirmListInDto:PageInput
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
|
|
Loading…
Reference in New Issue