Uat_Study
parent
6816a98053
commit
2774f36538
|
@ -1310,6 +1310,33 @@ namespace IRaCIS.Application.Services
|
||||||
|
|
||||||
#region Dicom 非dicom 公用
|
#region Dicom 非dicom 公用
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 验证默认问题是否回答
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="BusinessValidationFailedException"></exception>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<IResponseOutput> VerifyDefaultQuestionBeAnswer(VerifyVisitTaskQuestionsInDto inDto)
|
||||||
|
{
|
||||||
|
await VerifyTaskIsSign(inDto.VisitTaskId);
|
||||||
|
var taskInfo = await _visitTaskRepository.Where(x => x.Id == inDto.VisitTaskId).FirstNotNullAsync();
|
||||||
|
|
||||||
|
var readingQuestionList = await _readingQuestionTrialRepository.Where(x => x.ReadingQuestionCriterionTrialId == taskInfo.TrialReadingCriterionId
|
||||||
|
&& (x.IsJudgeQuestion || (x.IsRequired == IsRequired.Required && x.ShowQuestion == ShowQuestion.Show)&&x.Type==ReadingCommon.QuestionType.Calculation)
|
||||||
|
).ToListAsync();
|
||||||
|
|
||||||
|
var answerQuestionIds = await _readingTaskQuestionAnswerRepository.Where(x => x.VisitTaskId == inDto.VisitTaskId).Select(x => x.ReadingQuestionTrialId).ToListAsync();
|
||||||
|
|
||||||
|
readingQuestionList = readingQuestionList.Where(x => !answerQuestionIds.Contains(x.Id)).ToList();
|
||||||
|
|
||||||
|
if (readingQuestionList.Count() > 0)
|
||||||
|
{
|
||||||
|
throw new BusinessValidationFailedException($" 必填问题{string.Join(',', readingQuestionList.Select(x => x.QuestionName))}的答案为空或未保存");
|
||||||
|
}
|
||||||
|
return ResponseOutput.Ok(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 验证访视提交
|
/// 验证访视提交
|
||||||
|
|
|
@ -29,6 +29,9 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public const string OncologyAssess = "OncologyAssessType";
|
public const string OncologyAssess = "OncologyAssessType";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 标准字典需要配置的相
|
/// 标准字典需要配置的相
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -40,6 +43,19 @@ namespace IRaCIS.Core.Infra.EFCore.Common
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 阅片问题类型
|
||||||
|
/// </summary>
|
||||||
|
public static class QuestionType
|
||||||
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 类型自动计算
|
||||||
|
/// </summary>
|
||||||
|
public const string Calculation = "calculation";
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static Dictionary<int, string> SplitLesionDic = new Dictionary<int, string>()
|
public static Dictionary<int, string> SplitLesionDic = new Dictionary<int, string>()
|
||||||
|
|
Loading…
Reference in New Issue