Uat_Study
parent
c9f5b2a330
commit
068c347178
|
@ -42,6 +42,29 @@ namespace IRaCIS.Core.Application.Service
|
||||||
_systemClinicalQuestionRepository = systemClinicalQuestionRepository;
|
_systemClinicalQuestionRepository = systemClinicalQuestionRepository;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 获取问题计算关系
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="inDto"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
[HttpPost]
|
||||||
|
public async Task<List<GetTrialClinicalQuestionCalculateRelationOutDto>> GetTrialClinicalQuestionCalculateRelation(GetTrialClinicalQuestionCalculateRelationInDto inDto)
|
||||||
|
{
|
||||||
|
|
||||||
|
var result= await _trialClinicalQuestionRepository.Where(x => x.TrialClinicalId == inDto.TrialClinicalId)
|
||||||
|
.Where( x=> x.ClinicalQuestionType == "number")
|
||||||
|
.Where(x => x.CustomCalculateMark != null && x.CustomCalculateMark > ClinicalCalculateMark.None)
|
||||||
|
.Select(x => new GetTrialClinicalQuestionCalculateRelationOutDto()
|
||||||
|
{
|
||||||
|
QuestionId = x.Id,
|
||||||
|
QuestionName = x.QuestionName,
|
||||||
|
CustomCalculateMark = x.CustomCalculateMark,
|
||||||
|
CalculateQuestionList = x.CalculateQuestionList,
|
||||||
|
}).ToListAsync();
|
||||||
|
result = result.Where(x => x.CalculateQuestionList.Count() > 0).ToList();
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取计算问题
|
/// 获取计算问题
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -13,7 +13,50 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||||
|
|
||||||
|
|
||||||
#region 获取计算问题
|
#region 获取计算问题
|
||||||
public class GetClinicalCalculateQuestionsOutDto
|
|
||||||
|
public class GetTrialClinicalQuestionCalculateRelationInDto
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// 项目临床数据Id
|
||||||
|
/// </summary>
|
||||||
|
public Guid TrialClinicalId { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetTrialClinicalQuestionCalculateRelationOutDto
|
||||||
|
{
|
||||||
|
public Guid QuestionId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 问题名称
|
||||||
|
/// </summary>
|
||||||
|
public string QuestionName { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义计算标记
|
||||||
|
/// </summary>
|
||||||
|
public ClinicalCalculateMark? CustomCalculateMark { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 数值类型
|
||||||
|
/// </summary>
|
||||||
|
public ValueOfType? ValueType { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 单位
|
||||||
|
/// </summary>
|
||||||
|
public ValueUnit? Unit { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 自定义单位
|
||||||
|
/// </summary>
|
||||||
|
public string CustomUnit { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public List<CalculateInfo> CalculateQuestionList { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public class GetClinicalCalculateQuestionsOutDto
|
||||||
{
|
{
|
||||||
public Guid QuestionId { get; set; }
|
public Guid QuestionId { get; set; }
|
||||||
|
|
||||||
|
|
|
@ -61,11 +61,12 @@ namespace IRaCIS.Core.Domain.Share
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public enum ClinicalCalculateMark
|
public enum ClinicalCalculateMark
|
||||||
{
|
{
|
||||||
|
None = -1,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// +
|
/// +
|
||||||
/// </summary>
|
/// </summary>
|
||||||
Add = 1,
|
Add = 1,
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// -
|
/// -
|
||||||
|
|
Loading…
Reference in New Issue