diff --git a/IRaCIS.Core.API/Controllers/InspectionController.cs b/IRaCIS.Core.API/Controllers/InspectionController.cs index ce1c5eb1a..ec976ce0d 100644 --- a/IRaCIS.Core.API/Controllers/InspectionController.cs +++ b/IRaCIS.Core.API/Controllers/InspectionController.cs @@ -153,7 +153,6 @@ namespace IRaCIS.Core.API.Controllers [HttpPost, Route("Inspection/QCOperation/AddQCChallengeReply")] [UnitOfWork] public async Task AddQCChallengeReply(DataInspectionDto opt) - { var fun = _qCOperationService.AddQCChallengeReply; return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); @@ -252,6 +251,19 @@ namespace IRaCIS.Core.API.Controllers var fun = _qCOperationService.CheckBack; return await _inspectionService.Enforcement(opt.OptCommand.Id, opt.AuditInfo, opt.SignInfo, fun); } + + + /// + /// QC修改检查部位和 拍片类型 + /// + [HttpPost, Route("Inspection/QCOperation/UpdateModality")] + [UnitOfWork] + public async Task UpdateModality(DataInspectionDto opt) + { + var fun = _qCOperationService.UpdateModality; + return await _inspectionService.Enforcement(opt.OptCommand, opt.AuditInfo, opt.SignInfo, fun); + } + #endregion #region 影像上传 diff --git a/IRaCIS.Core.API/IRaCIS.Core.API.xml b/IRaCIS.Core.API/IRaCIS.Core.API.xml index 4410e08fe..5f8bdcbb2 100644 --- a/IRaCIS.Core.API/IRaCIS.Core.API.xml +++ b/IRaCIS.Core.API/IRaCIS.Core.API.xml @@ -121,6 +121,11 @@ 一致性核查 回退 对话记录不清除 只允许PM回退 + + + QC修改检查部位和 拍片类型 + + 疾病进展确认评估 diff --git a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs index bf30ab12b..861abed77 100644 --- a/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs +++ b/IRaCIS.Core.Application/Service/Inspection/DTO/InspectionModel.cs @@ -14,7 +14,7 @@ using System.Threading.Tasks; namespace IRaCIS.Core.Application.Service.Inspection.DTO { - + public class DataInspectionAddDTO @@ -81,7 +81,7 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO /// public string ResearchProgramNo { get; set; } = string.Empty; - public List EnumList { get; set; }=new List { }; + public List EnumList { get; set; } = new List { }; /// @@ -169,6 +169,14 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO public string closeReason { get; set; } } + public class UpdateModalityDto + { + public Guid id { get; set; } + public int type { get; set; } + public string modality { get; set; } + public string bodyPart { get; set; } + } + public class CloseQCChallengeDto { public Guid qcChallengeId { get; set; } @@ -275,12 +283,14 @@ namespace IRaCIS.Core.Application.Service.Inspection.DTO #endregion + + + /// /// 用户 签名某个文档 Dto /// public class TrialDocumentConfirmDTO : InspectionBase, IInspectionDTO, ISignDTO - { - + { public UserConfirmCommand OptCommand { get; set; } } diff --git a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs index cce2d719f..c2fef2c4b 100644 --- a/IRaCIS.Core.Application/Service/QC/QCOperationService.cs +++ b/IRaCIS.Core.Application/Service/QC/QCOperationService.cs @@ -32,7 +32,7 @@ namespace IRaCIS.Core.Application.Image.QA private readonly IRepository _subjectVisitRepository; private readonly IRepository _trialRepository; private readonly IServiceProvider serviceProvider; - private readonly IInspectionService _sinspectionService; + private readonly IInspectionService _inspectionService; private object _locker = new object(); public QCOperationService(DicomFileStoreHelper dicomFileStoreHelper, IRepository subjectVisitRepository, @@ -46,7 +46,7 @@ namespace IRaCIS.Core.Application.Image.QA _subjectVisitRepository = subjectVisitRepository; this._trialRepository = trialRepository; this.serviceProvider = serviceProvider; - this._sinspectionService = sinspectionService; + this._inspectionService = sinspectionService; } #region QC质疑 以及回复 关闭 @@ -1072,7 +1072,7 @@ namespace IRaCIS.Core.Application.Image.QA SubmitState = "待提交", }) }); - await _sinspectionService.AddListInspectionRecordAsync(datas); + await _inspectionService.AddListInspectionRecordAsync(datas); return ResponseOutput.Ok(); } @@ -1356,7 +1356,7 @@ namespace IRaCIS.Core.Application.Image.QA }); }); - await _sinspectionService.AddListInspectionRecordAsync(datas); + await _inspectionService.AddListInspectionRecordAsync(datas); return ResponseOutput.Result(success); @@ -1794,15 +1794,38 @@ namespace IRaCIS.Core.Application.Image.QA { IsEnrollmentConfirm = command.IsEnrollmentConfirm.Value, }); + + + + } if (command.SubjectFirstGiveMedicineTime != null) { + List datas = new List(); + var data = await _subjectVisitRepository.FirstOrDefaultAsync(t => t.Id == command.SubjectVisitId); await _repository.UpdateFromQueryAsync(t => t.Id == command.SubjectId, u => new Subject() { FirstGiveMedicineTime = command.SubjectFirstGiveMedicineTime, }); + + datas.Add(new DataInspection() + { + + SubjectId = command.SubjectId, + SiteId = data.SiteId, + TrialId = data.TrialId, + IsSign = false, + CreateTime=DateTime.Now.AddSeconds(1), + JsonDetail = JsonConvert.SerializeObject(new + { + FirstGiveMedicineTime= command.SubjectFirstGiveMedicineTime.Value.ToString("yyyy-MM-dd") + + }) + }) ; + + await _inspectionService.AddListInspectionRecordAsync(datas); } ////受试者基线 入组确认 或者访视PD 进展 默认加急 diff --git a/IRaCIS.Core.Application/Service/Visit/DTO/ClinicalStudySubjects.cs b/IRaCIS.Core.Application/Service/Visit/DTO/ClinicalStudySubjects.cs index ca9c4357e..e0ef8f068 100644 --- a/IRaCIS.Core.Application/Service/Visit/DTO/ClinicalStudySubjects.cs +++ b/IRaCIS.Core.Application/Service/Visit/DTO/ClinicalStudySubjects.cs @@ -44,13 +44,13 @@ namespace IRaCIS.Application.Contracts public class SubjectStatusChangeCommand { - + [NotDefault] public Guid SubjectId { get; set; } - - public Guid? TrialId { get; set; } - - public Guid? SiteId { get; set; } + [NotDefault] + public Guid TrialId { get; set; } + [NotDefault] + public Guid SiteId { get; set; } public SubjectStatus Status { get; set; } public DateTime? OutEnrollmentTime { get; set; } diff --git a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs index db6fc0f8e..6ebd39541 100644 --- a/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs +++ b/IRaCIS.Core.Application/Service/Visit/SubjectVisitService.cs @@ -118,9 +118,26 @@ namespace IRaCIS.Core.Application.Services //更新受试者 首次给药日期 是否入组确认 if (svCommand.SubjectFirstGiveMedicineTime != null) { + List datas = new List(); + + // 更新受试者 subject.FirstGiveMedicineTime = svCommand.SubjectFirstGiveMedicineTime; - + datas.Add(new DataInspection() + { + + SubjectId = subject.Id, + SiteId = subject.SiteId, + TrialId = subject.TrialId, + IsSign = false, + 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)