Merge branch 'Test.Study' of http://192.168.3.69:3000/XCKJ/irc-netcore-api into Test.Study

Uat_Study
hang 2023-09-01 15:53:18 +08:00
commit c6a8c4d24f
6 changed files with 155 additions and 1 deletions

View File

@ -2560,6 +2560,20 @@
<param name="id"></param> <param name="id"></param>
<returns></returns> <returns></returns>
</member> </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)"> <member name="M:IRaCIS.Core.Application.Service.ClinicalQuestionService.GetTrialClinicalTableQuestionList(IRaCIS.Core.Application.Service.Reading.Dto.TrialClinicalTableQuestionQuery)">
<summary> <summary>
获取项目表格问题 获取项目表格问题
@ -3218,6 +3232,16 @@
单位 单位
</summary> </summary>
</member> </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"> <member name="T:IRaCIS.Core.Application.Service.Reading.Dto.TrialClinicalTableQuestionDto">
<summary> <summary>
项目临床数据问题 项目临床数据问题

View File

@ -11,6 +11,7 @@ using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Infra.EFCore.Common; using IRaCIS.Core.Infra.EFCore.Common;
using IRaCIS.Core.Domain.Share; using IRaCIS.Core.Domain.Share;
using MassTransit; using MassTransit;
using IRaCIS.Core.Domain.Models;
namespace IRaCIS.Core.Application.Service namespace IRaCIS.Core.Application.Service
{ {
@ -455,11 +456,46 @@ namespace IRaCIS.Core.Application.Service
var success = await _systemClinicalTableQuestionRepository.DeleteFromQueryAsync(t => t.Id == id, true); var success = await _systemClinicalTableQuestionRepository.DeleteFromQueryAsync(t => t.Id == id, true);
return ResponseOutput.Ok(); 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 #endregion
#region 项目表格问题 #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>
/// 获取项目表格问题 /// 获取项目表格问题
/// </summary> /// </summary>
@ -621,6 +657,11 @@ namespace IRaCIS.Core.Application.Service
tableQuestionRelation.Add(x.Id, newid); tableQuestionRelation.Add(x.Id, newid);
x.Id = newid; x.Id = newid;
} }
if (x.RelevanceId != null)
{
x.RelevanceId = questionRelation[x.RelevanceId ?? default(Guid)];
}
}); });
foreach (var x in newTrialTableQuestionList) foreach (var x in newTrialTableQuestionList)

View File

@ -370,12 +370,18 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
{ {
public Guid SystemClinicalId { get; set; } public Guid SystemClinicalId { get; set; }
} }
public class GetClinicalOtherTableQuestionListInDto
{
public Guid QuestionId { get; set; }
public Guid TableQuestionId { get; set; }
}
#endregion #endregion
#region 表格问题 #region 表格问题
public class ClinicalTableQuestionBase public class ClinicalTableQuestionBase
{ {
public Guid? Id { get; set; } public Guid? Id { get; set; }
@ -456,6 +462,25 @@ namespace IRaCIS.Core.Application.Service.Reading.Dto
/// 单位 /// 单位
/// </summary> /// </summary>
public string Unit { get; set; } = string.Empty; 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 IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Collections.Generic;
using System.Linq;
namespace IRaCIS.Core.Domain.Models namespace IRaCIS.Core.Domain.Models
{ {
///<summary> ///<summary>
@ -95,6 +98,34 @@ namespace IRaCIS.Core.Domain.Models
/// </summary> /// </summary>
public string Unit { get; set; } = string.Empty; 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 IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
using System.Collections.Generic;
using System.Linq;
namespace IRaCIS.Core.Domain.Models namespace IRaCIS.Core.Domain.Models
{ {
///<summary> ///<summary>
@ -110,6 +113,34 @@ namespace IRaCIS.Core.Domain.Models
/// </summary> /// </summary>
public string Unit { get; set; } = string.Empty; 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")] [ForeignKey("DependParentId")]
[JsonIgnore] [JsonIgnore]
public ReadingTableQuestionSystem DependParentQuestion { get; set; } public ReadingTableQuestionSystem DependParentQuestion { get; set; }
} }