diff --git a/IRaCIS.Core.API/Controllers/InspectionController.cs b/IRaCIS.Core.API/Controllers/InspectionController.cs index 3bb1f8a6f..978a40689 100644 --- a/IRaCIS.Core.API/Controllers/InspectionController.cs +++ b/IRaCIS.Core.API/Controllers/InspectionController.cs @@ -80,7 +80,7 @@ namespace IRaCIS.Core.API.Controllers /// /// 新增或添加访视计划 /// - /// + /// /// [HttpPost, Route("Inspection/VisitPlan/AddOrUpdateVisitStage")] [UnitOfWork] @@ -239,7 +239,18 @@ namespace IRaCIS.Core.API.Controllers return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); } - + /// + /// 签名确认 + /// + /// 签名确认 + /// + [HttpPost, Route("Inspection/configTrialBasicInfo/TrialConfigSignatureConfirm")] + [UnitOfWork] + public async Task TrialConfigSignatureConfirm(DataInspectionDto opt) + { + var fun = _trialConfigService.TrialConfigSignatureConfirm; + return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); + } #endregion diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.xml b/IRaCIS.Core.API/IRaCIS.Core.API.xml index c207c1160..cf2eaf063 100644 --- a/IRaCIS.Core.API/IRaCIS.Core.API.xml +++ b/IRaCIS.Core.API/IRaCIS.Core.API.xml @@ -62,7 +62,7 @@ 新增或添加访视计划 - + @@ -107,6 +107,13 @@ + + + 签名确认 + + 签名确认 + + 添加或更新受试者信息[New] diff --git a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml index 064129d91..429a8c19a 100644 --- a/IRaCIS.Core.Application/IRaCIS.Core.Application.xml +++ b/IRaCIS.Core.Application/IRaCIS.Core.Application.xml @@ -36,7 +36,7 @@ - CommonDocumentService + 系统模板文档配置表 @@ -166,6 +166,11 @@ 标识 + + + 访视计划ID + + 配置 基础逻辑信息 @@ -503,7 +508,7 @@ - EmailNoticeConfigService + 系统邮件配置表 @@ -1117,12 +1122,19 @@ 指定资源Id,渲染Dicom序列的Jpeg预览图像 Dicom序列的Id - + Site用户列表导出 - - isAllSiteUser true : site用户列表,false :Site调研汇总表 + + + + + + + + Site用户汇总表导出 + @@ -1685,6 +1697,19 @@ + + + 根据父亲Code 获取单个下拉框数据 + + + + + + + 获取所有下拉框 枚举 bool 数据 + + + 打包医生官方简历 @@ -2260,11 +2285,11 @@ 最新工作量 (已确定的)[New] - + 项目参与人员导出 - + diff --git a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs index c3c8de073..98e853d58 100644 --- a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs +++ b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs @@ -91,8 +91,13 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO /// public string Identification { get; set; } = string.Empty; + /// + /// 访视计划ID + /// + public Guid? VisitStageId { get; set; } + ////需要单独处理 //public string IP { get; set; } @@ -243,6 +248,8 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO public string SignText { get; set; } = string.Empty; + //public string OptType { get; set; } = string.Empty; + } diff --git a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs index d52648cc8..61d35e5c5 100644 --- a/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs +++ b/IRaCIS.Core.Application/Service/Inspection/InspectionService.cs @@ -81,6 +81,11 @@ namespace IRaCIS.Core.Application.Service.Inspection join moduleTypec in _repository.GetQueryable() on new { ModuleType = leftfrontAuditConfig.ModuleTypeId } equals new { ModuleType = moduleTypec.Id.ToString() } into moduleTypectemp from leftmoduleTypec in moduleTypectemp.DefaultIfEmpty() + + + join OptTypec in _repository.GetQueryable() on new { ModuleType = leftfrontAuditConfig.OptTypeId } equals new { ModuleType = OptTypec.Id.ToString() } into optTypetemp + from leftOptType in optTypetemp.DefaultIfEmpty() + select new GetDataInspectionOutDto() { CreateTime = data.CreateTime, @@ -91,7 +96,7 @@ namespace IRaCIS.Core.Application.Service.Inspection SiteId = data.SiteId, SubjectId = data.SubjectId, SubjectVisitId = data.SubjectVisitId, - OptType = data.OptType, + //OptType = data.OptType, IP = data.IP, Reason = data.Reason, IsSign = data.IsSign, @@ -122,6 +127,7 @@ namespace IRaCIS.Core.Application.Service.Inspection ModuleTypeName= leftmoduleTypec.ValueCN, SignText= lefttrialSign.SignText, Identification= leftfrontAuditConfig.Identification, + OptType= leftOptType.ValueCN, }; query = query.WhereIf(!dto.BlindName.IsNullOrEmpty(), x => x.BlindName == dto.BlindName) @@ -181,15 +187,17 @@ namespace IRaCIS.Core.Application.Service.Inspection } // 用户 签名某个文档 - - if (bResult.IsSuccess == false) { return bResult; } - // 判断是否需要前面 + if (AuditInfo.IsSign) + { + var signSuccess = await _repository.UpdateFromQueryAsync(t => t.Id == signId, u => new TrialSign() { IsCompleted = true }); + } + // 判断是否需要前面 await AddInspectionRecordAsync(AuditInfo, signId); return bResult; } @@ -261,7 +269,7 @@ namespace IRaCIS.Core.Application.Service.Inspection await SetEnum(addDto); var add = _mapper.Map(addDto); Guid? parentId = null; - parentId = (await _repository.GetQueryable().Where(x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId&&x.ChildrenType==add.ChildrenType && x.ObjectType==add.ObjectType).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id; + parentId = (await _repository.GetQueryable().Where( x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId&&x.ChildrenType==add.ChildrenType && x.ObjectType==add.ObjectType&&x.VisitStageId==add.VisitStageId).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id; add.ParentId = parentId; add.CreateTime = DateTime.Now; add.CreateUserId = _userInfo.Id; @@ -302,7 +310,7 @@ namespace IRaCIS.Core.Application.Service.Inspection foreach (var add in datas) { - add.ParentId = (await _repository.GetQueryable().Where(x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId && x.ChildrenType == add.ChildrenType && x.ObjectType == add.ObjectType).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id; + add.ParentId = (await _repository.GetQueryable().Where(x => x.TrialId == add.TrialId && x.SubjectVisitId == add.SubjectVisitId && x.SubjectId == add.SubjectId && x.SiteId == add.SiteId && x.ChildrenType == add.ChildrenType && x.ObjectType == add.ObjectType&&x.VisitStageId==add.VisitStageId).OrderByDescending(x => x.CreateTime).FirstOrDefaultAsync())?.Id; add.CreateUserId = _userInfo.Id; add.IP = _userInfo.IP; await SetInspectionNameValue(add); diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/InspectionViewModel.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/InspectionViewModel.cs index 883e5cac0..4381db2ea 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/InspectionViewModel.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/InspectionViewModel.cs @@ -23,5 +23,7 @@ public class SignDTO public Guid? SubjectVisitId { get; set; } + + } diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs index 94523b711..c673c34f8 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/DTO/TrialConfigDTO.cs @@ -163,8 +163,8 @@ namespace IRaCIS.Core.Application.Contracts [NotDefault] public Guid TrialId { get; set; } - [NotDefault] - public Guid SignId { get; set; } + //[NotDefault] + //public Guid SignId { get; set; } [NotDefault] diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/Interface/ITrialConfigService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/Interface/ITrialConfigService.cs index 0946de66a..f86c4670d 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/Interface/ITrialConfigService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/Interface/ITrialConfigService.cs @@ -16,5 +16,8 @@ namespace IRaCIS.Application.Interfaces Task ConfigTrialUrgentInfo(TrialUrgentConfig trialConfig); + Task TrialConfigSignatureConfirm(SignConfirmDTO signConfirmDTO); + + } } diff --git a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs index 6af055f28..2e7d5c4a2 100644 --- a/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs +++ b/IRaCIS.Core.Application/Service/TrialSiteUser/TrialConfigService.cs @@ -138,9 +138,9 @@ namespace IRaCIS.Core.Application await _trialRepository.UpdateFromQueryAsync(t => t.Id == signConfirmDTO.TrialId, u => new Trial() { QCQuestionConfirmedTime = DateTime.Now, QCQuestionConfirmedUserId = _userInfo.Id, IsQCQuestionConfirmed = true }); } - var signSuccess = await _repository.UpdateFromQueryAsync(t => t.Id == signConfirmDTO.SignId, u => new TrialSign() { IsCompleted = true }); + - return ResponseOutput.Result(signSuccess); + return ResponseOutput.Ok(); } diff --git a/IRaCIS.Core.Application/Service/Visit/VisitPlanService.cs b/IRaCIS.Core.Application/Service/Visit/VisitPlanService.cs index c1efecce1..6fa1248d2 100644 --- a/IRaCIS.Core.Application/Service/Visit/VisitPlanService.cs +++ b/IRaCIS.Core.Application/Service/Visit/VisitPlanService.cs @@ -344,7 +344,7 @@ namespace IRaCIS.Application.Services await _visitStageRepository.UpdateFromQueryAsync(u => u.TrialId == trialId, t => new VisitStage() { IsConfirmed = true }); var stat = new VisitPlanInfluenceStat() { TrialId = trialId }; - + List datas = new List(); foreach (var changedItem in changedList) { //找到该项目 访视已经执行,并且配置了有首次给药日期 并且更新后超窗的访视,要把超窗之前的值也要查询出来 @@ -457,7 +457,7 @@ namespace IRaCIS.Application.Services } - List datas = new List(); + var createtime = DateTime.Now.AddSeconds(1); var list = await _subjectVisitRepository.Where(t => t.TrialId == trialId && t.VisitStageId == changedItem.Id).ToListAsync(); @@ -487,7 +487,7 @@ namespace IRaCIS.Application.Services }); - await _inspectionService.AddListInspectionRecordAsync(datas); + //变更某一访视计划Item 受试者访视相关字段 @@ -503,7 +503,7 @@ namespace IRaCIS.Application.Services } - + await _inspectionService.AddListInspectionRecordAsync(datas); await _repository.AddAsync(stat); await _repository.SaveChangesAsync(); return ResponseOutput.Ok(); diff --git a/IRaCIS.Core.Domain/Trial/DataInspection.cs b/IRaCIS.Core.Domain/Trial/DataInspection.cs index f5025dbb8..3867e50f8 100644 --- a/IRaCIS.Core.Domain/Trial/DataInspection.cs +++ b/IRaCIS.Core.Domain/Trial/DataInspection.cs @@ -149,6 +149,11 @@ namespace IRaCIS.Core.Domain.Models /// public string Identification { get; set; } + /// + /// 访视计划ID + /// + public Guid? VisitStageId { get; set; } + }