临床数据表格问题添加依赖父问题
This commit is contained in:
@@ -11,6 +11,7 @@ using IRaCIS.Core.Application.Service.Reading.Dto;
|
||||
using IRaCIS.Core.Infra.EFCore.Common;
|
||||
using IRaCIS.Core.Domain.Share;
|
||||
using MassTransit;
|
||||
using IRaCIS.Core.Domain.Models;
|
||||
|
||||
namespace IRaCIS.Core.Application.Service
|
||||
{
|
||||
@@ -455,11 +456,46 @@ namespace IRaCIS.Core.Application.Service
|
||||
var success = await _systemClinicalTableQuestionRepository.DeleteFromQueryAsync(t => t.Id == id, true);
|
||||
return ResponseOutput.Ok();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取系统其他表格问题
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<SystemClinicalTableQuestionDto>> GetSystemClinicalOtherTableQuestionList(GetClinicalOtherTableQuestionListInDto inDto)
|
||||
{
|
||||
var types = new List<string>()
|
||||
{
|
||||
"select","radio"
|
||||
};
|
||||
return await this._systemClinicalTableQuestionRepository.Where(x => x.QuestionId == inDto.QuestionId && types.Contains(x.ClinicalTableQuestionType))
|
||||
.Where(x=>x.Id!= inDto.TableQuestionId)
|
||||
.ProjectTo<SystemClinicalTableQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 项目表格问题
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目其他表格问题
|
||||
/// </summary>
|
||||
/// <param name="inDto"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost]
|
||||
public async Task<List<SystemClinicalTableQuestionDto>> GetTrialClinicalOtherTableQuestionList(GetClinicalOtherTableQuestionListInDto inDto)
|
||||
{
|
||||
var types = new List<string>()
|
||||
{
|
||||
"select","radio"
|
||||
};
|
||||
return await this._trialClinicalTableQuestionRepository.Where(x => x.QuestionId == inDto.QuestionId && types.Contains(x.ClinicalTableQuestionType))
|
||||
.Where(x => x.Id != inDto.TableQuestionId)
|
||||
.ProjectTo<SystemClinicalTableQuestionDto>(_mapper.ConfigurationProvider).ToListAsync();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目表格问题
|
||||
/// </summary>
|
||||
@@ -621,6 +657,11 @@ namespace IRaCIS.Core.Application.Service
|
||||
tableQuestionRelation.Add(x.Id, newid);
|
||||
x.Id = newid;
|
||||
}
|
||||
|
||||
if (x.RelevanceId != null)
|
||||
{
|
||||
x.RelevanceId = questionRelation[x.RelevanceId ?? default(Guid)];
|
||||
}
|
||||
});
|
||||
|
||||
foreach (var x in newTrialTableQuestionList)
|
||||
|
||||
@@ -370,12 +370,18 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
{
|
||||
public Guid SystemClinicalId { get; set; }
|
||||
}
|
||||
|
||||
public class GetClinicalOtherTableQuestionListInDto
|
||||
{
|
||||
public Guid QuestionId { get; set; }
|
||||
|
||||
public Guid TableQuestionId { get; set; }
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
||||
#region 表格问题
|
||||
public class ClinicalTableQuestionBase
|
||||
|
||||
{
|
||||
|
||||
public Guid? Id { get; set; }
|
||||
@@ -456,6 +462,25 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public string Unit { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 关联ID
|
||||
/// </summary>
|
||||
public Guid? RelevanceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联Value
|
||||
/// </summary>
|
||||
public string RelevanceValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return string.Join(',', this.RelevanceValueList);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public List<string> RelevanceValueList { get; set; } = new List<string>();
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user