修改稽查
parent
f8ad6e2944
commit
507c38e719
|
@ -99,7 +99,7 @@ namespace IRaCIS.Core.Application.Service.Inspection
|
|||
//OptType = data.OptType,
|
||||
IP = data.IP,
|
||||
Reason = data.Reason,
|
||||
IsSign = data.IsSign,
|
||||
IsSign = leftfrontAuditConfig.IsHaveSign,
|
||||
SignId = data.SignId,
|
||||
ParentId = data.ParentId,
|
||||
ChildrenTypeId = data.ChildrenTypeId,
|
||||
|
|
|
@ -480,4 +480,17 @@ namespace IRaCIS.Core.Domain.Share
|
|||
HaveSigned=3
|
||||
|
||||
}
|
||||
|
||||
public enum ClinicalFileType
|
||||
{
|
||||
//既往手术
|
||||
PreviousSurgery=1,
|
||||
|
||||
//既往放疗历史
|
||||
PreviousHistory=2,
|
||||
|
||||
//其他
|
||||
PreviousOther=3
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,11 +72,13 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// </summary>
|
||||
public string Path { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<ReadingClinicalData> ReadingClinicalDataList { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
|
||||
[ForeignKey("TrialId")]
|
||||
public Trial Trial { get; set; }
|
||||
|
|
|
@ -101,7 +101,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
#region 区分
|
||||
|
||||
|
||||
// 系统文件签署
|
||||
// 系统文件签署 父层级未记录稽查(系统文档初始数据)
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SystemDocConfirmedUser)))
|
||||
{
|
||||
var entity = item.Entity as SystemDocConfirmedUser;
|
||||
|
@ -110,7 +110,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
{
|
||||
GeneralId = x.Id,
|
||||
|
||||
ObjectRelationParentId=x.SystemDocumentId
|
||||
ObjectRelationParentId = x.SystemDocumentId
|
||||
|
||||
}, new
|
||||
{
|
||||
|
@ -197,54 +197,28 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
}
|
||||
|
||||
|
||||
// 检查
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(DicomStudy)))
|
||||
{
|
||||
await InsertInspection<DicomStudy>(item.Entity as DicomStudy, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
ObjectRelationParentId=x.SubjectVisitId
|
||||
});
|
||||
}
|
||||
|
||||
// 序列
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(DicomSeries)))
|
||||
{
|
||||
var entity = item.Entity as DicomSeries;
|
||||
var dicomStudy = entity.DicomStudy.Clone();
|
||||
if (dicomStudy == null)
|
||||
{
|
||||
dicomStudy = await _dbContext.DicomStudys.AsNoTracking().FirstOrDefaultAsync(x => x.Id == entity.StudyId);
|
||||
}
|
||||
await InsertInspection<DicomSeries>(item.Entity as DicomSeries, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
ObjectRelationParentId = x.StudyId
|
||||
}, new
|
||||
{
|
||||
StudyCode = dicomStudy?.StudyCode,
|
||||
Modalities = dicomStudy?.Modalities,
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 既往手术史
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(PreviousSurgery)))
|
||||
{
|
||||
var entity = item.Entity as PreviousSurgery;
|
||||
var subjectvisit = await _dbContext.SubjectVisit.Where(x => x.Id == entity.SubjectVisitId).FirstOrDefaultAsync();
|
||||
subjectvisit = subjectvisit ?? new SubjectVisit();
|
||||
|
||||
//var subjectvisit = await _dbContext.SubjectVisit.Where(x => x.Id == entity.SubjectVisitId).FirstOrDefaultAsync();
|
||||
//subjectvisit = subjectvisit ?? new SubjectVisit();
|
||||
|
||||
await InsertInspection<PreviousSurgery>(entity, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
SiteId = subjectvisit.SiteId,
|
||||
SubjectVisitName = subjectvisit.VisitName,
|
||||
TrialId = subjectvisit.TrialId,
|
||||
SubjectId = subjectvisit.SubjectId,
|
||||
|
||||
ObjectRelationParentId=x.SubjectVisitId,
|
||||
SubjectVisitId = x.SubjectVisitId,
|
||||
|
||||
ObjectRelationParentId = x.SubjectVisitId,
|
||||
|
||||
}, new
|
||||
{
|
||||
Type = "既往手术史"
|
||||
Type = ClinicalFileType.PreviousSurgery
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -264,7 +238,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
ObjectRelationParentId = x.SubjectVisitId,
|
||||
}, new
|
||||
{
|
||||
Type = "既往放疗史"
|
||||
Type = ClinicalFileType.PreviousHistory
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -284,10 +258,13 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
ObjectRelationParentId = x.SubjectVisitId,
|
||||
}, new
|
||||
{
|
||||
Type = "其他治疗史"
|
||||
Type = ClinicalFileType.PreviousOther
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//质疑
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(QCChallenge)))
|
||||
{
|
||||
|
@ -309,7 +286,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
SubjectVisitName = subjectvisit.VisitName,
|
||||
BlindName = subjectvisit.BlindName,
|
||||
|
||||
ObjectRelationParentId=x.SubjectVisitId
|
||||
ObjectRelationParentId = x.SubjectVisitId
|
||||
}, new
|
||||
{
|
||||
ChallengeCode = entity.ChallengeCode,
|
||||
|
@ -319,9 +296,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// 一致性核查文件
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ConsistencyCheckFile)))
|
||||
{
|
||||
|
@ -329,7 +303,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
{
|
||||
CreateTime = x.CreateTime,
|
||||
|
||||
ObjectRelationParentId=x.TrialId
|
||||
ObjectRelationParentId = x.TrialId
|
||||
|
||||
});
|
||||
}
|
||||
|
@ -549,7 +523,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
}
|
||||
|
||||
|
||||
|
||||
// 签名模板
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(SystemBasicData)))
|
||||
{
|
||||
|
@ -723,28 +696,45 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
SubjectVisitId = x.Id,
|
||||
SiteId = x.SiteId,
|
||||
Reason = reason,
|
||||
|
||||
},
|
||||
//兼容之前的配置名
|
||||
new { SubjectVisitName = entity.VisitName }
|
||||
);
|
||||
}
|
||||
|
||||
// Dicom
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(DicomStudy)))
|
||||
{
|
||||
await InsertInspection<DicomStudy>(item.Entity as DicomStudy, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
ObjectRelationParentId = x.SubjectVisitId
|
||||
});
|
||||
}
|
||||
|
||||
// 序列
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(DicomSeries)))
|
||||
{
|
||||
var entity = item.Entity as DicomSeries;
|
||||
|
||||
await InsertInspection<DicomSeries>(item.Entity as DicomSeries, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
ObjectRelationParentId = x.StudyId
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
// 非Dicom
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(NoneDicomStudy)))
|
||||
{
|
||||
var entity = item.Entity as NoneDicomStudy;
|
||||
|
||||
|
||||
await InsertInspection<NoneDicomStudy>(item.Entity as NoneDicomStudy, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
ObjectRelationParentId = x.SubjectVisitId,
|
||||
|
||||
});
|
||||
|
||||
//var fileCount = await _dbContext.NoneDicomStudyFile.Where(x => x.NoneDicomStudyId == entity.Id).CountAsync();
|
||||
|
||||
|
||||
//await InsertInspection<NoneDicomStudy>(item.Entity as NoneDicomStudy, type, null, new
|
||||
//{
|
||||
// FileCount = fileCount,
|
||||
//});
|
||||
}
|
||||
|
||||
|
||||
|
@ -820,6 +810,17 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
//阅片期临床数据 父层级未记录稽查(项目临床数据设置)
|
||||
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ClinicalDataTrialSet)))
|
||||
{
|
||||
var entity = item.Entity as ClinicalDataTrialSet;
|
||||
|
||||
await InsertInspection<ClinicalDataTrialSet>(entity, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
ObjectRelationParentId = entity.TrialId,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(ReadingClinicalData)))
|
||||
{
|
||||
var entity = item.Entity as ReadingClinicalData;
|
||||
|
@ -1197,8 +1198,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
generalData.SubjectVisitId = info?.SourceSubjectVisitId != null ? info?.SourceSubjectVisitId : (info?.ReadModuleSubjectVisitId != null ? info?.ReadModuleSubjectVisitId : null);
|
||||
|
||||
//以后移除
|
||||
generalData.SiteCode = info?.TrialSiteCode?? generalData.SiteCode;
|
||||
generalData.SubjectCode = info?.SubjectCode ??generalData.SubjectCode;
|
||||
generalData.SiteCode = info?.TrialSiteCode ?? generalData.SiteCode;
|
||||
generalData.SubjectCode = info?.SubjectCode ?? generalData.SubjectCode;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1219,7 +1220,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
//以后移除
|
||||
generalData.SiteCode = info?.TrialSiteCode ?? generalData.SiteCode;
|
||||
generalData.SubjectCode = info?.SubjectCode?? generalData.SubjectCode;
|
||||
generalData.SubjectCode = info?.SubjectCode ?? generalData.SubjectCode;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1237,7 +1238,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
//以后移除
|
||||
generalData.SiteCode = info?.TrialSiteCode ?? generalData.SiteCode;
|
||||
generalData.SubjectCode = info?.SubjectCode?? generalData.SubjectCode;
|
||||
generalData.SubjectCode = info?.SubjectCode ?? generalData.SubjectCode;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue