S-33
parent
459866e924
commit
895bda2e3f
|
@ -690,9 +690,15 @@ namespace IRaCIS.Application.Services
|
||||||
.FirstOrDefaultAsync();
|
.FirstOrDefaultAsync();
|
||||||
if (readModule != null)
|
if (readModule != null)
|
||||||
{
|
{
|
||||||
var clinicalDataTrialSetIds = await _readModuleCriterionFromRepository.Where(x => x.ReadModuleId == readModule.Id).Select(x => x.ClinicalForm.ClinicalDataTrialSetId).ToListAsync();
|
var moduleCriterionFromList = await _readModuleCriterionFromRepository.Where(x => x.ReadModuleId == readModule.Id).Select(x => new{
|
||||||
|
ClinicalFormId= x.ClinicalFormId,
|
||||||
|
CheckDate= x.ClinicalForm.CheckDate,
|
||||||
|
ClinicalDataTrialSetId= x.ClinicalForm.ClinicalDataTrialSetId
|
||||||
|
|
||||||
|
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
var setIds = clinicalDataTrialSetIds.Distinct().ToList();
|
var setIds = moduleCriterionFromList.Select(x=>x.ClinicalDataTrialSetId).Distinct().ToList();
|
||||||
var clinicalresult = await _clinicalDataTrialSetRepository.Where(x => x.UploadRole == UploadRole.CRC && (x.ClinicalDataLevel == ClinicalLevel.OncologyRead || x.ClinicalDataLevel == ClinicalLevel.ImageRead))
|
var clinicalresult = await _clinicalDataTrialSetRepository.Where(x => x.UploadRole == UploadRole.CRC && (x.ClinicalDataLevel == ClinicalLevel.OncologyRead || x.ClinicalDataLevel == ClinicalLevel.ImageRead))
|
||||||
.Where(x => setIds.Contains(x.Id))
|
.Where(x => setIds.Contains(x.Id))
|
||||||
.Select(x => new GetReadingClinicalDataListOutDto()
|
.Select(x => new GetReadingClinicalDataListOutDto()
|
||||||
|
@ -727,8 +733,15 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
clinicalresult.ForEach(x =>
|
clinicalresult.ForEach(x =>
|
||||||
{
|
{
|
||||||
x.FileCount = setIds.Where(y => y == x.ClinicalDataTrialSetId).Count();
|
x.FileCount = moduleCriterionFromList.Where(y => y.ClinicalDataTrialSetId == x.ClinicalDataTrialSetId).Count();
|
||||||
x.ReadingClinicalDataState = readModule.IsPMConfirm ? ReadingClinicalDataStatus.HaveSigned : ReadingClinicalDataStatus.HaveChecked;
|
x.ClinicalFromList = moduleCriterionFromList.Where(y => y.ClinicalDataTrialSetId == x.ClinicalDataTrialSetId).OrderBy(y => y.CheckDate).Select(x => new ClinicalFromData
|
||||||
|
{
|
||||||
|
CheckDate = x.CheckDate,
|
||||||
|
ClinicalFormId = x.ClinicalFormId
|
||||||
|
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
x.ReadingClinicalDataState = readModule.IsPMConfirm ? ReadingClinicalDataStatus.HaveSigned : ReadingClinicalDataStatus.HaveChecked;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -812,51 +825,68 @@ namespace IRaCIS.Application.Services
|
||||||
var result = await resultQuery.ToListAsync();
|
var result = await resultQuery.ToListAsync();
|
||||||
|
|
||||||
// 这里处理CRC上传 阅片期的临床数据
|
// 这里处理CRC上传 阅片期的临床数据
|
||||||
var readModule = await _readModuleRepository.Where(x => x.Id == inDto.ReadingId).FirstOrDefaultAsync();
|
var readModule = await _readModuleRepository.Where(x => x.Id == inDto.ReadingId&&x.IsCRCConfirm)
|
||||||
if (readModule != null && readModule.IsCRCConfirm)
|
|
||||||
{
|
|
||||||
var clinicalDataTrialSetIds = await _readModuleCriterionFromRepository.Where(x => x.ReadModuleId == readModule.Id).Select(x => x.ClinicalForm.ClinicalDataTrialSetId).ToListAsync();
|
|
||||||
|
|
||||||
var setIds = clinicalDataTrialSetIds.Distinct().ToList();
|
.FirstOrDefaultAsync();
|
||||||
var clinicalresult = await _clinicalDataTrialSetRepository.Where(x => x.UploadRole == UploadRole.CRC && (x.ClinicalDataLevel == ClinicalLevel.OncologyRead || x.ClinicalDataLevel == ClinicalLevel.ImageRead))
|
if (readModule != null)
|
||||||
.Where(x => setIds.Contains(x.Id))
|
{
|
||||||
.Select(x => new GetReadingClinicalDataListOutDto() {
|
var moduleCriterionFromList = await _readModuleCriterionFromRepository.Where(x => x.ReadModuleId == readModule.Id).Select(x => new {
|
||||||
|
ClinicalFormId = x.ClinicalFormId,
|
||||||
|
CheckDate = x.ClinicalForm.CheckDate,
|
||||||
|
ClinicalDataTrialSetId = x.ClinicalForm.ClinicalDataTrialSetId
|
||||||
|
|
||||||
ClinicalDataLevel = x.ClinicalDataLevel,
|
|
||||||
SubjectId = inDto.SubjectId,
|
|
||||||
ReadingId = default(Guid),
|
|
||||||
ClinicalDataSetName = x.ClinicalDataSetName.LanguageName(x.ClinicalDataSetEnName, _userInfo.IsEn_Us),
|
|
||||||
ClinicalDataSetEnName = x.ClinicalDataSetEnName,
|
|
||||||
ClinicalDataTrialSetId = x.Id,
|
|
||||||
IsSign = readModule.IsPMConfirm,
|
|
||||||
ClinicalUploadType = x.ClinicalUploadType,
|
|
||||||
Id = default(Guid),
|
|
||||||
UploadRole = x.UploadRole,
|
|
||||||
IsCRCUpload = x.UploadRole == UploadRole.CRC,
|
|
||||||
IsNeedMerge=true,
|
|
||||||
ReadModuleId= readModule.Id,
|
|
||||||
//FileCount = x.FileCount,
|
|
||||||
|
|
||||||
//ReadingClinicalDataState = x.ReadingClinicalDataState,
|
}).ToListAsync();
|
||||||
|
|
||||||
//FileList = x.ReadingClinicalDataPDFList.Select(y => new GetFileDto()
|
var setIds = moduleCriterionFromList.Select(x => x.ClinicalDataTrialSetId).Distinct().ToList();
|
||||||
//{
|
var clinicalresult = await _clinicalDataTrialSetRepository.Where(x => x.UploadRole == UploadRole.CRC && (x.ClinicalDataLevel == ClinicalLevel.OncologyRead || x.ClinicalDataLevel == ClinicalLevel.ImageRead))
|
||||||
// Id = y.Id,
|
.Where(x => setIds.Contains(x.Id))
|
||||||
// FileName = y.FileName,
|
.Select(x => new GetReadingClinicalDataListOutDto()
|
||||||
// Path = y.Path,
|
{
|
||||||
// CreateTime = y.CreateTime,
|
|
||||||
//}).ToList()
|
|
||||||
|
|
||||||
}).ToListAsync();
|
ClinicalDataLevel = x.ClinicalDataLevel,
|
||||||
|
SubjectId = inDto.SubjectId,
|
||||||
|
ReadingId = default(Guid),
|
||||||
|
ClinicalDataSetName = x.ClinicalDataSetName.LanguageName(x.ClinicalDataSetEnName, _userInfo.IsEn_Us),
|
||||||
|
ClinicalDataSetEnName = x.ClinicalDataSetEnName,
|
||||||
|
ClinicalDataTrialSetId = x.Id,
|
||||||
|
IsSign = readModule.IsPMConfirm,
|
||||||
|
ClinicalUploadType = x.ClinicalUploadType,
|
||||||
|
Id = default(Guid),
|
||||||
|
UploadRole = x.UploadRole,
|
||||||
|
IsCRCUpload = x.UploadRole == UploadRole.CRC,
|
||||||
|
IsNeedMerge = true,
|
||||||
|
ReadModuleId = readModule.Id,
|
||||||
|
//FileCount = x.FileCount,
|
||||||
|
|
||||||
clinicalresult.ForEach(x => {
|
//ReadingClinicalDataState = x.ReadingClinicalDataState,
|
||||||
x.FileCount = setIds.Where(y => y == x.ClinicalDataTrialSetId).Count();
|
|
||||||
x.ReadingClinicalDataState = readModule.IsPMConfirm ? ReadingClinicalDataStatus.HaveSigned : ReadingClinicalDataStatus.HaveChecked;
|
|
||||||
|
|
||||||
});
|
//FileList = x.ReadingClinicalDataPDFList.Select(y => new GetFileDto()
|
||||||
|
//{
|
||||||
|
// Id = y.Id,
|
||||||
|
// FileName = y.FileName,
|
||||||
|
// Path = y.Path,
|
||||||
|
// CreateTime = y.CreateTime,
|
||||||
|
//}).ToList()
|
||||||
|
|
||||||
result.AddRange(clinicalresult);
|
}).ToListAsync();
|
||||||
}
|
|
||||||
|
clinicalresult.ForEach(x =>
|
||||||
|
{
|
||||||
|
x.FileCount = moduleCriterionFromList.Where(y => y.ClinicalDataTrialSetId == x.ClinicalDataTrialSetId).Count();
|
||||||
|
x.ClinicalFromList = moduleCriterionFromList.Where(y => y.ClinicalDataTrialSetId == x.ClinicalDataTrialSetId).OrderBy(y => y.CheckDate).Select(x => new ClinicalFromData
|
||||||
|
{
|
||||||
|
CheckDate = x.CheckDate,
|
||||||
|
ClinicalFormId = x.ClinicalFormId
|
||||||
|
|
||||||
|
}).ToList();
|
||||||
|
|
||||||
|
x.ReadingClinicalDataState = readModule.IsPMConfirm ? ReadingClinicalDataStatus.HaveSigned : ReadingClinicalDataStatus.HaveChecked;
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
result.AddRange(clinicalresult);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,8 +10,8 @@ using System.Threading.Tasks;
|
||||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
{
|
{
|
||||||
|
|
||||||
public class AddOrUpdateReadingClinicalDataDto
|
public class AddOrUpdateReadingClinicalDataDto
|
||||||
{
|
{
|
||||||
|
|
||||||
public Guid? Id { get; set; }
|
public Guid? Id { get; set; }
|
||||||
|
|
||||||
|
@ -127,9 +127,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public List<PreviousOtherView> PreviousOtherList { get; set; }
|
public List<PreviousOtherView> PreviousOtherList { get; set; }
|
||||||
|
|
||||||
public List<PreviousSurgeryView> PreviousSurgeryList{ get; set; }
|
public List<PreviousSurgeryView> PreviousSurgeryList { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -137,7 +137,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public class GetCRCClinicalDataInDto
|
public class GetCRCClinicalDataInDto
|
||||||
{
|
{
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid SubjectVisitId { get; set; }
|
public Guid SubjectVisitId { get; set; }
|
||||||
|
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid TrialId { get; set; }
|
public Guid TrialId { get; set; }
|
||||||
|
@ -163,7 +163,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 文件名称
|
/// 文件名称
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string FileName { get; set; }
|
public string FileName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 路径
|
/// 路径
|
||||||
|
@ -195,9 +195,9 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取访视列表
|
/// 获取访视列表
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class GetReadingClinicalDataListIndto
|
public class GetReadingClinicalDataListIndto
|
||||||
{
|
{
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid SubjectId { get; set; }
|
public Guid SubjectId { get; set; }
|
||||||
[NotDefault]
|
[NotDefault]
|
||||||
public Guid ReadingId { get; set; }
|
public Guid ReadingId { get; set; }
|
||||||
|
@ -220,7 +220,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public bool IsBaseLine { get; set; }
|
public bool IsBaseLine { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetReadingClinicalDataPDFListIndto:PageInput
|
public class GetReadingClinicalDataPDFListIndto : PageInput
|
||||||
{
|
{
|
||||||
public Guid ReadingClinicalDataId { get; set; }
|
public Guid ReadingClinicalDataId { get; set; }
|
||||||
}
|
}
|
||||||
|
@ -283,7 +283,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
|
|
||||||
public class PMClinicalDataConfirmCommand
|
public class PMClinicalDataConfirmCommand
|
||||||
{
|
{
|
||||||
public Guid Id { get; set; }
|
public Guid Id { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -365,13 +365,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public bool IsNeedMerge { get; set; } = false;
|
public bool IsNeedMerge { get; set; } = false;
|
||||||
|
|
||||||
public Guid ReadModuleId { get; set; }
|
public Guid ReadModuleId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 是否签名
|
/// 是否签名
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsSign { get; set; }
|
public bool IsSign { get; set; }
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -399,6 +399,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
// }
|
// }
|
||||||
//}
|
//}
|
||||||
|
|
||||||
|
public List<ClinicalFromData> ClinicalFromList { get; set; }
|
||||||
|
|
||||||
public List<GetFileDto> FileList { get; set; } = new List<GetFileDto>();
|
public List<GetFileDto> FileList { get; set; } = new List<GetFileDto>();
|
||||||
|
|
||||||
|
|
||||||
|
@ -408,6 +410,19 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class ClinicalFromData
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 表单Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid ClinicalFormId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 检查日期
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? CheckDate { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
public class GetFileDto
|
public class GetFileDto
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue