Uat_Study
parent
9e0f4eb0d6
commit
c9b6287b46
|
@ -24,6 +24,16 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
|
|
||||||
public decimal VisitTaskNum { get; set; }
|
public decimal VisitTaskNum { get; set; }
|
||||||
|
|
||||||
|
public bool IsUrgent { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 加急类型
|
||||||
|
/// </summary>
|
||||||
|
public TaskUrgentType? TaskUrgentType { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
public string TaskUrgentRemake { get; set; } = string.Empty;
|
||||||
|
|
||||||
public ReadingCategory ReadingCategory { get; set; }
|
public ReadingCategory ReadingCategory { get; set; }
|
||||||
|
|
||||||
public TaskAllocationState TaskAllocationState { get; set; }
|
public TaskAllocationState TaskAllocationState { get; set; }
|
||||||
|
|
|
@ -158,6 +158,21 @@ namespace IRaCIS.Core.Application.Service
|
||||||
currentMaxCodeInt = currentMaxCodeInt + 1;
|
currentMaxCodeInt = currentMaxCodeInt + 1;
|
||||||
|
|
||||||
|
|
||||||
|
TaskUrgentType? taskUrgentType = null;
|
||||||
|
|
||||||
|
if (subjectVisit.PDState == PDStateEnum.PDProgress)
|
||||||
|
{
|
||||||
|
taskUrgentType = TaskUrgentType.PDProgress;
|
||||||
|
}
|
||||||
|
else if (subjectVisit.IsEnrollmentConfirm)
|
||||||
|
{
|
||||||
|
taskUrgentType = TaskUrgentType.EnrollmentConfirm;
|
||||||
|
}
|
||||||
|
else if (subjectVisit.IsUrgent)
|
||||||
|
{
|
||||||
|
taskUrgentType = TaskUrgentType.VisitUrgent;
|
||||||
|
}
|
||||||
|
|
||||||
task1 = await _visitTaskRepository.AddAsync(new VisitTask()
|
task1 = await _visitTaskRepository.AddAsync(new VisitTask()
|
||||||
{
|
{
|
||||||
TrialId = trialId,
|
TrialId = trialId,
|
||||||
|
@ -166,6 +181,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
TaskBlindName = blindTaskName,
|
TaskBlindName = blindTaskName,
|
||||||
TaskName = subjectVisit.VisitName,
|
TaskName = subjectVisit.VisitName,
|
||||||
VisitTaskNum = subjectVisit.VisitNum,
|
VisitTaskNum = subjectVisit.VisitNum,
|
||||||
|
TaskUrgentType = taskUrgentType,
|
||||||
//CheckPassedTime = subjectVisit.CheckPassedTime,
|
//CheckPassedTime = subjectVisit.CheckPassedTime,
|
||||||
ArmEnum = Arm.DoubleReadingArm1,//特殊
|
ArmEnum = Arm.DoubleReadingArm1,//特殊
|
||||||
Code = currentMaxCodeInt,
|
Code = currentMaxCodeInt,
|
||||||
|
@ -176,7 +192,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
TrialReadingCriterionId = trialReadingCriterionConfig.TrialReadingCriterionId,
|
TrialReadingCriterionId = trialReadingCriterionConfig.TrialReadingCriterionId,
|
||||||
IsNeedClinicalDataSign = isNeedClinicalDataSign,
|
IsNeedClinicalDataSign = isNeedClinicalDataSign,
|
||||||
IsClinicalDataSign = isClinicalDataSign
|
IsClinicalDataSign = isClinicalDataSign
|
||||||
});
|
}) ;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,6 +66,24 @@ namespace IRaCIS.Core.Application.Service.Allocation
|
||||||
_trialReadingCriterionRepository = trialReadingCriterionRepository;
|
_trialReadingCriterionRepository = trialReadingCriterionRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设置任务加急
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<bool> SetTaskUrgent(SetTaskUrgentInDto inDto)
|
||||||
|
{
|
||||||
|
await _visitTaskRepository.UpdatePartialFromQueryAsync(inDto.VisitTaskId, x => new VisitTask()
|
||||||
|
{
|
||||||
|
IsUrgent = inDto.IsUrgent,
|
||||||
|
TaskUrgentType = inDto.TaskUrgentType,
|
||||||
|
TaskUrgentRemake = inDto.TaskUrgentRemake,
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
return await _visitTaskRepository.SaveChangesAsync();
|
||||||
|
}
|
||||||
|
|
||||||
public async Task<List<TrialReadingCriterionDto>> GetTrialCriterionList(Guid trialId, bool isHaveSigned = true)
|
public async Task<List<TrialReadingCriterionDto>> GetTrialCriterionList(Guid trialId, bool isHaveSigned = true)
|
||||||
{
|
{
|
||||||
|
|
|
@ -33,8 +33,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
private readonly IRepository<QCChallengeDialog> _qCChallengeDialogrepository;
|
private readonly IRepository<QCChallengeDialog> _qCChallengeDialogrepository;
|
||||||
private readonly IRepository<CheckChallengeDialog> _checkChallengeDialogrepository;
|
private readonly IRepository<CheckChallengeDialog> _checkChallengeDialogrepository;
|
||||||
private readonly IRepository<Trial> _trialRepository;
|
private readonly IRepository<Trial> _trialRepository;
|
||||||
|
private readonly IRepository<VisitTask> _visitTaskRepository;
|
||||||
|
|
||||||
private readonly IVisitTaskHelpeService _IVisitTaskHelpeService;
|
private readonly IVisitTaskHelpeService _IVisitTaskHelpeService;
|
||||||
|
|
||||||
private readonly AsyncLock _mutex = new AsyncLock();
|
private readonly AsyncLock _mutex = new AsyncLock();
|
||||||
|
@ -42,6 +41,7 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
public QCOperationService(IRepository<SubjectVisit> subjectVisitRepository,
|
public QCOperationService(IRepository<SubjectVisit> subjectVisitRepository,
|
||||||
IRepository<QCChallenge> qcChallengeRepository,
|
IRepository<QCChallenge> qcChallengeRepository,
|
||||||
IRepository<Trial> trialRepository,
|
IRepository<Trial> trialRepository,
|
||||||
|
IRepository<VisitTask> visitTaskRepository,
|
||||||
IRepository<DicomStudy> dicomStudyRepository,
|
IRepository<DicomStudy> dicomStudyRepository,
|
||||||
IRepository<DicomSeries> dicomSeriesrepository,
|
IRepository<DicomSeries> dicomSeriesrepository,
|
||||||
IRepository<Subject> subjectRepository,
|
IRepository<Subject> subjectRepository,
|
||||||
|
@ -60,8 +60,8 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
this._qCChallengeDialogrepository = qCChallengeDialogrepository;
|
this._qCChallengeDialogrepository = qCChallengeDialogrepository;
|
||||||
this._checkChallengeDialogrepository = checkChallengeDialogrepository;
|
this._checkChallengeDialogrepository = checkChallengeDialogrepository;
|
||||||
_trialRepository = trialRepository;
|
_trialRepository = trialRepository;
|
||||||
|
this._visitTaskRepository = visitTaskRepository;
|
||||||
_IVisitTaskHelpeService= visitTaskHelpeService;
|
_IVisitTaskHelpeService = visitTaskHelpeService;
|
||||||
}
|
}
|
||||||
|
|
||||||
#region QC质疑 以及回复 关闭
|
#region QC质疑 以及回复 关闭
|
||||||
|
@ -1233,6 +1233,47 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
//项目或者Subject IsUrgent 提交时 访视也设置为紧急
|
//项目或者Subject IsUrgent 提交时 访视也设置为紧急
|
||||||
if (trialConfig.IsUrgent || dbSubjectVisit.Subject.IsUrgent || (dbSubjectVisit.PDState == PDStateEnum.PDProgress && !dbSubjectVisit.IsBaseLine) || (dbSubjectVisit.IsEnrollmentConfirm && dbSubjectVisit.IsBaseLine))
|
if (trialConfig.IsUrgent || dbSubjectVisit.Subject.IsUrgent || (dbSubjectVisit.PDState == PDStateEnum.PDProgress && !dbSubjectVisit.IsBaseLine) || (dbSubjectVisit.IsEnrollmentConfirm && dbSubjectVisit.IsBaseLine))
|
||||||
{
|
{
|
||||||
|
if (dbSubjectVisit.PDState == PDStateEnum.PDProgress)
|
||||||
|
{
|
||||||
|
await _subjectVisitRepository.BatchUpdateNoTrackingAsync(x => x.SubjectId == dbSubjectVisit.SubjectId && x.VisitNum < dbSubjectVisit.VisitNum, x => new SubjectVisit()
|
||||||
|
{
|
||||||
|
IsUrgent = true
|
||||||
|
});
|
||||||
|
|
||||||
|
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.SourceSubjectVisitId == dbSubjectVisit.Id && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.TaskState == TaskState.Effect, x => new VisitTask()
|
||||||
|
{
|
||||||
|
|
||||||
|
IsUrgent = true,
|
||||||
|
TaskUrgentType = TaskUrgentType.PDProgress,
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.SubjectId == dbSubjectVisit.SubjectId && x.VisitTaskNum < dbSubjectVisit.VisitNum && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.TaskState == TaskState.Effect, x => new VisitTask()
|
||||||
|
{
|
||||||
|
|
||||||
|
IsUrgent = true,
|
||||||
|
TaskUrgentType = TaskUrgentType.PDProgress,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else if (dbSubjectVisit.IsEnrollmentConfirm)
|
||||||
|
{
|
||||||
|
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.SourceSubjectVisitId == dbSubjectVisit.Id && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.TaskState == TaskState.Effect, x => new VisitTask()
|
||||||
|
{
|
||||||
|
|
||||||
|
IsUrgent = true,
|
||||||
|
TaskUrgentType = TaskUrgentType.EnrollmentConfirm,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
await _visitTaskRepository.BatchUpdateNoTrackingAsync(x => x.SourceSubjectVisitId == dbSubjectVisit.Id && x.ReadingTaskState != ReadingTaskState.HaveSigned && x.TaskState == TaskState.Effect, x => new VisitTask()
|
||||||
|
{
|
||||||
|
|
||||||
|
IsUrgent = true,
|
||||||
|
TaskUrgentType = TaskUrgentType.VisitUrgent,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
dbSubjectVisit.IsUrgent = true;
|
dbSubjectVisit.IsUrgent = true;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1296,6 +1337,9 @@ namespace IRaCIS.Core.Application.Image.QA
|
||||||
//非基线设置为PD的话 或者设置为末次访视 根据配置自动生成阅片期
|
//非基线设置为PD的话 或者设置为末次访视 根据配置自动生成阅片期
|
||||||
if (!dbSubjectVisit.IsBaseLine && dbSubjectVisit.PDState == PDStateEnum.PDProgress && dbSubjectVisit.IsFinalVisit)
|
if (!dbSubjectVisit.IsBaseLine && dbSubjectVisit.PDState == PDStateEnum.PDProgress && dbSubjectVisit.IsFinalVisit)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//该标准需要添加阅片期
|
//该标准需要添加阅片期
|
||||||
foreach (var trialReadingCriterionId in trialReadingCriterionIdList)
|
foreach (var trialReadingCriterionId in trialReadingCriterionIdList)
|
||||||
{
|
{
|
||||||
|
|
|
@ -439,6 +439,22 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 没有靶病灶只计算最后几个
|
||||||
|
if (inDto.QuestionInfo.Where(x => x.LesionType == LesionType.TargetLesion).Sum(x => x.TableRowInfoList.Count()) == 0)
|
||||||
|
{
|
||||||
|
|
||||||
|
List<QuestionType> questionTypes = new List<QuestionType>()
|
||||||
|
{
|
||||||
|
QuestionType.TargetLesion,
|
||||||
|
QuestionType.NoTargetLesion,
|
||||||
|
QuestionType.NewLesions,
|
||||||
|
QuestionType.Tumor,
|
||||||
|
QuestionType.ExistDisease,
|
||||||
|
};
|
||||||
|
|
||||||
|
calculateList = calculateList.Where(x => questionTypes.Contains(x.QuestionType)).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
if (calculateType != null)
|
if (calculateType != null)
|
||||||
{
|
{
|
||||||
calculateList = calculateList.Where(x => calculateType.Contains(x.QuestionType)).ToList();
|
calculateList = calculateList.Where(x => calculateType.Contains(x.QuestionType)).ToList();
|
||||||
|
|
|
@ -304,7 +304,23 @@ namespace IRaCIS.Application.Contracts
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class SetTaskUrgentInDto
|
||||||
|
{
|
||||||
|
public Guid VisitTaskId { get; set; }
|
||||||
|
|
||||||
|
public bool IsUrgent { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 加急类型
|
||||||
|
/// </summary>
|
||||||
|
public TaskUrgentType? TaskUrgentType { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 任务加急备注
|
||||||
|
/// </summary>
|
||||||
|
public string TaskUrgentRemake { get; set; } = string.Empty;
|
||||||
|
}
|
||||||
public class DoctorUserTask
|
public class DoctorUserTask
|
||||||
{
|
{
|
||||||
public ReadingTaskState ReadingTaskState { get; set; }
|
public ReadingTaskState ReadingTaskState { get; set; }
|
||||||
|
|
|
@ -300,6 +300,32 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 任务加急状态
|
||||||
|
/// </summary>
|
||||||
|
public enum TaskUrgentType
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 入组确认
|
||||||
|
/// </summary>
|
||||||
|
EnrollmentConfirm=1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// PD进展
|
||||||
|
/// </summary>
|
||||||
|
PDProgress=2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 访视加急
|
||||||
|
/// </summary>
|
||||||
|
VisitUrgent=3,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 其他
|
||||||
|
/// </summary>
|
||||||
|
Other=4,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//public enum AnalysisType
|
//public enum AnalysisType
|
||||||
//{
|
//{
|
||||||
|
|
|
@ -56,6 +56,16 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
public bool IsUrgent { get; set; }
|
public bool IsUrgent { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 加急类型
|
||||||
|
/// </summary>
|
||||||
|
public TaskUrgentType? TaskUrgentType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 任务加急类型
|
||||||
|
/// </summary>
|
||||||
|
public string TaskUrgentRemake { get; set; } = string.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2
|
/// 0 代表 单重阅片 产生的任务 否则就是双重 任务 1 任务 2
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue