删除访视废除代码

Test.EIImageViewer
hang 2022-04-25 17:12:33 +08:00
parent 02ef623ab4
commit 210323eb8a
2 changed files with 18 additions and 53 deletions

View File

@ -93,58 +93,38 @@ namespace IRaCIS.Core.Application.Services
} }
var subject = (await _subjectRepository.FirstOrDefaultAsync(t => t.Id == svCommand.SubjectId)).IfNullThrowException(); var subject = (await _subjectRepository.FirstOrDefaultAsync(t => t.Id == svCommand.SubjectId)).IfNullThrowException();
//更新受试者 首次给药日期 是否入组确认 //更新受试者 首次给药日期 是否入组确认
if (svCommand.SubjectFirstGiveMedicineTime != null) if (svCommand.SubjectFirstGiveMedicineTime != null && svCommand.IsBaseLine)
{ {
// 更新受试者
subject.FirstGiveMedicineTime = svCommand.SubjectFirstGiveMedicineTime;
if (svCommand.IsBaseLine)
List<DataInspection> datas = new List<DataInspection>();
datas.Add(new DataInspection()
{ {
List<DataInspection> datas = new List<DataInspection>(); SubjectId = subject.Id,
// 更新受试者 SiteId = subject.SiteId,
subject.FirstGiveMedicineTime = svCommand.SubjectFirstGiveMedicineTime; TrialId = subject.TrialId,
datas.Add(new DataInspection() IsSign = false,
{ Identification = "Edit|Subject|Info|Subject",
SubjectId = subject.Id, CreateTime = DateTime.Now.AddSeconds(1),
SiteId = subject.SiteId, JsonDetail = subject.ToJcJson(),
TrialId = subject.TrialId, });
IsSign = false, await _inspectionService.AddListInspectionRecordAsync(datas);
Identification = "Edit|Subject|Info|Subject",
CreateTime = DateTime.Now.AddSeconds(1),
JsonDetail = subject.ToJcJson(),
});
await _inspectionService.AddListInspectionRecordAsync(datas);
}
}
if (svCommand.IsEnrollmentConfirm != null)
{
await _subjectVisitRepository.BatchUpdateAsync(t => t.SubjectId == svCommand.SubjectId && t.IsBaseLine , u => new SubjectVisit() { IsEnrollmentConfirm = svCommand.IsEnrollmentConfirm.Value });
//needDealEntity.IsUrgent = true;
} }
await _repository.SaveChangesAsync(); await _repository.SaveChangesAsync();
bool isadd = false;
if (svCommand.Id == null) if (svCommand.Id == null)
{
isadd = true;
}
if (isadd)
{ {
List<DataInspection> dataInspection=new List<DataInspection>(); List<DataInspection> dataInspection=new List<DataInspection>();
@ -164,22 +144,6 @@ namespace IRaCIS.Core.Application.Services
await _inspectionService.AddListInspectionRecordAsync(dataInspection); await _inspectionService.AddListInspectionRecordAsync(dataInspection);
} }
// 保存数据后,重新算下是否缺失影像 应对状态撤回
//if (svCommand.IsLostVisit == false)
//{
// var currentSubmittedVisitNum = await _repository.Where<SubjectVisit>(t => t.SubmitState == SubmitStateEnum.Submitted).MaxAsync(t => t.VisitNum);
// var isMissing = await _repository.AnyAsync<SubjectVisit>(t => (t.VisitNum < currentSubmittedVisitNum && t.SubmitState != SubmitStateEnum.Submitted) || t.IsLostVisit);
// await _repository.UpdateFromQueryAsync<Subject>(t => t.Id == svCommand.SubjectId, u => new Subject()
// {
// IsMissingImages = isMissing
// });
//}
return ResponseOutput.Ok(dbBeforeEntity.Id.ToString()); return ResponseOutput.Ok(dbBeforeEntity.Id.ToString());

View File

@ -8,6 +8,7 @@ namespace IRaCIS.Core.Domain.Share
//不可用 //不可用
None = 0, None = 0,
// 待审核\ 待初审
ToAudit = 3, ToAudit = 3,
//1st QC进行了操作 //1st QC进行了操作