diff --git a/IRaCIS.Core.API/Controllers/InspectionController.cs b/IRaCIS.Core.API/Controllers/InspectionController.cs index 0abd96915..44d9a86ec 100644 --- a/IRaCIS.Core.API/Controllers/InspectionController.cs +++ b/IRaCIS.Core.API/Controllers/InspectionController.cs @@ -849,6 +849,7 @@ namespace IRaCIS.Core.API.Controllers public async Task UpdateSubjectStatus(InsUpdateSubjectStatus opt) { var fun = _subjectService.UpdateSubjectStatus; + return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); } diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index c4b37e1e1..084e5dd34 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -1817,22 +1817,25 @@ namespace IRaCIS.Core.Application.Image.QA FirstGiveMedicineTime = command.SubjectFirstGiveMedicineTime, }); - - datas.Add(new DataInspection() + if (data.IsBaseLine) { - - SubjectId = command.SubjectId, - SiteId = data.SiteId, - TrialId = data.TrialId, - IsSign = false, - Identification= "Edit|Subject|Info|Subject", - CreateTime =DateTime.Now.AddSeconds(1), - JsonDetail = JsonConvert.SerializeObject(new + datas.Add(new DataInspection() { - FirstGiveMedicineTime= command.SubjectFirstGiveMedicineTime.Value.ToString("yyyy-MM-dd") - }) - }) ; + SubjectId = command.SubjectId, + SiteId = data.SiteId, + TrialId = data.TrialId, + IsSign = false, + Identification = "Edit|Subject|Info|Subject", + CreateTime = DateTime.Now.AddSeconds(1), + JsonDetail = JsonConvert.SerializeObject(new + { + FirstGiveMedicineTime = command.SubjectFirstGiveMedicineTime.Value.ToString("yyyy-MM-dd") + + }) + }); + } + await _inspectionService.AddListInspectionRecordAsync(datas); } diff --git a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs index 89f29482b..8ca7c0f5e 100644 --- a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs +++ b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs @@ -33,7 +33,7 @@ namespace IRaCIS.Core.Application.Services { bool isadd=false; - if (svCommand.Id != null) + if (svCommand.Id == null) { isadd=true; } @@ -118,27 +118,28 @@ namespace IRaCIS.Core.Application.Services //更新受试者 首次给药日期 是否入组确认 if (svCommand.SubjectFirstGiveMedicineTime != null) { - List datas = new List(); - // 更新受试者 - - subject.FirstGiveMedicineTime = svCommand.SubjectFirstGiveMedicineTime; - datas.Add(new DataInspection() + if (svCommand.IsBaseLine) { - - SubjectId = subject.Id, - SiteId = subject.SiteId, - TrialId = subject.TrialId, - IsSign = false, - Identification= "Edit|Subject|Info|Subject", - CreateTime = DateTime.Now.AddSeconds(1), - JsonDetail = JsonConvert.SerializeObject(new + List datas = new List(); + // 更新受试者 + subject.FirstGiveMedicineTime = svCommand.SubjectFirstGiveMedicineTime; + datas.Add(new DataInspection() { - FirstGiveMedicineTime = subject.FirstGiveMedicineTime.Value.ToString("yyyy-MM-dd") - - }) - }); - await _inspectionService.AddListInspectionRecordAsync(datas); + SubjectId = subject.Id, + SiteId = subject.SiteId, + TrialId = subject.TrialId, + IsSign = false, + Identification = "Edit|Subject|Info|Subject", + CreateTime = DateTime.Now.AddSeconds(1), + JsonDetail = JsonConvert.SerializeObject(new + { + FirstGiveMedicineTime = subject.FirstGiveMedicineTime.Value.ToString("yyyy-MM-dd") + }) + }); + await _inspectionService.AddListInspectionRecordAsync(datas); + } + } if (svCommand.IsEnrollmentConfirm != null)