修改临床数据
parent
346c0e1d76
commit
4640600df1
|
@ -22,6 +22,7 @@ namespace IRaCIS.Application.Services
|
|||
//_cache = cache;
|
||||
}
|
||||
|
||||
[UnitOfWork]
|
||||
public async Task<string> Get()
|
||||
{
|
||||
|
||||
|
@ -51,12 +52,23 @@ namespace IRaCIS.Application.Services
|
|||
//var needAddVisitList = await _repository.Where<VisitTask>(t => t.TrialId == Guid.Empty).DistinctBy(t => t.VisitTaskNum).ToListAsync();
|
||||
|
||||
|
||||
await _repository.BatchUpdateAsync<VisitTask>(t => t.Id == Guid.Empty, u => new VisitTask()
|
||||
{
|
||||
SuggesteFinishedTime = u.IsUrgent ? DateTime.Now.AddDays(2) : DateTime.Now.AddDays(7),
|
||||
//await _repository.BatchUpdateAsync<VisitTask>(t => t.Id == Guid.Empty, u => new VisitTask()
|
||||
//{
|
||||
// SuggesteFinishedTime = u.IsUrgent ? DateTime.Now.AddDays(2) : DateTime.Now.AddDays(7),
|
||||
|
||||
Code = u.Code + 1
|
||||
});
|
||||
// Code = u.Code + 1
|
||||
//});
|
||||
|
||||
|
||||
var list = await _repository.Where<ClinicalDataTrialSet>(t => t.TrialId == Guid.Parse("40400000-3e2c-0016-239b-08da581f0e74")).ToListAsync();
|
||||
|
||||
//await _repository.BatchDeleteAsync<ClinicalDataTrialSet>(t => t.TrialId == Guid.Parse("40400000-3e2c-0016-239b-08da581f0e74"));
|
||||
|
||||
await _repository.AddRangeAsync(list, true);
|
||||
|
||||
await _repository.SaveChangesAsync();
|
||||
|
||||
await _repository.BatchUpdateAsync<DataInspection>(t => t.TrialId == Guid.Parse("40400000-3e2c-0016-239b-08da581f0e74") && t.EntityName== "ClinicalDataTrialSet", t => new DataInspection() { CreateTime= DateTime.Now.AddMonths(-2) } );
|
||||
|
||||
return _userInfo.LocalIp;
|
||||
}
|
||||
|
@ -80,7 +92,7 @@ namespace IRaCIS.Application.Services
|
|||
return findStr;
|
||||
}
|
||||
[HttpPost]
|
||||
public async Task<IActionResult> Get(TestModel testModel)
|
||||
public async Task<IActionResult> Get(TestModel testModel)
|
||||
{
|
||||
|
||||
// Load a document.
|
||||
|
@ -101,7 +113,7 @@ namespace IRaCIS.Application.Services
|
|||
// }
|
||||
|
||||
//}
|
||||
return await NpoiWordHelper.TemplateExportWordAsync(Path.Combine(_hostEnvironment.ContentRootPath, "ReplaceText.docx"), new {test="xiugai",ZZZZ="ModiffyZZZZ"},null,_hostEnvironment);
|
||||
return await NpoiWordHelper.TemplateExportWordAsync(Path.Combine(_hostEnvironment.ContentRootPath, "ReplaceText.docx"), new { test = "xiugai", ZZZZ = "ModiffyZZZZ" }, null, _hostEnvironment);
|
||||
|
||||
//_cache.SetString("test" , "cacheStr");
|
||||
|
||||
|
|
|
@ -180,69 +180,6 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
|
||||
|
||||
// 既往手术史
|
||||
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();
|
||||
|
||||
await InsertInspection<PreviousSurgery>(entity, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
|
||||
SubjectVisitId = x.SubjectVisitId,
|
||||
|
||||
ObjectRelationParentId = x.SubjectVisitId,
|
||||
|
||||
}, new
|
||||
{
|
||||
Type = ClinicalFileType.PreviousSurgery
|
||||
});
|
||||
}
|
||||
|
||||
// 既往放疗史
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(PreviousHistory)))
|
||||
{
|
||||
var entity = item.Entity as PreviousHistory;
|
||||
var subjectvisit = await _dbContext.SubjectVisit.Where(x => x.Id == entity.SubjectVisitId).FirstOrDefaultAsync();
|
||||
subjectvisit = subjectvisit ?? new SubjectVisit();
|
||||
await InsertInspection<PreviousHistory>(entity, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
SiteId = subjectvisit.SiteId,
|
||||
SubjectVisitName = subjectvisit.VisitName,
|
||||
TrialId = subjectvisit.TrialId,
|
||||
SubjectId = subjectvisit.SubjectId,
|
||||
|
||||
ObjectRelationParentId = x.SubjectVisitId,
|
||||
}, new
|
||||
{
|
||||
Type = ClinicalFileType.PreviousHistory
|
||||
});
|
||||
}
|
||||
|
||||
// 其他治疗史
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(PreviousOther)))
|
||||
{
|
||||
var entity = item.Entity as PreviousOther;
|
||||
var subjectvisit = await _dbContext.SubjectVisit.Where(x => x.Id == entity.SubjectVisitId).FirstOrDefaultAsync();
|
||||
subjectvisit = subjectvisit ?? new SubjectVisit();
|
||||
await InsertInspection<PreviousOther>(entity, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
SiteId = subjectvisit.SiteId,
|
||||
SubjectVisitName = subjectvisit.VisitName,
|
||||
TrialId = subjectvisit.TrialId,
|
||||
SubjectId = subjectvisit.SubjectId,
|
||||
|
||||
ObjectRelationParentId = x.SubjectVisitId,
|
||||
}, new
|
||||
{
|
||||
Type = ClinicalFileType.PreviousOther
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//质疑
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(QCChallenge)))
|
||||
|
@ -440,6 +377,85 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
|||
|
||||
#region 已修改
|
||||
|
||||
|
||||
|
||||
|
||||
// 既往手术史
|
||||
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();
|
||||
|
||||
await InsertInspection<PreviousSurgery>(entity, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
IsDistinctionInterface = false,
|
||||
|
||||
SubjectVisitId = x.SubjectVisitId,
|
||||
|
||||
ObjectRelationParentId = x.SubjectVisitId,
|
||||
|
||||
}, new
|
||||
{
|
||||
Type = ClinicalFileType.PreviousSurgery
|
||||
}) ;
|
||||
}
|
||||
|
||||
// 既往放疗史
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(PreviousHistory)))
|
||||
{
|
||||
var entity = item.Entity as PreviousHistory;
|
||||
//var subjectvisit = await _dbContext.SubjectVisit.Where(x => x.Id == entity.SubjectVisitId).FirstOrDefaultAsync();
|
||||
//subjectvisit = subjectvisit ?? new SubjectVisit();
|
||||
await InsertInspection<PreviousHistory>(entity, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
//SiteId = subjectvisit.SiteId,
|
||||
//SubjectVisitName = subjectvisit.VisitName,
|
||||
//TrialId = subjectvisit.TrialId,
|
||||
//SubjectId = subjectvisit.SubjectId,
|
||||
|
||||
IsDistinctionInterface = false,
|
||||
|
||||
SubjectVisitId = x.SubjectVisitId,
|
||||
|
||||
|
||||
ObjectRelationParentId = x.SubjectVisitId,
|
||||
}, new
|
||||
{
|
||||
Type = ClinicalFileType.PreviousHistory
|
||||
});
|
||||
}
|
||||
|
||||
// 其他治疗史
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(PreviousOther)))
|
||||
{
|
||||
var entity = item.Entity as PreviousOther;
|
||||
//var subjectvisit = await _dbContext.SubjectVisit.Where(x => x.Id == entity.SubjectVisitId).FirstOrDefaultAsync();
|
||||
//subjectvisit = subjectvisit ?? new SubjectVisit();
|
||||
await InsertInspection<PreviousOther>(entity, type, x => new InspectionConvertDTO()
|
||||
{
|
||||
//SiteId = subjectvisit.SiteId,
|
||||
//SubjectVisitName = subjectvisit.VisitName,
|
||||
//TrialId = subjectvisit.TrialId,
|
||||
//SubjectId = subjectvisit.SubjectId,
|
||||
|
||||
|
||||
IsDistinctionInterface = false,
|
||||
|
||||
SubjectVisitId = x.SubjectVisitId,
|
||||
|
||||
ObjectRelationParentId = x.SubjectVisitId,
|
||||
}, new
|
||||
{
|
||||
Type = ClinicalFileType.PreviousOther
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//系统 Qc 问题
|
||||
foreach (var item in entitys.Where(x => x.Entity.GetType() == typeof(QCQuestion)))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue