修改一版
parent
6d7fcbb726
commit
178da67511
|
@ -145,6 +145,42 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public List<OncologyVisitTaskInfo> OncologyVisits { get; set; } = new List<OncologyVisitTaskInfo>();
|
||||
}
|
||||
|
||||
public class GetRelatedVisitTaskOutDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
public string TaskName { get; set; }
|
||||
|
||||
public string TaskBlindName { get; set; }
|
||||
|
||||
public decimal VisitTaskNum { get; set; }
|
||||
|
||||
public Guid? VisitId { get; set; }
|
||||
|
||||
public bool IsCurrentTask { get; set; }
|
||||
}
|
||||
|
||||
public class GetVisitReadingQuestionOutDto
|
||||
{
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
public Guid QuestionName { get; set; }
|
||||
|
||||
//public
|
||||
}
|
||||
|
||||
public class GetVisitReadingQuestionInDto
|
||||
{
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
public class GetRelatedVisitTaskInDto
|
||||
{
|
||||
[NotDefault]
|
||||
public Guid VisitTaskId { get; set; }
|
||||
}
|
||||
|
||||
public class GetOncologyReadingInfoInDto
|
||||
{
|
||||
public Guid VisitTaskId { get; set; }
|
||||
|
@ -499,6 +535,34 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
|
||||
}
|
||||
|
||||
public class SubmitTableQuestionInDto
|
||||
{
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
public int RowIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 任务Id
|
||||
/// </summary>
|
||||
public Guid TaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 项目Id
|
||||
/// </summary>
|
||||
public Guid TrialId { get; set; }
|
||||
|
||||
|
||||
public List<SubmitTableQuestionInfo> AnswerList { get; set; }
|
||||
|
||||
}
|
||||
|
||||
public class SubmitTableQuestionInfo
|
||||
{
|
||||
public Guid TableQuestionId { get; set; }
|
||||
|
||||
public string Answer { get; set; }
|
||||
}
|
||||
|
||||
public class GetTrialReadingQuestionInDto
|
||||
{
|
||||
[NotDefault]
|
||||
|
@ -706,5 +770,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
|||
public List<GetTrialReadingQuestionOutDto> Childrens { get; set; }
|
||||
}
|
||||
|
||||
///// <summary>
|
||||
///// 表格问题
|
||||
///// </summary>
|
||||
//public class GetTrialReadingTableQuestion
|
||||
//{
|
||||
// public List<> class TrialReadingTableQuestion
|
||||
//}
|
||||
|
||||
|
||||
//public class TrialReadingTableQuestion
|
||||
//{
|
||||
|
||||
//}
|
||||
}
|
||||
|
|
|
@ -30,6 +30,7 @@ namespace IRaCIS.Application.Services
|
|||
private readonly IRepository<NoneDicomStudy> _noneDicomStudyRepository;
|
||||
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||
private readonly IRepository<Trial> _trialRepository;
|
||||
private readonly IRepository<ReadingTableQuestionAnswer> _readingTableQuestionAnswerRepository;
|
||||
private readonly IRepository<ReadingOncologyTaskInfo> _readingOncologyTaskInfoRepository;
|
||||
private readonly IVisitTaskHelpeService _visitTaskHelpeService;
|
||||
private readonly IVisitTaskService _visitTaskService;
|
||||
|
@ -52,10 +53,10 @@ namespace IRaCIS.Application.Services
|
|||
IRepository<NoneDicomStudy> noneDicomStudyRepository,
|
||||
IRepository<VisitTask> visitTaskRepository,
|
||||
IRepository<Trial> TrialRepository,
|
||||
IRepository<ReadingOncologyTaskInfo> ReadingOncologyTaskInfoRepository,
|
||||
|
||||
IRepository<ReadingTableQuestionAnswer> ReadingTableQuestionAnswerRepository,
|
||||
IRepository<ReadingOncologyTaskInfo> ReadingOncologyTaskInfoRepository,
|
||||
IVisitTaskHelpeService visitTaskHelpeService,
|
||||
IVisitTaskService visitTaskService,
|
||||
IVisitTaskService visitTaskService,
|
||||
IReadingClinicalDataService readingClinicalDataService,
|
||||
IRepository<SubjectVisit> subjectVisitRepository,
|
||||
IRepository<Subject> subjectRepository,
|
||||
|
@ -66,7 +67,7 @@ namespace IRaCIS.Application.Services
|
|||
IRepository<ReadingTaskQuestionAnswer> readingTaskQuestionAnswerRepository,
|
||||
IRepository<ReadingQuestionCriterionTrial> readingQuestionCriterionTrialRepository,
|
||||
IRepository<ReadingQuestionCriterionSystem> readingQuestionCriterionSystemRepository,
|
||||
IRepository<ReadingQuestionSystem> ReadingQuestionSystem,
|
||||
IRepository<ReadingQuestionSystem> ReadingQuestionSystem,
|
||||
IRepository<ReadingQuestionTrial> readingQuestionTrialRepository
|
||||
)
|
||||
{
|
||||
|
@ -74,6 +75,7 @@ namespace IRaCIS.Application.Services
|
|||
this._noneDicomStudyRepository = noneDicomStudyRepository;
|
||||
this._visitTaskRepository = visitTaskRepository;
|
||||
this._trialRepository = TrialRepository;
|
||||
this._readingTableQuestionAnswerRepository = ReadingTableQuestionAnswerRepository;
|
||||
this._readingOncologyTaskInfoRepository = ReadingOncologyTaskInfoRepository;
|
||||
this._visitTaskHelpeService = visitTaskHelpeService;
|
||||
this._visitTaskService = visitTaskService;
|
||||
|
@ -91,6 +93,51 @@ namespace IRaCIS.Application.Services
|
|||
this._readingQuestionTrialRepository = readingQuestionTrialRepository;
|
||||
}
|
||||
|
||||
#region 表格问题相关
|
||||
|
||||
|
||||
//public async Task<> GetVisitReadingQuestion(GetVisitReadingQuestionInDto inDto)
|
||||
//{
|
||||
|
||||
//}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取关联的阅片任务
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<GetRelatedVisitTaskOutDto>> GetRelatedVisitTask(GetRelatedVisitTaskInDto inDto)
|
||||
{
|
||||
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||
var result = await _visitTaskRepository.Where(x =>
|
||||
(x.TrialId == taskInfo.TrialId &&
|
||||
x.SubjectId == taskInfo.SubjectId &&
|
||||
x.ArmEnum == taskInfo.ArmEnum &&
|
||||
x.DoctorUserId == taskInfo.DoctorUserId &&
|
||||
x.ReadingTaskState == ReadingTaskState.HaveSigned &&
|
||||
x.TaskState == TaskState.Effect &&
|
||||
x.IsAnalysisCreate == taskInfo.IsAnalysisCreate &&
|
||||
x.ReadingCategory == ReadingCategory.Visit) || x.Id == inDto.VisitTaskId)
|
||||
.Select(x => new GetRelatedVisitTaskOutDto()
|
||||
{
|
||||
TaskBlindName=x.TaskBlindName,
|
||||
TaskName=x.TaskName,
|
||||
VisitId=x.SourceSubjectVisitId,
|
||||
VisitTaskId=x.Id,
|
||||
VisitTaskNum=x.VisitTaskNum,
|
||||
IsCurrentTask=x.Id==inDto.VisitTaskId,
|
||||
|
||||
}).OrderBy(x => x.VisitTaskNum).ToListAsync();
|
||||
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 肿瘤学阅片相关
|
||||
|
||||
/// <summary>
|
||||
|
@ -655,6 +702,8 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
#region 获取项目的阅片问题
|
||||
/// <summary>
|
||||
/// 获取项目的阅片问题
|
||||
|
@ -1089,6 +1138,9 @@ namespace IRaCIS.Application.Services
|
|||
}
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
|
||||
#region 获取既往结果
|
||||
/// <summary>
|
||||
/// 获取既往结果
|
||||
|
@ -1171,6 +1223,30 @@ namespace IRaCIS.Application.Services
|
|||
|
||||
#region 提交问题
|
||||
|
||||
/// <summary>
|
||||
/// 提交表格问题
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<IResponseOutput> SubmitTableQuestion(SubmitTableQuestionInDto inDto)
|
||||
{
|
||||
await _readingTableQuestionAnswerRepository.BatchDeleteNoTrackingAsync(x => x.TaskId == inDto.TaskId && x.QuestionId == inDto.QuestionId && x.TrialId == inDto.TrialId);
|
||||
List<ReadingTableQuestionAnswer> answerList = inDto.AnswerList.Select(x => new ReadingTableQuestionAnswer()
|
||||
{
|
||||
Answer=x.Answer,
|
||||
Id= NewId.NextGuid(),
|
||||
TrialId=inDto.TrialId,
|
||||
QuestionId=inDto.QuestionId,
|
||||
TableQuestionId=x.TableQuestionId,
|
||||
RowIndex=inDto.RowIndex,
|
||||
TaskId=inDto.TaskId
|
||||
}).ToList();
|
||||
await _readingTableQuestionAnswerRepository.AddRangeAsync(answerList);
|
||||
await _readingTableQuestionAnswerRepository.SaveChangesAsync();
|
||||
return ResponseOutput.Ok(true);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交访视阅片问题
|
||||
/// </summary>
|
||||
|
|
|
@ -20,10 +20,15 @@ namespace IRaCIS.Core.Domain.Models
|
|||
/// </summary>
|
||||
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 任务Id
|
||||
/// </summary>
|
||||
/// 表格问题Id
|
||||
/// </summary>
|
||||
public Guid TableQuestionId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 任务Id
|
||||
/// </summary>
|
||||
public Guid TaskId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
|
Loading…
Reference in New Issue