Uat_Study
parent
7e2fc35808
commit
c07146e1c7
|
@ -272,6 +272,17 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
public class ReadingTableQuestionTrialAddOrEdit
|
public class ReadingTableQuestionTrialAddOrEdit
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义计算标记
|
||||||
|
/// </summary>
|
||||||
|
public CustomCalculateMark? CustomCalculateMark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义计算标记
|
||||||
|
/// </summary>
|
||||||
|
public string CalculateQuestions { get; set; } = "[]";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 数值类型
|
/// 数值类型
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -803,6 +814,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// 单位
|
/// 单位
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ValueUnit? Unit { get; set; }
|
public ValueUnit? Unit { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义计算标记
|
||||||
|
/// </summary>
|
||||||
|
public CustomCalculateMark? CustomCalculateMark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义计算标记
|
||||||
|
/// </summary>
|
||||||
|
public string CalculateQuestions { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ReadingQuestionSystemView
|
public class ReadingQuestionSystemView
|
||||||
|
@ -1017,8 +1038,36 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
public bool IsJudgeQuestion { get; set; }
|
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
|
public class GetTrialGroupNameListInDto
|
||||||
{
|
{
|
||||||
|
@ -1449,6 +1498,16 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
/// 单位
|
/// 单位
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ValueUnit? Unit { get; set; }
|
public ValueUnit? Unit { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义计算标记
|
||||||
|
/// </summary>
|
||||||
|
public CustomCalculateMark? CustomCalculateMark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义计算标记
|
||||||
|
/// </summary>
|
||||||
|
public string CalculateQuestions { get; set; } = "[]";
|
||||||
}
|
}
|
||||||
|
|
||||||
public class GetSystemCriterionSelectDto
|
public class GetSystemCriterionSelectDto
|
||||||
|
|
|
@ -73,7 +73,58 @@ namespace IRaCIS.Application.Services
|
||||||
this._previousPDFRepository = previousPDFRepository;
|
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 系统标准问题
|
#region 系统标准问题
|
||||||
|
|
|
@ -628,6 +628,7 @@ namespace IRaCIS.Core.Application.Service.ReadingCalculate
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<int> GetBaseLineLesionsCount(ReadingCalculateDto inDto)
|
public async Task<int> GetBaseLineLesionsCount(ReadingCalculateDto inDto)
|
||||||
{
|
{
|
||||||
|
|
||||||
return inDto.QuestionInfo.Where(x => x.LesionType == LesionType.BaselineLesions).SelectMany(x => x.TableRowInfoList)
|
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();
|
.Where(x => x.TableQuestionList.Any(y => y.QuestionMark == QuestionMark.State && y.Answer == EvaluationOfState.Exists.GetEnumInt())).Count();
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,6 +16,57 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
public static readonly string Group = "group";
|
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>
|
/// <summary>
|
||||||
/// 数值单位
|
/// 数值单位
|
||||||
|
|
|
@ -193,6 +193,17 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ValueUnit? Unit { get; set; }
|
public ValueUnit? Unit { get; set; }
|
||||||
|
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义计算标记
|
||||||
|
/// </summary>
|
||||||
|
public CustomCalculateMark? CustomCalculateMark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义计算标记
|
||||||
|
/// </summary>
|
||||||
|
public string CalculateQuestions { get; set; } = "[]";
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 分页标准
|
/// 分页标准
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -152,6 +152,16 @@ namespace IRaCIS.Core.Domain.Models
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public ValueUnit? Unit { get; set; }
|
public ValueUnit? Unit { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义计算标记
|
||||||
|
/// </summary>
|
||||||
|
public CustomCalculateMark? CustomCalculateMark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义计算标记
|
||||||
|
/// </summary>
|
||||||
|
public string CalculateQuestions { get; set; } = "[]";
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
[ForeignKey("DependParentId")]
|
[ForeignKey("DependParentId")]
|
||||||
public ReadingTableQuestionTrial DependParentQuestion { get; set; }
|
public ReadingTableQuestionTrial DependParentQuestion { get; set; }
|
||||||
|
|
Loading…
Reference in New Issue