修改
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
d0828ddf0e
commit
819dfe9b68
|
@ -681,6 +681,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
{
|
{
|
||||||
var readingNameOrTaskBlindName = string.Empty;
|
var readingNameOrTaskBlindName = string.Empty;
|
||||||
var subjectCode = string.Empty;
|
var subjectCode = string.Empty;
|
||||||
|
inDto.IsGetTaskClinicalData = true;
|
||||||
if (inDto.ReadingId == null)
|
if (inDto.ReadingId == null)
|
||||||
{
|
{
|
||||||
var visitTask = await _visitTaskRepository.AsQueryable().Include(x => x.Subject)
|
var visitTask = await _visitTaskRepository.AsQueryable().Include(x => x.Subject)
|
||||||
|
@ -701,23 +702,6 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var readingIds = result.Select(x => x.ReadingId).ToList();
|
|
||||||
|
|
||||||
var previousHistoryList = await _previousHistoryRepository.Where(x => readingIds.Contains(x.SubjectVisitId)).ProjectTo<PreviousHistoryView>(_mapper.ConfigurationProvider).ToListAsync();
|
|
||||||
var previousOtherList = await _previousOtherRepository.Where(x => readingIds.Contains(x.SubjectVisitId)).ProjectTo<PreviousOtherView>(_mapper.ConfigurationProvider).ToListAsync();
|
|
||||||
var previousSurgeryList = await _previousSurgeryRepository.Where(x => readingIds.Contains(x.SubjectVisitId)).ProjectTo<PreviousSurgeryView>(_mapper.ConfigurationProvider).ToListAsync();
|
|
||||||
foreach (var item in result)
|
|
||||||
{
|
|
||||||
item.ClinicalTableData = new ClinicalDataTable()
|
|
||||||
{
|
|
||||||
PreviousHistoryList = previousHistoryList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
|
|
||||||
PreviousOtherList = previousOtherList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
|
|
||||||
PreviousSurgeryList = previousSurgeryList.Where(x => x.ClinicalDataTrialSetId == item.ClinicalDataTrialSetId).ToList(),
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
Dictionary<ClinicalLevel, int> keys = new Dictionary<ClinicalLevel, int>() {
|
Dictionary<ClinicalLevel, int> keys = new Dictionary<ClinicalLevel, int>() {
|
||||||
{ClinicalLevel.SubjectVisit,0 },
|
{ClinicalLevel.SubjectVisit,0 },
|
||||||
{ClinicalLevel.ImageRead,2 },
|
{ClinicalLevel.ImageRead,2 },
|
||||||
|
@ -809,6 +793,19 @@ namespace IRaCIS.Core.Application.Service
|
||||||
isSelfAnalysis = true;
|
isSelfAnalysis = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//下面改用readingIdList筛选 不然
|
||||||
|
List<Guid> readingIdList = new List<Guid>() {};
|
||||||
|
if (inDto.IsGetTaskClinicalData)
|
||||||
|
{
|
||||||
|
var subjectVisit = await _subjectVisitRepository.Where(x => x.Id == inDto.ReadingId.Value).FirstOrDefaultAsync();
|
||||||
|
if (subjectVisit != null && !subjectVisit.IsBaseLine)
|
||||||
|
{
|
||||||
|
var baseId = await _subjectVisitRepository.Where(x => x.SubjectId == subjectVisit.SubjectId && x.IsBaseLine).Select(x => x.Id).FirstOrDefaultAsync();
|
||||||
|
readingIdList.Add(baseId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 一致性分析
|
// 一致性分析
|
||||||
if (isSelfAnalysis)
|
if (isSelfAnalysis)
|
||||||
{
|
{
|
||||||
|
@ -817,7 +814,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId)
|
.WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId)
|
||||||
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
|
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
|
||||||
.WhereIf(inDto.SelectIsSign, x => x.IsSign == true)
|
.WhereIf(inDto.SelectIsSign, x => x.IsSign == true)
|
||||||
.Where(x => x.ReadingId == inDto.ReadingId)
|
.Where(x => x.ReadingId == inDto.ReadingId||(readingIdList.Contains(x.ReadingId)&&x.ClinicalDataTrialSet.ClinicalDataLevel== ClinicalLevel.Subject))
|
||||||
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
|
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
|
||||||
.Select(x => new GetReadingClinicalDataListOutDto()
|
.Select(x => new GetReadingClinicalDataListOutDto()
|
||||||
{
|
{
|
||||||
|
@ -858,7 +855,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId)
|
.WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId)
|
||||||
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
|
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
|
||||||
.WhereIf(inDto.SelectIsSign, x => x.IsSign == true)
|
.WhereIf(inDto.SelectIsSign, x => x.IsSign == true)
|
||||||
.Where(x => x.ReadingId == inDto.ReadingId)
|
.Where(x => x.ReadingId == inDto.ReadingId || (readingIdList.Contains(x.ReadingId) && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject))
|
||||||
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
|
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
|
||||||
.Where(x => x.ClinicalDataTrialSet.ClinicalUploadType != ClinicalUploadType.PDF || x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Study)
|
.Where(x => x.ClinicalDataTrialSet.ClinicalUploadType != ClinicalUploadType.PDF || x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Study)
|
||||||
.Select(x => new GetReadingClinicalDataListOutDto()
|
.Select(x => new GetReadingClinicalDataListOutDto()
|
||||||
|
@ -901,7 +898,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
.WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId)
|
.WhereIf(inDto.ReadingClinicalDataId != null, x => x.Id == inDto.ReadingClinicalDataId)
|
||||||
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
|
.WhereIf(inDto.ClinicalDataTrialSetId != null, x => x.ClinicalDataTrialSetId == inDto.ClinicalDataTrialSetId)
|
||||||
.WhereIf(inDto.SelectIsSign, x => x.IsSign == true)
|
.WhereIf(inDto.SelectIsSign, x => x.IsSign == true)
|
||||||
.Where(x => x.ReadingId == inDto.ReadingId)
|
.Where(x => x.ReadingId == inDto.ReadingId || (readingIdList.Contains(x.ReadingId) && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject))
|
||||||
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
|
.WhereIf(inDto.TrialReadingCriterionId != null, x => x.ClinicalDataTrialSet.TrialClinicalDataSetCriteriaList.Any(t => t.TrialReadingCriterionId == inDto.TrialReadingCriterionId))
|
||||||
.Select(x => new GetReadingClinicalDataListOutDto()
|
.Select(x => new GetReadingClinicalDataListOutDto()
|
||||||
{
|
{
|
||||||
|
@ -1061,9 +1058,9 @@ namespace IRaCIS.Core.Application.Service
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var previousHistoryList = await _previousHistoryRepository.Where(x => x.SubjectVisitId == inDto.ReadingId).ProjectTo<PreviousHistoryView>(_mapper.ConfigurationProvider).ToListAsync();
|
var previousHistoryList = await _previousHistoryRepository.Where(x => x.SubjectVisitId == inDto.ReadingId || (readingIdList.Contains(x.SubjectVisitId) && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject)).ProjectTo<PreviousHistoryView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
var previousOtherList = await _previousOtherRepository.Where(x => x.SubjectVisitId == inDto.ReadingId).ProjectTo<PreviousOtherView>(_mapper.ConfigurationProvider).ToListAsync();
|
var previousOtherList = await _previousOtherRepository.Where(x => x.SubjectVisitId == inDto.ReadingId || (readingIdList.Contains(x.SubjectVisitId) && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject)).ProjectTo<PreviousOtherView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
var previousSurgeryList = await _previousSurgeryRepository.Where(x => x.SubjectVisitId == inDto.ReadingId).ProjectTo<PreviousSurgeryView>(_mapper.ConfigurationProvider).ToListAsync();
|
var previousSurgeryList = await _previousSurgeryRepository.Where(x => x.SubjectVisitId == inDto.ReadingId || (readingIdList.Contains(x.SubjectVisitId) && x.ClinicalDataTrialSet.ClinicalDataLevel == ClinicalLevel.Subject)).ProjectTo<PreviousSurgeryView>(_mapper.ConfigurationProvider).ToListAsync();
|
||||||
|
|
||||||
foreach (var item in result)
|
foreach (var item in result)
|
||||||
{
|
{
|
||||||
|
|
|
@ -259,6 +259,11 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsGetAllConsistencyAnalysis { get; set; } = true;
|
public bool IsGetAllConsistencyAnalysis { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否是阅片页面获取临床数据 (阅片其他访视任务需要获取受试者级别的)
|
||||||
|
/// </summary>
|
||||||
|
public bool IsGetTaskClinicalData { get; set; } = false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetConsistencyAnalysisReadingClinicalDataListInDto
|
public class GetConsistencyAnalysisReadingClinicalDataListInDto
|
||||||
|
|
|
@ -7,6 +7,11 @@ public class PreviousHistory : BaseAddAuditEntity
|
||||||
#region 导航属性
|
#region 导航属性
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public SubjectVisit SubjectVisit { get; set; }
|
public SubjectVisit SubjectVisit { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("ClinicalDataTrialSetId")]
|
||||||
|
|
||||||
|
public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
public DateTime? StartTime { get; set; }
|
public DateTime? StartTime { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,11 @@ public class PreviousOther : BaseAddAuditEntity
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public SubjectVisit SubjectVisit { get; set; }
|
public SubjectVisit SubjectVisit { get; set; }
|
||||||
|
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("ClinicalDataTrialSetId")]
|
||||||
|
|
||||||
|
public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public DateTime? StartTime { get; set; }
|
public DateTime? StartTime { get; set; }
|
||||||
|
|
|
@ -6,10 +6,14 @@ public class PreviousSurgery : BaseAddAuditEntity
|
||||||
{
|
{
|
||||||
|
|
||||||
#region 导航属性
|
#region 导航属性
|
||||||
|
[JsonIgnore]
|
||||||
|
[ForeignKey("ClinicalDataTrialSetId")]
|
||||||
|
|
||||||
|
public ClinicalDataTrialSet ClinicalDataTrialSet { get; set; }
|
||||||
#endregion
|
#endregion
|
||||||
public DateTime? OperationTime { get; set; }
|
public DateTime? OperationTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public Guid SubjectVisitId { get; set; }
|
public Guid SubjectVisitId { get; set; }
|
||||||
|
|
||||||
public bool IsSubjectLevel { get; set; }
|
public bool IsSubjectLevel { get; set; }
|
||||||
|
|
Loading…
Reference in New Issue