Uat_Study
parent
396c8ca2df
commit
507e92d261
|
@ -64,6 +64,45 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// 创建时间
|
/// 创建时间
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 阅片人是否认同
|
||||||
|
/// </summary>
|
||||||
|
public MedicalReviewDoctorUserIdea DoctorUserIdeaEnum { get; set; } = MedicalReviewDoctorUserIdea.defalut;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否有问题
|
||||||
|
/// </summary>
|
||||||
|
public bool IsHaveQuestion { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 质询问题
|
||||||
|
/// </summary>
|
||||||
|
public string Questioning { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 审核建议
|
||||||
|
/// </summary>
|
||||||
|
public AuditAdvice AuditAdviceEnum { get; set; } = AuditAdvice.None;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 不同意重阅原因
|
||||||
|
/// </summary>
|
||||||
|
public string DisagreeReason { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否申请重阅
|
||||||
|
/// </summary>
|
||||||
|
public bool IsApplyHeavyReading { get; set; } = false;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否是当前用户
|
||||||
|
/// </summary>
|
||||||
|
public bool IsCurrentUser { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string CreateUserName { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetMedicalReviewDialogInDto
|
public class GetMedicalReviewDialogInDto
|
||||||
|
@ -74,7 +113,38 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public class SendMedicalReviewDialogInDto
|
public class SendMedicalReviewDialogInDto
|
||||||
{
|
{
|
||||||
public Guid TaskMedicalReviewId { get; set; }
|
public Guid TaskMedicalReviewId { get; set; }
|
||||||
|
|
||||||
public string Content { get; set; }
|
public string Content { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 阅片人是否认同
|
||||||
|
/// </summary>
|
||||||
|
public MedicalReviewDoctorUserIdea DoctorUserIdeaEnum { get; set; } = MedicalReviewDoctorUserIdea.defalut;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否有问题
|
||||||
|
/// </summary>
|
||||||
|
public bool IsHaveQuestion { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 质询问题
|
||||||
|
/// </summary>
|
||||||
|
public string Questioning { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 审核建议
|
||||||
|
/// </summary>
|
||||||
|
public AuditAdvice AuditAdviceEnum { get; set; } = AuditAdvice.None;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 不同意重阅原因
|
||||||
|
/// </summary>
|
||||||
|
public string DisagreeReason { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否申请重阅
|
||||||
|
/// </summary>
|
||||||
|
public bool IsApplyHeavyReading { get; set; } = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SaveMedicineQuestionInDto
|
public class SaveMedicineQuestionInDto
|
||||||
|
@ -145,6 +215,8 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public class SaveMedicalReviewInfoInDto
|
public class SaveMedicalReviewInfoInDto
|
||||||
{
|
{
|
||||||
|
public bool IsSendDialog { get; set; }
|
||||||
|
|
||||||
public Guid TaskMedicalReviewId { get; set; }
|
public Guid TaskMedicalReviewId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
private readonly IRepository<ReadingMedicineTrialQuestion> _readingMedicineTrialQuestionRepository;
|
private readonly IRepository<ReadingMedicineTrialQuestion> _readingMedicineTrialQuestionRepository;
|
||||||
private readonly IRepository<Trial> _trialRepository;
|
private readonly IRepository<Trial> _trialRepository;
|
||||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||||
|
private readonly IRepository<User> _userTaskRepository;
|
||||||
private readonly IRepository<TaskMedicalReview> _taskMedicalReviewRepository;
|
private readonly IRepository<TaskMedicalReview> _taskMedicalReviewRepository;
|
||||||
private readonly IRepository<ReadingMedicalReviewDialog> _readingMedicalReviewDialogRepository;
|
private readonly IRepository<ReadingMedicalReviewDialog> _readingMedicalReviewDialogRepository;
|
||||||
private readonly IRepository<ReadingMedicineQuestionAnswer> _readingMedicineQuestionAnswerRepository;
|
private readonly IRepository<ReadingMedicineQuestionAnswer> _readingMedicineQuestionAnswerRepository;
|
||||||
|
@ -32,6 +33,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
IRepository<ReadingMedicineTrialQuestion> readingMedicineTrialQuestionRepository,
|
IRepository<ReadingMedicineTrialQuestion> readingMedicineTrialQuestionRepository,
|
||||||
IRepository<Trial> trialRepository,
|
IRepository<Trial> trialRepository,
|
||||||
IRepository<VisitTask> visitTaskRepository,
|
IRepository<VisitTask> visitTaskRepository,
|
||||||
|
IRepository<User> userTaskRepository,
|
||||||
IRepository<TaskMedicalReview> taskMedicalReviewRepository,
|
IRepository<TaskMedicalReview> taskMedicalReviewRepository,
|
||||||
IRepository<ReadingMedicalReviewDialog> readingMedicalReviewDialogRepository,
|
IRepository<ReadingMedicalReviewDialog> readingMedicalReviewDialogRepository,
|
||||||
IRepository<ReadingMedicineQuestionAnswer> readingMedicineQuestionAnswerRepository,
|
IRepository<ReadingMedicineQuestionAnswer> readingMedicineQuestionAnswerRepository,
|
||||||
|
@ -41,6 +43,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
this._readingMedicineTrialQuestionRepository = readingMedicineTrialQuestionRepository;
|
this._readingMedicineTrialQuestionRepository = readingMedicineTrialQuestionRepository;
|
||||||
this._trialRepository = trialRepository;
|
this._trialRepository = trialRepository;
|
||||||
this._visitTaskRepository = visitTaskRepository;
|
this._visitTaskRepository = visitTaskRepository;
|
||||||
|
this._userTaskRepository = userTaskRepository;
|
||||||
this._taskMedicalReviewRepository = taskMedicalReviewRepository;
|
this._taskMedicalReviewRepository = taskMedicalReviewRepository;
|
||||||
this._readingMedicalReviewDialogRepository = readingMedicalReviewDialogRepository;
|
this._readingMedicalReviewDialogRepository = readingMedicalReviewDialogRepository;
|
||||||
this._readingMedicineQuestionAnswerRepository = readingMedicineQuestionAnswerRepository;
|
this._readingMedicineQuestionAnswerRepository = readingMedicineQuestionAnswerRepository;
|
||||||
|
@ -252,9 +255,25 @@ namespace IRaCIS.Core.Application.Service
|
||||||
Questioning = inDto.Questioning,
|
Questioning = inDto.Questioning,
|
||||||
ImagePath = inDto.ImagePath,
|
ImagePath = inDto.ImagePath,
|
||||||
AuditAdviceEnum = inDto.AuditAdviceEnum,
|
AuditAdviceEnum = inDto.AuditAdviceEnum,
|
||||||
|
SaveConclusionTime=DateTime.Now,
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
if(inDto.IsSendDialog)
|
||||||
|
{
|
||||||
|
var visitTaskId = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).Select(x => x.VisitTaskId).FirstOrDefaultAsync();
|
||||||
|
await _readingMedicalReviewDialogRepository.AddAsync(new ReadingMedicalReviewDialog()
|
||||||
|
{
|
||||||
|
AuditAdviceEnum = inDto.AuditAdviceEnum,
|
||||||
|
TaskMedicalReviewId = inDto.TaskMedicalReviewId,
|
||||||
|
UserTypeShortName = _userInfo.UserTypeShortName,
|
||||||
|
IsHaveQuestion=inDto.IsHaveQuestion,
|
||||||
|
Questioning=inDto.Questioning,
|
||||||
|
VisitTaskId= visitTaskId,
|
||||||
|
UserTypeEnumInt = _userInfo.UserTypeEnumInt,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var result = await _taskMedicalReviewRepository.SaveChangesAsync();
|
var result = await _taskMedicalReviewRepository.SaveChangesAsync();
|
||||||
return ResponseOutput.Result(result);
|
return ResponseOutput.Result(result);
|
||||||
}
|
}
|
||||||
|
@ -291,6 +310,12 @@ namespace IRaCIS.Core.Application.Service
|
||||||
Content = inDto.Content,
|
Content = inDto.Content,
|
||||||
UserTypeEnumInt = _userInfo.UserTypeEnumInt,
|
UserTypeEnumInt = _userInfo.UserTypeEnumInt,
|
||||||
VisitTaskId = visitTaskId,
|
VisitTaskId = visitTaskId,
|
||||||
|
AuditAdviceEnum=inDto.AuditAdviceEnum,
|
||||||
|
DisagreeReason=inDto.DisagreeReason,
|
||||||
|
DoctorUserIdeaEnum=inDto.DoctorUserIdeaEnum,
|
||||||
|
IsApplyHeavyReading=inDto.IsApplyHeavyReading,
|
||||||
|
IsHaveQuestion=inDto.IsHaveQuestion,
|
||||||
|
Questioning=inDto.Questioning,
|
||||||
};
|
};
|
||||||
|
|
||||||
await _readingMedicalReviewDialogRepository.AddAsync(dialog);
|
await _readingMedicalReviewDialogRepository.AddAsync(dialog);
|
||||||
|
@ -308,17 +333,11 @@ namespace IRaCIS.Core.Application.Service
|
||||||
public async Task<List<GetMedicalReviewDialogOutDto>> GetMedicalReviewDialog(GetMedicalReviewDialogInDto inDto)
|
public async Task<List<GetMedicalReviewDialogOutDto>> GetMedicalReviewDialog(GetMedicalReviewDialogInDto inDto)
|
||||||
{
|
{
|
||||||
List<GetMedicalReviewDialogOutDto> result = await _readingMedicalReviewDialogRepository.Where(x => x.TaskMedicalReviewId == inDto.TaskMedicalReviewId)
|
List<GetMedicalReviewDialogOutDto> result = await _readingMedicalReviewDialogRepository.Where(x => x.TaskMedicalReviewId == inDto.TaskMedicalReviewId)
|
||||||
.Select(x => new GetMedicalReviewDialogOutDto()
|
.ProjectTo<GetMedicalReviewDialogOutDto>(_mapper.ConfigurationProvider)
|
||||||
{
|
.OrderBy(x => x.CreateTime).ToListAsync();
|
||||||
|
result.ForEach(x => {
|
||||||
Content = x.Content,
|
x.IsCurrentUser = x.CreateUserId == _userInfo.Id;
|
||||||
CreateTime = x.CreateTime,
|
});
|
||||||
CreateUserId = x.CreateUserId,
|
|
||||||
UserTypeEnumInt = x.UserTypeEnumInt,
|
|
||||||
UserTypeShortName = x.UserTypeShortName,
|
|
||||||
|
|
||||||
}).OrderBy(x => x.CreateTime).ToListAsync();
|
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -331,7 +350,18 @@ namespace IRaCIS.Core.Application.Service
|
||||||
public async Task<IResponseOutput> FinishMedicalReview(FinishMedicalReviewInDto inDto)
|
public async Task<IResponseOutput> FinishMedicalReview(FinishMedicalReviewInDto inDto)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
var taskmedicalReview = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).Select(x => new
|
||||||
|
{
|
||||||
|
x.SaveConclusionTime,
|
||||||
|
x.SaveQuestionTime,
|
||||||
|
|
||||||
|
}).FirstNotNullAsync();
|
||||||
|
|
||||||
|
if (taskmedicalReview.SaveQuestionTime == null || taskmedicalReview.SaveConclusionTime==null)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException("请先保存问题和结论");
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview()
|
await _taskMedicalReviewRepository.UpdatePartialFromQueryAsync(inDto.TaskMedicalReviewId, x => new TaskMedicalReview()
|
||||||
{
|
{
|
||||||
|
@ -358,6 +388,19 @@ namespace IRaCIS.Core.Application.Service
|
||||||
IsApplyHeavyReading=inDto.IsApplyHeavyReading,
|
IsApplyHeavyReading=inDto.IsApplyHeavyReading,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
var visitTaskId = await _taskMedicalReviewRepository.Where(x => x.Id == inDto.TaskMedicalReviewId).Select(x => x.VisitTaskId).FirstOrDefaultAsync();
|
||||||
|
await _readingMedicalReviewDialogRepository.AddAsync(new ReadingMedicalReviewDialog()
|
||||||
|
{
|
||||||
|
|
||||||
|
TaskMedicalReviewId = inDto.TaskMedicalReviewId,
|
||||||
|
UserTypeShortName = _userInfo.UserTypeShortName,
|
||||||
|
DoctorUserIdeaEnum = inDto.DoctorUserIdeaEnum,
|
||||||
|
DisagreeReason = inDto.DisagreeReason,
|
||||||
|
IsApplyHeavyReading = inDto.IsApplyHeavyReading,
|
||||||
|
VisitTaskId = visitTaskId,
|
||||||
|
UserTypeEnumInt = _userInfo.UserTypeEnumInt,
|
||||||
|
});
|
||||||
|
|
||||||
var result = await _taskMedicalReviewRepository.SaveChangesAsync();
|
var result = await _taskMedicalReviewRepository.SaveChangesAsync();
|
||||||
return ResponseOutput.Result(result);
|
return ResponseOutput.Result(result);
|
||||||
}
|
}
|
||||||
|
|
|
@ -95,6 +95,10 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
CreateMap<TaskMedicalReview, MedicalReviewInfo>()
|
CreateMap<TaskMedicalReview, MedicalReviewInfo>()
|
||||||
.ForMember(x => x.TaskMedicalReviewId, y => y.MapFrom(n => n.Id));
|
.ForMember(x => x.TaskMedicalReviewId, y => y.MapFrom(n => n.Id));
|
||||||
|
|
||||||
|
CreateMap<ReadingMedicalReviewDialog, GetMedicalReviewDialogOutDto>()
|
||||||
|
.ForMember(x => x.CreateUserName, y => y.MapFrom(n => n.CreateUser.UserName));
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -128,6 +128,12 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
public bool IsApplyHeavyReading { get; set; } = false;
|
public bool IsApplyHeavyReading { get; set; } = false;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 保存结论时间
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? SaveConclusionTime { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,6 +50,40 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 阅片人是否认同
|
||||||
|
/// </summary>
|
||||||
|
public MedicalReviewDoctorUserIdea DoctorUserIdeaEnum { get; set; } = MedicalReviewDoctorUserIdea.defalut;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否有问题
|
||||||
|
/// </summary>
|
||||||
|
public bool IsHaveQuestion { get; set; } = false;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 质询问题
|
||||||
|
/// </summary>
|
||||||
|
public string Questioning { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 审核建议
|
||||||
|
/// </summary>
|
||||||
|
public AuditAdvice AuditAdviceEnum { get; set; } = AuditAdvice.None;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 不同意重阅原因
|
||||||
|
/// </summary>
|
||||||
|
public string DisagreeReason { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 是否申请重阅
|
||||||
|
/// </summary>
|
||||||
|
public bool IsApplyHeavyReading { get; set; } = false;
|
||||||
|
|
||||||
|
[ForeignKey("CreateUserId")]
|
||||||
|
public User CreateUser { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue