diff --git a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewViewModel.cs b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewViewModel.cs index 6ff2a5f87..596012789 100644 --- a/IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewViewModel.cs +++ b/IRaCIS.Core.Application/Service/Allocation/DTO/TaskMedicalReviewViewModel.cs @@ -109,7 +109,6 @@ namespace IRaCIS.Core.Application.ViewModel public DateTime? BeginSignTime { get; set; } public AuditAdvice? AuditAdviceEnum { get; set; } - public DateTime? EndSignTime { get; set; } public bool IsGetBeRead { get; set; } = false; diff --git a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs index c6df4fdad..472d7f8b0 100644 --- a/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Allocation/TaskMedicalReviewService.cs @@ -56,7 +56,8 @@ namespace IRaCIS.Core.Application.Service var taskMedicalReviewQueryable = _taskMedicalReviewRepository.Where(t => t.VisitTask.TrialId == inQuery.TrialId) .WhereIf(inQuery.SiteId != null, t => t.VisitTask.Subject.SiteId == inQuery.SiteId) .WhereIf(inQuery.SubjectId != null, t => t.VisitTask.SubjectId == inQuery.SubjectId) - .WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.VisitTask.Subject.Code.Contains(inQuery.SubjectCode)) + .WhereIf(inQuery.SubjectId != null, t => t.VisitTask.SubjectId == inQuery.SubjectId) + .WhereIf(!string.IsNullOrEmpty(inQuery.SubjectCode), t => t.VisitTask.Subject.Code.Contains(inQuery.SubjectCode)) .WhereIf(!string.IsNullOrEmpty(inQuery.TaskName), t => t.VisitTask.TaskName.Contains(inQuery.TaskName) || t.VisitTask.TaskBlindName.Contains(inQuery.TaskName)) .WhereIf(inQuery.IsUrgent != null, t => t.VisitTask.IsUrgent == inQuery.IsUrgent) .WhereIf(inQuery.DoctorUserId != null, t => t.VisitTask.DoctorUserId == inQuery.DoctorUserId) @@ -201,7 +202,8 @@ namespace IRaCIS.Core.Application.Service .WhereIf(inQuery.Id != null, t => t.Id != inQuery.Id) .WhereIf(inQuery.IsUrgent != null, t => t.VisitTask.IsUrgent == inQuery.IsUrgent) .WhereIf(inQuery.AuditState != null, t => t.AuditState == inQuery.AuditState) - .WhereIf(inQuery.TaskState != null, t => t.VisitTask.TaskState == inQuery.TaskState) + .WhereIf(inQuery.DoctorUserIdeaEnum != null, t => t.DoctorUserIdeaEnum == inQuery.DoctorUserIdeaEnum) + .WhereIf(inQuery.TaskState != null, t => t.VisitTask.TaskState == inQuery.TaskState) .WhereIf(inQuery.DoctorUserId != null, t => t.VisitTask.DoctorUserId == inQuery.DoctorUserId) .WhereIf(inQuery.ReadingCategory != null, t => t.VisitTask.ReadingCategory == inQuery.ReadingCategory) .WhereIf(inQuery.ReadingTaskState != null, t => t.VisitTask.ReadingTaskState == inQuery.ReadingTaskState) diff --git a/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs b/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs index 63c690835..b33935873 100644 --- a/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs +++ b/IRaCIS.Core.Application/Service/Document/DTO/SystemDocumentViewModel.cs @@ -42,9 +42,9 @@ namespace IRaCIS.Core.Application.Contracts public Guid? ConfirmUserId { get; set; } - public bool IsConfirmed => ConfirmTime is not null; + public bool IsConfirmed { get; set; } - public string UserName { get; set; } = string.Empty; + public string UserName { get; set; } = string.Empty; public string RealName { get; set; } = string.Empty; diff --git a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs index 39310019a..e0d28710f 100644 --- a/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs +++ b/IRaCIS.Core.Application/Service/Document/TrialDocumentService.cs @@ -360,10 +360,11 @@ namespace IRaCIS.Core.Application.Services FileTypeId = trialDocumentNeedConfirmedUserType.TrialDocument.FileTypeId, FileType = _userInfo.IsEn_Us ? trialDocumentNeedConfirmedUserType.TrialDocument.FileType.Value : trialDocumentNeedConfirmedUserType.TrialDocument.FileType.ValueCN, UpdateTime = trialDocumentNeedConfirmedUserType.TrialDocument.UpdateTime, + IsConfirmed= confirm.ConfirmTime!=null, - ConfirmUserId = confirm.ConfirmUserId, + ConfirmUserId = confirm.ConfirmUserId, ConfirmTime = confirm.ConfirmTime, RealName = trialUser.User.FullName, UserName = trialUser.User.UserName, @@ -395,9 +396,9 @@ namespace IRaCIS.Core.Application.Services FileType = _userInfo.IsEn_Us ? needConfirmEdUserType.SystemDocument.FileType.Value : needConfirmEdUserType.SystemDocument.FileType.ValueCN, FileTypeId = needConfirmEdUserType.SystemDocument.FileTypeId, UpdateTime = needConfirmEdUserType.SystemDocument.UpdateTime, + IsConfirmed = confirm.ConfirmTime != null, - - ConfirmUserId = confirm.ConfirmUserId, + ConfirmUserId = confirm.ConfirmUserId, ConfirmTime = confirm.ConfirmTime, RealName = trialUser.User.FullName, UserName = trialUser.User.UserName, diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs index 2a69c0916..439ef3c4b 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingImageTask/ReadingImageTaskService.cs @@ -16,6 +16,7 @@ using Microsoft.Extensions.Caching.Memory; using IRaCIS.Core.Application.Filter; using DocumentFormat.OpenXml.Drawing; using EasyCaching.Core; +using DocumentFormat.OpenXml.Drawing.Charts; namespace IRaCIS.Application.Services { @@ -1586,7 +1587,7 @@ namespace IRaCIS.Application.Services }).ToListAsync(); - var markquestionId = inDto.Answers.Select(y => y.Id).ToList(); + var markquestionId = inDto.QuestionMarkInfoList.Select(y => y.QuestionId).ToList(); await _readingTaskQuestionMarkRepository.BatchDeleteNoTrackingAsync(x => x.VisitTaskId == inDto.VisitTaskId&& markquestionId.Contains(x.QuestionId)); var datetime = DateTime.Now; @@ -2563,6 +2564,12 @@ namespace IRaCIS.Application.Services task.SubjectCode = blindSubjectCode.IsNullOrEmpty() ? task.SubjectCode : blindSubjectCode; task.ExistsManual = (await GetManualList(new GetManualListInDto() { TrialId = visitTaskInfo.TrialId })).Count > 0; task.ReadingTaskState = visitTaskInfo.ReadingTaskState; + // 添加默认答案 + if (inDto.VisitTaskId == null && visitTaskInfo.ReadingTaskState != ReadingTaskState.HaveSigned) + { + await AddDefaultValueToTask(task.VisitTaskId); + + } return task; } @@ -2583,7 +2590,6 @@ namespace IRaCIS.Application.Services int readingMinute = 120; // 为60整数 int restMinute = 10; // - var startReadingTime = _provider.Get(startReadingTimeKey).Value; var startRestTime = _provider.Get(startRestTimeKey).Value; if (startReadingTime == null && startRestTime == null) @@ -2596,7 +2602,7 @@ namespace IRaCIS.Application.Services int timespanMin = (DateTime.Now - cacheStartRestTime).Minutes; if (timespanMin <= restMinute) { - throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", readingMinute/60, restMinute]); + throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", readingMinute/60m, restMinute]); } else { @@ -2617,7 +2623,7 @@ namespace IRaCIS.Application.Services _provider.Remove(startReadingTimeKey); _provider.Set(startRestTimeKey, DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), TimeSpan.FromHours(48)); - throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", readingMinute / 60, restMinute]); + throw new BusinessValidationFailedException(_localizer["ReadingImage_NeedRest", readingMinute / 60m, restMinute]); } #endregion diff --git a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs index 1b9696b62..3c8c3b8e1 100644 --- a/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs +++ b/IRaCIS.Core.Application/Service/ReadingCalculate/LuganoCalculateService.cs @@ -515,6 +515,9 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate // PET 5PS评分 new ReadingCalculateData (){QuestionType=QuestionType.PET5PS,GetStringFun=GetPET5PS,ComputationTrigger=ComputationTrigger.Lesion}, + // 修改PET 5PS评分备注 + new ReadingCalculateData (){QuestionType=QuestionType.PSScoreRemarks,GetStringFun=GetPET5PSRemark,ComputationTrigger=ComputationTrigger.Lesion}, + ////与基线相比摄取值变化 //new ReadingCalculateData (){QuestionType=QuestionType.UptakeChange,GetStringFun=GetUptakeChange,ComputationTrigger=ComputationTrigger.Lesion}, @@ -841,7 +844,15 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate if ((await _readingTaskQuestionAnswerRepository.CountAsync(x => required.Contains(x.ReadingQuestionTrial.QuestionType) && x.VisitTaskId == inDto.VisitTaskId && x.Answer != string.Empty)) != required.Count()) { - errorMassage += _localizer["ReadingCalculate_LuganoPetVerification"] + ","; + if (taskinfo.VisitTaskNum != 0m) + { + errorMassage += _localizer["ReadingCalculate_LuganoPetVerification"]; + } + else + { + errorMassage += _localizer["ReadingCalculate_LuganoBaseLinePetVerification"]; + } + } } @@ -2055,17 +2066,30 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate } return result.GetEnumInt(); } - #endregion + #endregion + + #region 修改PET 5PS评分备注 + + /// + /// 获取PET5PS评分备注 + /// + /// + /// + public async Task GetPET5PSRemark(ReadingCalculateDto inDto) + { + return string.Empty; + } + #endregion - #region 与基线相比摄取值变化 + #region 与基线相比摄取值变化 - /// - /// 与基线相比摄取值变化 - /// - /// - /// - public async Task GetUptakeChange(ReadingCalculateDto inDto) + /// + /// 与基线相比摄取值变化 + /// + /// + /// + public async Task GetUptakeChange(ReadingCalculateDto inDto) { if (inDto.IsBaseLine) { diff --git a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs index 26e74b5a4..b3d5cebd1 100644 --- a/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs +++ b/IRaCIS.Core.Domain.Share/Reading/ReadEnum.cs @@ -2244,7 +2244,17 @@ public enum SUVChangeVSBaseline /// EvidenceFocalFDG = 57, - } + /// + /// 修改脾脏状态备注 + /// + SplenicStatusRemarks = 58, + + /// + /// 修改PET 5PS评分备注 + /// + PSScoreRemarks = 59, + + }