S-33
parent
aacce0b453
commit
fb118d88f1
|
@ -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
|
||||||
|
|
||||||
var setIds = clinicalDataTrialSetIds.Distinct().ToList();
|
|
||||||
|
}).ToListAsync();
|
||||||
|
|
||||||
|
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,7 +733,14 @@ 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.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;
|
x.ReadingClinicalDataState = readModule.IsPMConfirm ? ReadingClinicalDataStatus.HaveSigned : ReadingClinicalDataStatus.HaveChecked;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -812,15 +825,24 @@ 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();
|
||||||
|
if (readModule != null)
|
||||||
|
{
|
||||||
|
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 = 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()
|
||||||
|
{
|
||||||
|
|
||||||
ClinicalDataLevel = x.ClinicalDataLevel,
|
ClinicalDataLevel = x.ClinicalDataLevel,
|
||||||
SubjectId = inDto.SubjectId,
|
SubjectId = inDto.SubjectId,
|
||||||
|
@ -849,8 +871,16 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
}).ToListAsync();
|
}).ToListAsync();
|
||||||
|
|
||||||
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.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;
|
x.ReadingClinicalDataState = readModule.IsPMConfirm ? ReadingClinicalDataStatus.HaveSigned : ReadingClinicalDataStatus.HaveChecked;
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
@ -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