diff --git a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs index aa754e246..04e06c6db 100644 --- a/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs +++ b/IRaCIS.Core.Application/Service/Reading/Dto/ReadingMedicalReviewDto.cs @@ -30,7 +30,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public class MedicineQuestionAnswer { - public Guid MedicineQuestionId { get; set; } + public Guid Id { get; set; } public string Answer { get; set; } @@ -54,6 +54,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public Guid VisitTaskId { get; set; } + public Arm ArmEnum { get; set; } + public List TaskList { get; set; } = new List(); @@ -145,7 +147,7 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto /// public string Answer { get; set; } - public Guid MedicineQuestionId { get; set; } + public Guid Id { get; set; } /// /// 类型 @@ -231,6 +233,13 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto public Guid? OtherTaskId { get; set; } + public Guid? JudgeVisitTaskId { get; set; } + + public Guid? JudgeResultTaskId { get; set; } + + + public Arm? JudgeResultArm { get; set; } + } } diff --git a/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs b/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs index 38aa3dd62..d1db778e0 100644 --- a/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs +++ b/IRaCIS.Core.Application/Service/Reading/ReadingMedicalReviewService.cs @@ -65,6 +65,8 @@ namespace IRaCIS.Core.Application.Service var taskInfo = await _visitTaskRepository.Where(x => x.Id == medicalReviewInfo.MedicalReviewInfo.VisitTaskId).FirstNotNullAsync(); medicalReviewInfo.VisitTaskId = taskInfo.Id; + medicalReviewInfo.ArmEnum = taskInfo.ArmEnum; + #region 取任务 if (medicalReviewInfo.IsReadingTaskViewInOrder) { @@ -83,6 +85,8 @@ namespace IRaCIS.Core.Application.Service TaskName = x.TaskName, SouceReadModuleId=x.SouceReadModuleId, SourceSubjectVisitId=x.SourceSubjectVisitId, + JudgeVisitTaskId=x.JudgeVisitTaskId, + JudgeResultArm=x.JudgeResultTask.ArmEnum, }).ToListAsync(); @@ -158,7 +162,7 @@ namespace IRaCIS.Core.Application.Service from leftquestionAnswer in questionAnswerTemp.DefaultIfEmpty() select new ReadingMedicineQuestion() { - MedicineQuestionId = data.Id, + Id = data.Id, Type = data.Type, ParentTriggerValue = data.ParentTriggerValue, IsEnable = data.IsEnable, @@ -185,7 +189,7 @@ namespace IRaCIS.Core.Application.Service private void FindChildQuestion(ReadingMedicineQuestion medicineQuestionList, List questionlists) { - medicineQuestionList.Childrens = questionlists.Where(x => x.ParentId == medicineQuestionList.MedicineQuestionId).ToList(); + medicineQuestionList.Childrens = questionlists.Where(x => x.ParentId == medicineQuestionList.Id).ToList(); if (medicineQuestionList.Childrens != null && medicineQuestionList.Childrens.Count != 0) { medicineQuestionList.Childrens.ForEach(x => @@ -210,7 +214,7 @@ namespace IRaCIS.Core.Application.Service List questionAnswerList = inDto.QuestionAnswerList.Select(x => new ReadingMedicineQuestionAnswer() { Answer = x.Answer, - ReadingMedicineQuestionId = x.MedicineQuestionId, + ReadingMedicineQuestionId = x.Id, TaskMedicalReviewId = inDto.TaskMedicalReviewId, VisitTaskId = inDto.VisitTaskId, @@ -218,6 +222,12 @@ namespace IRaCIS.Core.Application.Service await _readingMedicineQuestionAnswerRepository.AddRangeAsync(questionAnswerList); + await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview() + { + + SaveQuestionTime = DateTime.Now + }); + var result = await _readingMedicineQuestionAnswerRepository.SaveChangesAsync(); return ResponseOutput.Result(result); diff --git a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs index 99aad5008..be6be3d72 100644 --- a/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs +++ b/IRaCIS.Core.Domain/Allocation/TaskMedicalReview.cs @@ -119,6 +119,11 @@ namespace IRaCIS.Core.Domain.Models /// public bool IsClosed { get; set; } + /// + /// 保存问题的时间 + /// + public DateTime? SaveQuestionTime { get; set; } + } diff --git a/IRaCIS.Core.Domain/Allocation/VisitTask.cs b/IRaCIS.Core.Domain/Allocation/VisitTask.cs index 349d52c5a..a01d73267 100644 --- a/IRaCIS.Core.Domain/Allocation/VisitTask.cs +++ b/IRaCIS.Core.Domain/Allocation/VisitTask.cs @@ -122,6 +122,9 @@ namespace IRaCIS.Core.Domain.Models /// public Guid? JudgeResultTaskId { get; set; } + [ForeignKey("JudgeResultTaskId")] + public VisitTask JudgeResultTask { get; set; } + /// /// 裁判结果的备注 ///