@@ -6,297 +6,292 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace IRaCIS.Core.Domain.Models
|
||||
namespace IRaCIS.Core.Domain.Models;
|
||||
|
||||
[Comment("系统标准问题 (需要同步)")]
|
||||
[Table("ReadingQuestionSystem")]
|
||||
public class ReadingQuestionSystem : BaseAddAuditEntity
|
||||
{
|
||||
///<summary>
|
||||
/// 系统阅片问题
|
||||
///</summary>
|
||||
[Table("ReadingQuestionSystem")]
|
||||
public class ReadingQuestionSystem : BaseAddAuditEntity
|
||||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
[ForeignKey("GroupId")]
|
||||
public ReadingQuestionSystem GroupInfo { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("ReadingQuestionCriterionSystemId")]
|
||||
public ReadingQuestionCriterionSystem ReadingQuestionCriterionSystem { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("ParentId")]
|
||||
public ReadingQuestionSystem ParentReadingQuestionSystem { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("RelevanceId")]
|
||||
public ReadingQuestionSystem RelevanceReadingQuestionSystem { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public List<string> ParentTriggerValueList
|
||||
{
|
||||
#region 导航属性
|
||||
[JsonIgnore]
|
||||
[ForeignKey("GroupId")]
|
||||
public ReadingQuestionSystem GroupInfo { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("ReadingQuestionCriterionSystemId")]
|
||||
public ReadingQuestionCriterionSystem ReadingQuestionCriterionSystem { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("ParentId")]
|
||||
public ReadingQuestionSystem ParentReadingQuestionSystem { get; set; }
|
||||
|
||||
|
||||
[JsonIgnore]
|
||||
[ForeignKey("RelevanceId")]
|
||||
public ReadingQuestionSystem RelevanceReadingQuestionSystem { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public List<string> ParentTriggerValueList
|
||||
get
|
||||
{
|
||||
get
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
return this.ParentTriggerValue.Split(',').ToList();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
return new List<string>();
|
||||
}
|
||||
return this.ParentTriggerValue.Split(',').ToList();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
[NotMapped]
|
||||
public List<string> RelevanceValueList
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
return this.RelevanceValue.Split(',').ToList();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
return new List<string>();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public List<string> HighlightAnswerList
|
||||
{
|
||||
get
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
var result = JsonConvert.DeserializeObject<List<string>>(this.HighlightAnswer);
|
||||
return result == null ? new List<string>() : result;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
return new List<string>();
|
||||
}
|
||||
|
||||
return new List<string>();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// 系统标准Id
|
||||
/// </summary>
|
||||
public Guid ReadingQuestionCriterionSystemId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型
|
||||
/// </summary>
|
||||
public string Type { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 父问题触发
|
||||
/// </summary>
|
||||
public string ParentTriggerValue { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 问题名称
|
||||
/// </summary>
|
||||
public string QuestionName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 是否是必须
|
||||
/// </summary>
|
||||
public IsRequired IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
public int ShowOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 父问题ID
|
||||
/// </summary>
|
||||
public Guid? ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否是裁判问题
|
||||
/// </summary>
|
||||
public bool IsJudgeQuestion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 关联ID
|
||||
/// </summary>
|
||||
public Guid? RelevanceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联Value
|
||||
/// </summary>
|
||||
public string RelevanceValue { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 分组
|
||||
/// </summary>
|
||||
public string GroupName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 图片数量
|
||||
/// </summary>
|
||||
public int ImageCount { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 是否显示
|
||||
/// </summary>
|
||||
public ShowQuestion ShowQuestion { get; set; } = ShowQuestion.Show;
|
||||
|
||||
/// <summary>
|
||||
/// 最大问题数
|
||||
/// </summary>
|
||||
public int? MaxQuestionCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 病灶类型
|
||||
/// </summary>
|
||||
public LesionType? LesionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题类型
|
||||
/// </summary>
|
||||
public QuestionType? QuestionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否显示在Dicom阅片中
|
||||
/// </summary>
|
||||
public bool IsShowInDicom { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 序号标记
|
||||
/// </summary>
|
||||
public string OrderMark { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 字典code
|
||||
/// </summary>
|
||||
public string DictionaryCode { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 问题类型
|
||||
/// </summary>
|
||||
public TableQuestionType? QuestionGenre { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 全局阅片显示类型
|
||||
/// </summary>
|
||||
public GlobalReadingShowType GlobalReadingShowType { get; set; } = GlobalReadingShowType.NotShow;
|
||||
|
||||
/// <summary>
|
||||
/// 转化显示类型
|
||||
/// </summary>
|
||||
public ConvertShowType ConvertShowType { get; set; } = ConvertShowType.All;
|
||||
|
||||
/// <summary>
|
||||
/// 默认值
|
||||
/// </summary>
|
||||
public string DefaultValue { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 数值类型
|
||||
/// </summary>
|
||||
public ValueOfType? ValueType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public ValueUnit? Unit { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// </summary>
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文分组
|
||||
/// </summary>
|
||||
public string GroupEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 限制编辑
|
||||
/// </summary>
|
||||
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
||||
|
||||
/// <summary>
|
||||
/// 限制显示
|
||||
/// </summary>
|
||||
public LimitShow LimitShow { get; set; } = LimitShow.AllShow;
|
||||
|
||||
/// <summary>
|
||||
/// 数据来源
|
||||
/// </summary>
|
||||
public DataSources DataSource { get; set; } = DataSources.ManualEntry;
|
||||
|
||||
/// <summary>
|
||||
/// 最大答案长度
|
||||
/// </summary>
|
||||
public int? MaxAnswerLength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分组ID
|
||||
/// </summary>
|
||||
public Guid? GroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 文件类型
|
||||
/// </summary>
|
||||
public string FileType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 分组分类
|
||||
/// </summary>
|
||||
public GroupClassify? GroupClassify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题分类
|
||||
/// </summary>
|
||||
public QuestionClassify? QuestionClassify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 高亮问题的答案
|
||||
/// </summary>
|
||||
public string HighlightAnswer { get; set; } = "[]";
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
[NotMapped]
|
||||
public List<string> RelevanceValueList
|
||||
{
|
||||
get
|
||||
{
|
||||
try
|
||||
{
|
||||
return this.RelevanceValue.Split(',').ToList();
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
return new List<string>();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
[NotMapped]
|
||||
public List<string> HighlightAnswerList
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
try
|
||||
{
|
||||
var result = JsonConvert.DeserializeObject<List<string>>(this.HighlightAnswer);
|
||||
return result == null ? new List<string>() : result;
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
return new List<string>();
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// 系统标准Id
|
||||
/// </summary>
|
||||
public Guid ReadingQuestionCriterionSystemId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型
|
||||
/// </summary>
|
||||
public string Type { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 父问题触发
|
||||
/// </summary>
|
||||
public string ParentTriggerValue { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 问题名称
|
||||
/// </summary>
|
||||
public string QuestionName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 是否是必须
|
||||
/// </summary>
|
||||
public IsRequired IsRequired { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 排序
|
||||
/// </summary>
|
||||
public int ShowOrder { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 父问题ID
|
||||
/// </summary>
|
||||
public Guid? ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 类型值
|
||||
/// </summary>
|
||||
public string TypeValue { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 是否启用
|
||||
/// </summary>
|
||||
public bool IsEnable { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 是否是裁判问题
|
||||
/// </summary>
|
||||
public bool IsJudgeQuestion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
public string Remark { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 关联ID
|
||||
/// </summary>
|
||||
public Guid? RelevanceId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联Value
|
||||
/// </summary>
|
||||
public string RelevanceValue { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 分组
|
||||
/// </summary>
|
||||
public string GroupName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 图片数量
|
||||
/// </summary>
|
||||
public int ImageCount { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// 是否显示
|
||||
/// </summary>
|
||||
public ShowQuestion ShowQuestion { get; set; } = ShowQuestion.Show;
|
||||
|
||||
/// <summary>
|
||||
/// 最大问题数
|
||||
/// </summary>
|
||||
public int? MaxQuestionCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 病灶类型
|
||||
/// </summary>
|
||||
public LesionType? LesionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题类型
|
||||
/// </summary>
|
||||
public QuestionType? QuestionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否显示在Dicom阅片中
|
||||
/// </summary>
|
||||
public bool IsShowInDicom { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// 序号标记
|
||||
/// </summary>
|
||||
public string OrderMark { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 字典code
|
||||
/// </summary>
|
||||
public string DictionaryCode { get; set; } = string.Empty;
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 问题类型
|
||||
/// </summary>
|
||||
public TableQuestionType? QuestionGenre { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 全局阅片显示类型
|
||||
/// </summary>
|
||||
public GlobalReadingShowType GlobalReadingShowType { get; set; } = GlobalReadingShowType.NotShow;
|
||||
|
||||
/// <summary>
|
||||
/// 转化显示类型
|
||||
/// </summary>
|
||||
public ConvertShowType ConvertShowType { get; set; } = ConvertShowType.All;
|
||||
|
||||
/// <summary>
|
||||
/// 默认值
|
||||
/// </summary>
|
||||
public string DefaultValue { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 数值类型
|
||||
/// </summary>
|
||||
public ValueOfType? ValueType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单位
|
||||
/// </summary>
|
||||
public ValueUnit? Unit { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文名称
|
||||
/// </summary>
|
||||
public string QuestionEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 问题英文分组
|
||||
/// </summary>
|
||||
public string GroupEnName { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 限制编辑
|
||||
/// </summary>
|
||||
public LimitEdit LimitEdit { get; set; } = LimitEdit.None;
|
||||
|
||||
/// <summary>
|
||||
/// 限制显示
|
||||
/// </summary>
|
||||
public LimitShow LimitShow { get; set; } = LimitShow.AllShow;
|
||||
|
||||
/// <summary>
|
||||
/// 数据来源
|
||||
/// </summary>
|
||||
public DataSources DataSource { get; set; } = DataSources.ManualEntry;
|
||||
|
||||
/// <summary>
|
||||
/// 最大答案长度
|
||||
/// </summary>
|
||||
public int? MaxAnswerLength { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分组ID
|
||||
/// </summary>
|
||||
public Guid? GroupId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 文件类型
|
||||
/// </summary>
|
||||
public string FileType { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
/// 分组分类
|
||||
/// </summary>
|
||||
public GroupClassify? GroupClassify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 问题分类
|
||||
/// </summary>
|
||||
public QuestionClassify? QuestionClassify { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 高亮问题的答案
|
||||
/// </summary>
|
||||
public string HighlightAnswer { get; set; } = "[]";
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user