From 4337dbed0b5dfee82c4631d3b5101a2a42d09362 Mon Sep 17 00:00:00 2001 From: he <10978375@qq.com> Date: Tue, 5 Jul 2022 09:57:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20=E4=B8=80=E7=89=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reading/Dto/ReadingMedicalReviewDto.cs | 58 +++++++++++++++++++ .../Reading/ReadingMedicalReviewService.cs | 42 ++++++++++++++ .../Allocation/TaskMedicalReview.cs | 12 ++++ 3 files changed, 112 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs index 25a2cab0f..61420fdeb 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs @@ -9,10 +9,68 @@ using System.Threading.Tasks; namespace IRaCIS.Core.Application.Service.Reading.Dto { + + public class IRConfirmMedicalReviewInDto + { + public Guid TaskMedicalReviewId { get; set; } + + /// + /// 阅片人是否认同 + /// + public MedicalReviewDoctorUserIdea DoctorUserIdeaEnum { get; set; } + + + /// + /// 不同意重阅原因 + /// + public string DisagreeReason { get; set; } = string.Empty; + + + /// + /// 是否申请重阅 + /// + public bool IsApplyHeavyReading { get; set; } = false; + } + public class FinishMedicalReviewInDto { public Guid TaskMedicalReviewId { get; set; } } + + + public class GetMedicalReviewDialogOutDto + { + /// + /// 对话内容 + /// + public string Content { get; set; } + + /// + /// 用户角色 + /// + public string UserTypeShortName { get; set; } + + /// + /// 用户角色枚举 + /// + public int UserTypeEnumInt { get; set; } + + /// + /// 创建人 + /// + public Guid CreateUserId { get; set; } + + /// + /// 创建时间 + /// + public DateTime CreateTime { get; set; } + } + + public class GetMedicalReviewDialogInDto + { + [NotDefault] + public Guid TaskMedicalReviewId { get; set; } + } public class SendMedicalReviewDialogInDto { public Guid TaskMedicalReviewId { get; set; } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs index 83d1c8430..b9d0f7dec 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs @@ -299,6 +299,29 @@ namespace IRaCIS.Core.Application.Service return ResponseOutput.Result(result); } + /// + /// 获取医学审核对话 + /// + /// + /// + [HttpPost] + public async Task> GetMedicalReviewDialog(GetMedicalReviewDialogInDto inDto) + { + List result = await _readingMedicalReviewDialogRepository.Where(x => x.TaskMedicalReviewId == inDto.TaskMedicalReviewId) + .Select(x => new GetMedicalReviewDialogOutDto() + { + + Content = x.Content, + CreateTime = x.CreateTime, + CreateUserId = x.CreateUserId, + UserTypeEnumInt = x.UserTypeEnumInt, + UserTypeShortName = x.UserTypeShortName, + + }).OrderBy(x => x.CreateTime).ToListAsync(); + + return result; + } + /// /// 完成医学审核 /// @@ -308,6 +331,8 @@ namespace IRaCIS.Core.Application.Service public async Task FinishMedicalReview(FinishMedicalReviewInDto inDto) { + + await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview() { AuditState = MedicalReviewAuditState.HaveSigned, @@ -318,7 +343,24 @@ namespace IRaCIS.Core.Application.Service return ResponseOutput.Result(result); } + /// + /// IR回复确认医学审核 + /// + /// + /// + [HttpPost] + public async Task IRConfirmMedicalReview(IRConfirmMedicalReviewInDto inDto) + { + await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview() + { + DoctorUserIdeaEnum = inDto.DoctorUserIdeaEnum, + DisagreeReason = inDto.DisagreeReason, + IsApplyHeavyReading=inDto.IsApplyHeavyReading, + }); + var result = await _taskMedicalReviewRepository.SaveChangesAsync(); + return ResponseOutput.Result(result); + } } diff --git a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs index 861571f7a..129d276bc 100644 --- a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs +++ b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs @@ -116,6 +116,18 @@ namespace IRaCIS.Core.Domain.Models public DateTime? SaveQuestionTime { get; set; } + /// + /// 不同意重阅原因 + /// + public string DisagreeReason { get; set; } = string.Empty; + + + /// + /// 是否申请重阅 + /// + public bool IsApplyHeavyReading { get; set; } = false; + + } }