修改临床数据NA

Test.EIImageViewer
hang 2023-03-03 17:11:35 +08:00
parent 372fa13239
commit d21632dbef
1 changed files with 20 additions and 3 deletions

View File

@ -1691,6 +1691,8 @@ namespace IRaCIS.Core.Infra.EFCore.Common
var entity = item.Entity as ReadingClinicalData;
var config= await _dbContext.ClinicalDataTrialSet.FindAsync(entity.ClinicalDataTrialSetId);
await InsertInspection<ReadingClinicalData>(item.Entity as ReadingClinicalData, type, x => new InspectionConvertDTO()
{
@ -1701,7 +1703,7 @@ namespace IRaCIS.Core.Infra.EFCore.Common
ObjectRelationParentId = entity.ClinicalDataTrialSetId,
//ObjectRelationParentId2 = x.IsVisit == false?x.ReadingId:null
}); ;
},new {FileCountViewStr= config?.ClinicalDataLevel==ClinicalLevel.Subject && config?.ClinicalUploadType==ClinicalUploadType.Table?"NA": entity.FileCount.ToString() });
}
//阅片期计划
@ -2622,8 +2624,23 @@ namespace IRaCIS.Core.Infra.EFCore.Common
{
var info = await _dbContext.Subject.Where(x => x.Id == generalData.SubjectId).Select(x => new { SubjectId = x.Id, x.SiteId, x.TrialId, SubjectCode = x.Code, TrialSiteCode = x.TrialSite.TrialSiteCode }).FirstOrDefaultAsync();
generalData.TrialId = info?.TrialId ?? generalData.TrialId;
generalData.SiteId = info?.SiteId ?? generalData.SiteId;
if (info == null)
{
var subject= _dbContext.Subject.Find(generalData.SubjectId);
generalData.TrialId = subject?.TrialId;
generalData.SiteId = subject?.SiteId;
}
else
{
generalData.TrialId = info?.TrialId ?? generalData.TrialId;
generalData.SiteId = info?.SiteId ?? generalData.SiteId;
}
//以后移除
generalData.SiteCode = info?.TrialSiteCode ?? generalData.SiteCode;