修改一版
parent
9033ffdca2
commit
bee1ebe768
|
@ -1465,6 +1465,36 @@
|
|||
答案
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.SaveMedicalReviewInfoInDto.IsHaveQuestion">
|
||||
<summary>
|
||||
是否有问题
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.SaveMedicalReviewInfoInDto.Questioning">
|
||||
<summary>
|
||||
质询问题
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.SaveMedicalReviewInfoInDto.ImagePath">
|
||||
<summary>
|
||||
图片路径
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.SaveMedicalReviewInfoInDto.AuditAdviceEnum">
|
||||
<summary>
|
||||
审核建议
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.SaveMedicalReviewInfoInDto.IsFinish">
|
||||
<summary>
|
||||
是否完成
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.SaveMedicalReviewInfoInDto.IsClosed">
|
||||
<summary>
|
||||
是否关闭
|
||||
</summary>
|
||||
</member>
|
||||
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.MedicalReviewInfo.IsHaveQuestion">
|
||||
<summary>
|
||||
是否有问题
|
||||
|
@ -2272,6 +2302,26 @@
|
|||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicalReviewService.SaveMedicineQuestion(IRaCIS.Core.Application.Service.Reading.Dto.SaveMedicineQuestionInDto)">
|
||||
<summary>
|
||||
保存医学审核问题
|
||||
</summary>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicalReviewService.SaveMedicalReviewInfo(IRaCIS.Core.Application.Service.Reading.Dto.SaveMedicalReviewInfoInDto)">
|
||||
<summary>
|
||||
保存医学审核信息
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:IRaCIS.Core.Application.Service.ReadingMedicalReviewService.SendMedicalReviewDialog(IRaCIS.Core.Application.Service.Reading.Dto.SendMedicalReviewDialogInDto)">
|
||||
<summary>
|
||||
发送对话消息
|
||||
</summary>
|
||||
<param name="inDto"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:IRaCIS.Core.Application.Service.ReadingMedicineQuestionService">
|
||||
<summary>
|
||||
医学审核问题
|
||||
|
|
|
@ -9,12 +9,21 @@ using System.Threading.Tasks;
|
|||
|
||||
namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
public class SendMedicalReviewDialogInDto
|
||||
{
|
||||
public Guid TaskMedicalReviewId { get; set; }
|
||||
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
public string Content { get; set; }
|
||||
}
|
||||
|
||||
public class SaveMedicineQuestionInDto
|
||||
{
|
||||
public Guid TaskMedicalReviewId { get; set; }
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
|
||||
|
||||
public List<MedicineQuestionAnswer> QuestionAnswerList { get; set; }
|
||||
}
|
||||
|
@ -55,8 +64,46 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
}
|
||||
|
||||
|
||||
public class SaveMedicalReviewInfoInDto
|
||||
{
|
||||
public Guid TaskMedicalReviewId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否有问题
|
||||
/// </summary>
|
||||
public bool IsHaveQuestion { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 质询问题
|
||||
/// </summary>
|
||||
public string Questioning { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 图片路径
|
||||
/// </summary>
|
||||
public string ImagePath { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 审核建议
|
||||
/// </summary>
|
||||
public AuditAdvice AuditAdviceEnum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否完成
|
||||
/// </summary>
|
||||
public bool IsFinish { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否关闭
|
||||
/// </summary>
|
||||
public bool IsClosed { get; set; }
|
||||
}
|
||||
|
||||
public class MedicalReviewInfo
|
||||
{
|
||||
public Guid TaskMedicalReviewId { get; set; }
|
||||
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||
private readonly IRepository<TaskMedicalReview> _taskMedicalReviewRepository;
|
||||
private readonly IRepository<ReadingMedicalReviewDialog> _readingMedicalReviewDialogRepository;
|
||||
private readonly IRepository<ReadingMedicineQuestionAnswer> _readingMedicineQuestionAnswerRepository;
|
||||
private readonly IRepository<ReadingMedicineSystemQuestion> _readingMedicineSystemQuestionRepository;
|
||||
|
||||
|
@ -30,6 +31,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
IRepository<Trial> trialRepository,
|
||||
IRepository<VisitTask> visitTaskRepository,
|
||||
IRepository<TaskMedicalReview> taskMedicalReviewRepository,
|
||||
IRepository<ReadingMedicalReviewDialog> readingMedicalReviewDialogRepository,
|
||||
IRepository<ReadingMedicineQuestionAnswer> readingMedicineQuestionAnswerRepository,
|
||||
IRepository<ReadingMedicineSystemQuestion> readingMedicineSystemQuestionRepository
|
||||
)
|
||||
|
@ -38,6 +40,7 @@ namespace IRaCIS.Core.Application.Service
|
|||
this._trialRepository = trialRepository;
|
||||
this._visitTaskRepository = visitTaskRepository;
|
||||
this._taskMedicalReviewRepository = taskMedicalReviewRepository;
|
||||
this._readingMedicalReviewDialogRepository = readingMedicalReviewDialogRepository;
|
||||
this._readingMedicineQuestionAnswerRepository = readingMedicineQuestionAnswerRepository;
|
||||
this._readingMedicineSystemQuestionRepository = readingMedicineSystemQuestionRepository;
|
||||
}
|
||||
|
@ -191,16 +194,74 @@ namespace IRaCIS.Core.Application.Service
|
|||
}
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 保存医学审核问题
|
||||
///// </summary>
|
||||
///// <returns></returns>
|
||||
//[HttpPost]
|
||||
//public async Task<IResponseOutput> SaveMedicineQuestion(SaveMedicineQuestionInDto inDto)
|
||||
//{
|
||||
// await _readingMedicineQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.TaskMedicalReviewId == inDto.TaskMedicalReviewId);
|
||||
/// <summary>
|
||||
/// 保存医学审核问题
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SaveMedicineQuestion(SaveMedicineQuestionInDto inDto)
|
||||
{
|
||||
await _readingMedicineQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.TaskMedicalReviewId == inDto.TaskMedicalReviewId);
|
||||
|
||||
//}
|
||||
List<ReadingMedicineQuestionAnswer> questionAnswerList = inDto.QuestionAnswerList.Select(x => new ReadingMedicineQuestionAnswer()
|
||||
{
|
||||
Answer = x.Answer,
|
||||
ReadingMedicineQuestionId = x.MedicineQuestionId,
|
||||
TaskMedicalReviewId = inDto.TaskMedicalReviewId,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
|
||||
}).ToList();
|
||||
|
||||
await _readingMedicineQuestionAnswerRepository.AddRangeAsync(questionAnswerList);
|
||||
|
||||
var result = await _readingMedicineQuestionAnswerRepository.SaveChangesAsync();
|
||||
|
||||
return ResponseOutput.Result(result);
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存医学审核信息
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> SaveMedicalReviewInfo(SaveMedicalReviewInfoInDto inDto)
|
||||
{
|
||||
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview()
|
||||
{
|
||||
IsHaveQuestion = inDto.IsHaveQuestion,
|
||||
Questioning = inDto.Questioning,
|
||||
ImagePath = inDto.ImagePath,
|
||||
AuditAdviceEnum = inDto.AuditAdviceEnum,
|
||||
IsFinish = inDto.IsFinish,
|
||||
IsClosed = inDto.IsClosed
|
||||
});
|
||||
|
||||
var result = await _taskMedicalReviewRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Result(result);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 发送对话消息
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IResponseOutput> SendMedicalReviewDialog(SendMedicalReviewDialogInDto inDto)
|
||||
{
|
||||
ReadingMedicalReviewDialog dialog = new ReadingMedicalReviewDialog()
|
||||
{
|
||||
TaskMedicalReviewId = inDto.TaskMedicalReviewId,
|
||||
UserTypeShortName = _userInfo.UserTypeShortName,
|
||||
Content = inDto.Content,
|
||||
UserTypeEnumInt = _userInfo.UserTypeEnumInt,
|
||||
VisitTaskId = inDto.VisitTaskId,
|
||||
};
|
||||
|
||||
await _readingMedicalReviewDialogRepository.AddAsync(dialog);
|
||||
|
||||
var result=await _readingMedicalReviewDialogRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Result(result);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,7 +93,8 @@ namespace IRaCIS.Core.Application.Service
|
|||
CreateMap<ReadingMedicineTrialQuestion, GetMedicineQuestionPreviewOutDto>();
|
||||
|
||||
|
||||
CreateMap<TaskMedicalReview, MedicalReviewInfo>();
|
||||
CreateMap<TaskMedicalReview, MedicalReviewInfo>()
|
||||
.ForMember(x => x.TaskMedicalReviewId, y => y.MapFrom(n => n.Id));
|
||||
#endregion
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue