删除访视废除代码
parent
02ef623ab4
commit
210323eb8a
|
@ -93,22 +93,18 @@ 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)
|
||||||
{
|
{
|
||||||
|
|
||||||
if (svCommand.IsBaseLine)
|
|
||||||
{
|
|
||||||
List<DataInspection> datas = new List<DataInspection>();
|
|
||||||
// 更新受试者
|
// 更新受试者
|
||||||
subject.FirstGiveMedicineTime = svCommand.SubjectFirstGiveMedicineTime;
|
subject.FirstGiveMedicineTime = svCommand.SubjectFirstGiveMedicineTime;
|
||||||
|
|
||||||
|
|
||||||
|
List<DataInspection> datas = new List<DataInspection>();
|
||||||
|
|
||||||
datas.Add(new DataInspection()
|
datas.Add(new DataInspection()
|
||||||
{
|
{
|
||||||
SubjectId = subject.Id,
|
SubjectId = subject.Id,
|
||||||
|
@ -120,31 +116,15 @@ namespace IRaCIS.Core.Application.Services
|
||||||
JsonDetail = subject.ToJcJson(),
|
JsonDetail = subject.ToJcJson(),
|
||||||
});
|
});
|
||||||
await _inspectionService.AddListInspectionRecordAsync(datas);
|
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());
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
//不可用
|
//不可用
|
||||||
None = 0,
|
None = 0,
|
||||||
|
|
||||||
|
// 待审核\ 待初审
|
||||||
ToAudit = 3,
|
ToAudit = 3,
|
||||||
|
|
||||||
//1st QC进行了操作
|
//1st QC进行了操作
|
||||||
|
|
Loading…
Reference in New Issue