Test.EIImageViewer
he 2022-11-15 16:09:45 +08:00
parent 7e2fc35808
commit c07146e1c7
6 changed files with 183 additions and 0 deletions

View File

@ -272,6 +272,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public class ReadingTableQuestionTrialAddOrEdit
{
/// <summary>
/// 自定义计算标记
/// </summary>
public CustomCalculateMark? CustomCalculateMark { get; set; }
/// <summary>
/// 自定义计算标记
/// </summary>
public string CalculateQuestions { get; set; } = "[]";
/// <summary>
/// 数值类型
/// </summary>
@ -803,6 +814,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 单位
/// </summary>
public ValueUnit? Unit { get; set; }
/// <summary>
/// 自定义计算标记
/// </summary>
public CustomCalculateMark? CustomCalculateMark { get; set; }
/// <summary>
/// 自定义计算标记
/// </summary>
public string CalculateQuestions { get; set; }
}
public class ReadingQuestionSystemView
@ -1017,8 +1038,36 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
public bool IsJudgeQuestion { get; set; }
}
public class GetCalculateQuestionsOutDto
{
public Guid QuestionId { get; set; }
public string QuestionName{ get; set; }
}
public class GetCalculateTableQuestionsOutDto
{
public Guid TableQuestionId { get; set; }
public string TableQuestionName { get; set; }
}
public class GetCalculateTableQuestionsInDto
{
[NotDefault]
public Guid QuestionId { get; set; }
}
public class GetCalculateQuestionsInDto
{
[NotDefault]
public Guid TrialCriterionId { get; set; }
}
public class GetTrialGroupNameListInDto
{
@ -1449,6 +1498,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 单位
/// </summary>
public ValueUnit? Unit { get; set; }
/// <summary>
/// 自定义计算标记
/// </summary>
public CustomCalculateMark? CustomCalculateMark { get; set; }
/// <summary>
/// 自定义计算标记
/// </summary>
public string CalculateQuestions { get; set; } = "[]";
}
public class GetSystemCriterionSelectDto

View File

@ -73,7 +73,58 @@ namespace IRaCIS.Application.Services
this._previousPDFRepository = previousPDFRepository;
}
#region 获取计算问题
/// <summary>
/// 获取数值问题
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
public async Task<List<GetCalculateQuestionsOutDto>> GetCalculateQuestions(GetCalculateQuestionsInDto inDto)
{
var result =await _readingQuestionTrialRepository
.Where(x => x.ReadingQuestionCriterionTrialId == inDto.TrialCriterionId)
.Where(x => x.Type == "number")
.OrderBy(x => x.ShowOrder)
.Select(x => new GetCalculateQuestionsOutDto
(){
QuestionId = x.Id,
QuestionName = x.QuestionName
}).ToListAsync();
return result;
}
/// <summary>
/// 获取表格数值问题
/// </summary>
/// <param name="inDto"></param>
/// <returns></returns>
[HttpPost]
public async Task<List<GetCalculateTableQuestionsOutDto>> GetCalculateTableQuestions(GetCalculateTableQuestionsInDto inDto)
{
var result = await _readingTableQuestionTrialRepository
.Where(x => x.ReadingQuestionId == inDto.QuestionId)
.Where(x=>x.Type== "number")
.OrderBy(x => x.ShowOrder)
.Select(x => new GetCalculateTableQuestionsOutDto
()
{
TableQuestionId = x.Id,
TableQuestionName = x.QuestionName
}).ToListAsync();
return result;
}
#endregion
#region 系统标准问题

View File

@ -628,6 +628,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
/// <returns></returns>
public async Task<int> GetBaseLineLesionsCount(ReadingCalculateDto inDto)
{
return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.BaselineLesions).SelectMany(x => x.TableRowInfoList)
.Where(x => x.TableQuestionList.Any(y => y.QuestionMark == QuestionMark.State && y.Answer == EvaluationOfState.Exists.GetEnumInt())).Count();
}

View File

@ -16,6 +16,57 @@ namespace IRaCIS.Core.Domain.Share
public static readonly string Group = "group";
}
/// <summary>
/// 自定义计算标记
/// </summary>
public enum CustomCalculateMark
{
/// <summary>
/// +
/// </summary>
Add = 1,
/// <summary>
/// -
/// </summary>
Subtract = 2,
/// <summary>
/// ×
/// </summary>
Multiply = 3,
/// <summary>
/// ÷
/// </summary>
Divide = 4,
/// <summary>
/// ∏ 求积
/// </summary>
Quadrature = 5,
/// <summary>
/// ∑
/// </summary>
Sum = 6,
/// <summary>
/// Avg
/// </summary>
Avg = 7,
/// <summary>
/// Max
/// </summary>
Max = 8,
/// <summary>
/// Min
/// </summary>
Min = 9
}
/// <summary>
/// 数值单位

View File

@ -193,6 +193,17 @@ namespace IRaCIS.Core.Domain.Models
/// </summary>
public ValueUnit? Unit { get; set; }
/// <summary>
/// 自定义计算标记
/// </summary>
public CustomCalculateMark? CustomCalculateMark { get; set; }
/// <summary>
/// 自定义计算标记
/// </summary>
public string CalculateQuestions { get; set; } = "[]";
/// <summary>
/// 分页标准
/// </summary>

View File

@ -152,6 +152,16 @@ namespace IRaCIS.Core.Domain.Models
/// </summary>
public ValueUnit? Unit { get; set; }
/// <summary>
/// 自定义计算标记
/// </summary>
public CustomCalculateMark? CustomCalculateMark { get; set; }
/// <summary>
/// 自定义计算标记
/// </summary>
public string CalculateQuestions { get; set; } = "[]";
[JsonIgnore]
[ForeignKey("DependParentId")]
public ReadingTableQuestionTrial DependParentQuestion { get; set; }