临床数据表格问题添加依赖父问题

Uat_Study
he 2023-09-01 15:46:56 +08:00
parent 2995d2273a
commit 9f706d3123
6 changed files with 155 additions and 1 deletions

View File

@ -2560,6 +2560,20 @@
<param name="id"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.ClinicalQuestionService.GetSystemClinicalOtherTableQuestionList(IRaCIS.Core.Application.Service.Reading.Dto.GetClinicalOtherTableQuestionListInDto)">
<summary>
获取系统其他表格问题
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.ClinicalQuestionService.GetTrialClinicalOtherTableQuestionList(IRaCIS.Core.Application.Service.Reading.Dto.GetClinicalOtherTableQuestionListInDto)">
<summary>
获取项目其他表格问题
</summary>
<param name="inDto"></param>
<returns></returns>
</member>
<member name="M:IRaCIS.Core.Application.Service.ClinicalQuestionService.GetTrialClinicalTableQuestionList(IRaCIS.Core.Application.Service.Reading.Dto.TrialClinicalTableQuestionQuery)">
<summary>
获取项目表格问题
@ -3218,6 +3232,16 @@
单位
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalTableQuestionBase.RelevanceId">
<summary>
关联ID
</summary>
</member>
<member name="P:IRaCIS.Core.Application.Service.Reading.Dto.ClinicalTableQuestionBase.RelevanceValue">
<summary>
关联Value
</summary>
</member>
<member name="T:IRaCIS.Core.Application.Service.Reading.Dto.TrialClinicalTableQuestionDto">
<summary>
项目临床数据问题

View File

@ -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)

View File

@ -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>();
}

View File

@ -7,6 +7,9 @@ using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Collections.Generic;
using System.Linq;
namespace IRaCIS.Core.Domain.Models
{
///<summary>
@ -95,6 +98,34 @@ namespace IRaCIS.Core.Domain.Models
/// </summary>
public string Unit { get; set; } = string.Empty;
/// <summary>
/// 关联ID
/// </summary>
public Guid? RelevanceId { get; set; }
/// <summary>
/// 关联Value
/// </summary>
public string RelevanceValue { get; set; } = string.Empty;
[NotMapped]
public List<string> RelevanceValueList
{
get
{
try
{
return this.RelevanceValue.Split(',').ToList();
}
catch (Exception)
{
return new List<string>();
}
}
}
}

View File

@ -7,6 +7,9 @@ using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Collections.Generic;
using System.Linq;
namespace IRaCIS.Core.Domain.Models
{
///<summary>
@ -110,6 +113,34 @@ namespace IRaCIS.Core.Domain.Models
/// </summary>
public string Unit { get; set; } = string.Empty;
/// <summary>
/// 关联ID
/// </summary>
public Guid? RelevanceId { get; set; }
/// <summary>
/// 关联Value
/// </summary>
public string RelevanceValue { get; set; } = string.Empty;
[NotMapped]
public List<string> RelevanceValueList
{
get
{
try
{
return this.RelevanceValue.Split(',').ToList();
}
catch (Exception)
{
return new List<string>();
}
}
}
}

View File

@ -176,6 +176,8 @@ namespace IRaCIS.Core.Domain.Models
[ForeignKey("DependParentId")]
[JsonIgnore]
public ReadingTableQuestionSystem DependParentQuestion { get; set; }
}