Uat_Study
parent
282abdf8c8
commit
816d6cbe13
|
@ -27,7 +27,34 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class SetTrialJudgyInfoInDto : GetTrialJudgyInfoOutDto
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GetTrialJudgyInfoOutDto
|
||||||
|
{
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 仲裁阅片
|
||||||
|
/// </summary>
|
||||||
|
public bool? IsArbitrationReading { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 仲裁规则
|
||||||
|
/// </summary>
|
||||||
|
public ArbitrationRule ArbitrationRule { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public class GetTrialJudgyInfoInDto
|
||||||
|
{
|
||||||
|
[NotDefault]
|
||||||
|
public Guid TrialId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public class ReadingCriterionPageAddOrEdit
|
public class ReadingCriterionPageAddOrEdit
|
||||||
{
|
{
|
||||||
public Guid? Id { get; set; }
|
public Guid? Id { get; set; }
|
||||||
|
|
|
@ -200,6 +200,8 @@ namespace IRaCIS.Application.Services
|
||||||
IsExistsSubjectClinicalData= await _clinicalDataTrialSetRepository.AnyAsync(x => x.TrialId == dto.TrialId&&x.ClinicalDataLevel== ClinicalLevel.Subject && x.IsConfirm),
|
IsExistsSubjectClinicalData= await _clinicalDataTrialSetRepository.AnyAsync(x => x.TrialId == dto.TrialId&&x.ClinicalDataLevel== ClinicalLevel.Subject && x.IsConfirm),
|
||||||
IsExistsVisitClinicalData = await _clinicalDataTrialSetRepository.AnyAsync(x => x.TrialId == dto.TrialId && x.ClinicalDataLevel == ClinicalLevel.SubjectVisit && x.IsConfirm),
|
IsExistsVisitClinicalData = await _clinicalDataTrialSetRepository.AnyAsync(x => x.TrialId == dto.TrialId && x.ClinicalDataLevel == ClinicalLevel.SubjectVisit && x.IsConfirm),
|
||||||
IsExistsReadingClinicalData = await _clinicalDataTrialSetRepository.AnyAsync(x => x.TrialId == dto.TrialId && x.ClinicalDataLevel == ClinicalLevel.Read && x.IsConfirm),
|
IsExistsReadingClinicalData = await _clinicalDataTrialSetRepository.AnyAsync(x => x.TrialId == dto.TrialId && x.ClinicalDataLevel == ClinicalLevel.Read && x.IsConfirm),
|
||||||
|
IsGlobalReading= trialinfo.IsGlobalReading,
|
||||||
|
|
||||||
}) ;
|
}) ;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
|
@ -745,15 +745,31 @@ namespace IRaCIS.Application.Services
|
||||||
if (visitTask.IsAnalysisCreate&& visitTask.ConsistentAnalysisOriginalTaskId!=null)
|
if (visitTask.IsAnalysisCreate&& visitTask.ConsistentAnalysisOriginalTaskId!=null)
|
||||||
{
|
{
|
||||||
visitTaskids.Add(visitTask.Id);
|
visitTaskids.Add(visitTask.Id);
|
||||||
visitTaskids.Add(visitTask.ConsistentAnalysisOriginalTaskId.Value);
|
if (visitTask.ConsistentAnalysisOriginalTaskId != null)
|
||||||
|
{
|
||||||
|
visitTaskids.Add(visitTask.ConsistentAnalysisOriginalTaskId.Value);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 这种情况是新产生的阅片期
|
||||||
|
if (visitTask.SouceReadModuleId != null)
|
||||||
|
{
|
||||||
|
var visitNum = await _readModuleRepository.Where(x => x.Id == visitTask.SouceReadModuleId).Select(x => x.VisitNum).FirstOrDefaultAsync();
|
||||||
|
var lastVisitId = await _visitTaskRepository.Where(x => !x.IsAnalysisCreate && x.SouceReadModuleId == visitTask.SouceReadModuleId && x.ReadModule.VisitNum <= visitNum).OrderByDescending(x => x.ReadModule.VisitNum).Select(x => x.Id).FirstOrDefaultAsync();
|
||||||
|
visitTaskids.Add(lastVisitId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
visitTaskids = await _visitTaskRepository.Where(x => x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ReadingCategory != ReadingCategory.Judge && x.ReReadingApplyState != ReReadingApplyState.Agree && x.SourceSubjectVisitId == visitTask.SourceSubjectVisitId && x.SouceReadModuleId == visitTask.SouceReadModuleId).Select(x => x.Id).ToListAsync();
|
visitTaskids = await _visitTaskRepository.Where(x => x.ReadingTaskState == ReadingTaskState.HaveSigned && x.ReadingCategory != ReadingCategory.Judge && x.ReReadingApplyState != ReReadingApplyState.Agree && x.SourceSubjectVisitId == visitTask.SourceSubjectVisitId && x.SouceReadModuleId == visitTask.SouceReadModuleId).Select(x => x.Id).ToListAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var trialInfo = await _trialRepository.Where(x => x.Id == visitTask.TrialId).Select(x=> new {
|
||||||
|
x.IsArbitrationReading,
|
||||||
|
x.ArbitrationRule
|
||||||
|
|
||||||
if (visitTaskids.Count == 2)
|
}).FirstNotNullAsync();
|
||||||
|
|
||||||
|
if (visitTaskids.Count == 2&& trialInfo.IsArbitrationReading??false)
|
||||||
{
|
{
|
||||||
var query = from questionAnswet in _readingTaskQuestionAnswerRepository.Where(x => visitTaskids.Contains(x.VisitTaskId))
|
var query = from questionAnswet in _readingTaskQuestionAnswerRepository.Where(x => visitTaskids.Contains(x.VisitTaskId))
|
||||||
join question in _readingQuestionTrialRepository.Where(x => x.IsJudgeQuestion) on new { ReadingQuestionTrialId = questionAnswet.ReadingQuestionTrialId } equals new { ReadingQuestionTrialId = question.Id }
|
join question in _readingQuestionTrialRepository.Where(x => x.IsJudgeQuestion) on new { ReadingQuestionTrialId = questionAnswet.ReadingQuestionTrialId } equals new { ReadingQuestionTrialId = question.Id }
|
||||||
|
@ -842,10 +858,15 @@ namespace IRaCIS.Application.Services
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
await this.SaveJudgeTask(new SaveJudgeTaskDto()
|
|
||||||
|
if ((visitTask.SourceSubjectVisitId != null && trialInfo.ArbitrationRule == ArbitrationRule.Visit) || (visitTask.SouceReadModuleId != null && trialInfo.ArbitrationRule == ArbitrationRule.Reading))
|
||||||
{
|
{
|
||||||
VisitTaskIds = visitTaskids,
|
await this.SaveJudgeTask(new SaveJudgeTaskDto()
|
||||||
});
|
{
|
||||||
|
VisitTaskIds = visitTaskids,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -873,8 +894,6 @@ namespace IRaCIS.Application.Services
|
||||||
{
|
{
|
||||||
var trialId = await _visitTaskRepository.Where(x => inDto.VisitTaskIds.Contains(x.Id)).Select(x => x.TrialId).FirstOrDefaultAsync();
|
var trialId = await _visitTaskRepository.Where(x => inDto.VisitTaskIds.Contains(x.Id)).Select(x => x.TrialId).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
await _visitTaskHelpeService.AddTaskAsync(new GenerateTaskCommand()
|
await _visitTaskHelpeService.AddTaskAsync(new GenerateTaskCommand()
|
||||||
{
|
{
|
||||||
JudgeVisitTaskIdList= inDto.VisitTaskIds,
|
JudgeVisitTaskIdList= inDto.VisitTaskIds,
|
||||||
|
|
|
@ -68,6 +68,43 @@ namespace IRaCIS.Application.Services
|
||||||
this._previousPDFRepository = previousPDFRepository;
|
this._previousPDFRepository = previousPDFRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 设置项目裁判信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<IResponseOutput> SetTrialJudgyInfo(SetTrialJudgyInfoInDto inDto)
|
||||||
|
{
|
||||||
|
await _trialRepository.UpdatePartialFromQueryAsync(inDto.TrialId, x => new Trial()
|
||||||
|
{
|
||||||
|
|
||||||
|
ArbitrationRule = inDto.ArbitrationRule,
|
||||||
|
IsArbitrationReading = inDto.IsArbitrationReading,
|
||||||
|
});
|
||||||
|
|
||||||
|
var result = await _trialRepository.SaveChangesAsync();
|
||||||
|
|
||||||
|
return ResponseOutput.Ok(result);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取项目裁判信息
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<GetTrialJudgyInfoOutDto> GetTrialJudgyInfo(GetTrialJudgyInfoInDto inDto)
|
||||||
|
{
|
||||||
|
GetTrialJudgyInfoOutDto result = await _trialRepository.Where(x => x.Id == inDto.TrialId).Select(x => new GetTrialJudgyInfoOutDto
|
||||||
|
{
|
||||||
|
TrialId = x.Id,
|
||||||
|
ArbitrationRule = x.ArbitrationRule,
|
||||||
|
IsArbitrationReading = x.IsArbitrationReading
|
||||||
|
|
||||||
|
}).FirstNotNullAsync();
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 新增修改项目标准分页
|
/// 新增修改项目标准分页
|
||||||
|
|
|
@ -671,7 +671,7 @@ namespace IRaCIS.Core.Application.Contracts
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 仲裁规则/对象
|
/// 仲裁规则/对象
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int ArbitrationRule { get; set; } = 2;
|
public ArbitrationRule ArbitrationRule { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class SignConfirmDTO
|
public class SignConfirmDTO
|
||||||
|
|
|
@ -201,6 +201,28 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
Allocated = 2,
|
Allocated = 2,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public enum ArbitrationRule
|
||||||
|
{
|
||||||
|
//默认值 看是否需要项目初始化时就给默认值 1 或者2
|
||||||
|
None = 0,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 访视
|
||||||
|
/// </summary>
|
||||||
|
Visit=1,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 阅片
|
||||||
|
/// </summary>
|
||||||
|
Reading = 2,
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 无
|
||||||
|
/// </summary>
|
||||||
|
NA=3,
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public enum ReadingMethod
|
public enum ReadingMethod
|
||||||
{
|
{
|
||||||
Single = 1,
|
Single = 1,
|
||||||
|
|
|
@ -221,12 +221,18 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
|
|
||||||
public bool IsGlobalReading { get; set; } = true;
|
public bool IsGlobalReading { get; set; } = true;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ÖÙ²ÃÔÄÆ¬
|
||||||
|
/// </summary>
|
||||||
public bool? IsArbitrationReading { get; set; } = true;
|
public bool? IsArbitrationReading { get; set; } = true;
|
||||||
|
|
||||||
public bool IsClinicalReading { get; set; }
|
public bool IsClinicalReading { get; set; }
|
||||||
|
|
||||||
|
|
||||||
public int ArbitrationRule { get; set; } = 2;
|
/// <summary>
|
||||||
|
/// ÖٲùæÔò
|
||||||
|
/// </summary>
|
||||||
|
public ArbitrationRule ArbitrationRule { get; set; } = ArbitrationRule.Reading;
|
||||||
|
|
||||||
|
|
||||||
public int ChangeDefalutDays { get; set; } = 5;
|
public int ChangeDefalutDays { get; set; } = 5;
|
||||||
|
|
Loading…
Reference in New Issue