

using System;
using IRaCIS.Core.Domain.Share;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Collections.Generic;

namespace IRaCIS.Core.Domain.Models
{
	///<summary>
	/// 项目阅片标准
	///</summary>
	[Table("ReadingQuestionCriterionTrial")]
	public class ReadingQuestionCriterionTrial : Entity, IAuditAdd
	{
		/// <summary>
		/// 系统标准ID
		/// </summary>
		public Guid? ReadingQuestionCriterionSystemId { get; set; }

		/// <summary>
		/// 项目Id
		/// </summary>
		public Guid TrialId { get; set; }

		/// <summary>
		/// 标准
		/// </summary>
		public string CriterionName { get; set; }

		/// <summary>
		/// 是否启用
		/// </summary>
		public bool IsEnable { get; set; }

		/// <summary>
		/// 排序
		/// </summary>
		public int ShowOrder { get; set; }

		/// <summary>
		/// 是否完成配置
		/// </summary>
		public bool IsCompleteConfig { get; set; }

		/// <summary>
		/// 创建时间
		/// </summary>
		public DateTime CreateTime { get; set; }

		/// <summary>
		/// 创建人
		/// </summary>
		public Guid CreateUserId { get; set; }


		/// <summary>
		/// 描述
		/// </summary>
		public string Description { get; set; }

		/// <summary>
		/// 是否确认
		/// </summary>
		public bool IsConfirm { get; set; }

		/// <summary>
		/// 表单类型
		/// </summary>

		public FormType FormType { get; set; } = FormType.SinglePage;


		/// <summary>
		/// 修约小数点
		/// </summary>
		public int? DigitPlaces { get; set; } = 1;

		/// <summary>
		/// 评估结果
		/// </summary>
		public string EvaluationResult { get; set; } = string.Empty;

		/// <summary>
		/// 全局阅片评估更新类型
		/// </summary>
		public string GlobalUpdateType { get; set; } = string.Empty;


		/// <summary>
		/// 评估原因
		/// </summary>
		public string EvaluationReason { get; set; } = "肿瘤学阅片评估原因请依据临床数据填写，在与影像学结果不一致时必填。";


		/// <summary>
		/// 是否显示详情
		/// </summary>
		public bool IsShowDetail { get; set; }

		/// <summary>
		/// 同步时间
		/// </summary>
		public DateTime SynchronizeTime { get; set; }


		/// <summary>
		/// 同步器官时间
		/// </summary>
		public DateTime? SynchronizeOriginalTime { get; set; }

		/// <summary>
		/// 标准类型
		/// </summary>
		public CriterionType CriterionType { get; set; }

		/// <summary>
		///  eCRF报告是否显示在图像页面
		/// </summary>
		public bool IseCRFShowInDicomReading { get; set; } = false;

		#region 阅片单元配置 新加

		/// <summary>
		/// 阅片平台 
		/// </summary>
		public ImagePlatform ImagePlatform { get; set; } = ImagePlatform.PACS;

		/// <summary>
		/// 阅片工具
		/// </summary>
		public ReadingTool? ReadingTool { get; set; }

		/// <summary>
		/// 任务组织级别
		/// </summary>
		public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; }


		/// <summary>
		/// 阅片是否显示患者信息
		/// </summary>
		public bool IsReadingShowSubjectInfo { get; set; } = true;

		/// <summary>
		/// IR阅片页面是否可以查看既往任务结果
		/// </summary>
		public bool IsReadingShowPreviousResults { get; set; } = true;


		/// <summary>
		/// 是确认医学审核问题
		/// </summary>

		public bool IsConfirmMedicineQuestion { get; set; } = false;


		/// <summary>
		/// 仲裁对象
		/// </summary>
		public ArbitrationRule ArbitrationRule { get; set; } = ArbitrationRule.Reading;


		/// <summary>
		/// 阅片模式
		/// </summary>
		public ReadingMethod ReadingType { get; set; } = ReadingMethod.Double;



		/// <summary>
		/// 是否有阅片期
		/// </summary>
		public bool IsReadingPeriod { get; set; } = true;

		/// <summary>
		/// 是否生成全局阅片任务
		/// </summary>
		public bool IsGlobalReading { get; set; } = true;

		/// <summary>
		/// 是否签名
		/// </summary>
		public bool IsSigned { get; set; } = false;


		/// <summary>
		/// 仲裁阅片
		/// </summary>
		public bool IsArbitrationReading { get; set; } = true;


		/// <summary>
		/// 肿瘤学阅片  原字段 IsClinicalReading
		/// </summary>
		public bool IsOncologyReading { get; set; }

		/// <summary>
		/// 任务展示检查批次 读片任务显示是否顺序
		/// </summary>
		public bool IsReadingTaskViewInOrder { get; set; } = true;


		//任务分配对象
		public TaskAllocateObj TaskAllocateObjEnum { get; set; }


		//后续检查批次任务自动分配
		public bool IsFollowVisitAutoAssign { get; set; } = true;

		//后续全局自动分配
		public bool IsFollowGlobalVisitAutoAssign { get; set; } = true;

		public bool IsFollowJudgeTaskAutoAssign { get; set; } = true;

		public TaskAllocateDefaultState FollowJudgeTaskAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated;

		//后续检查批次自动分配默认状态
		public TaskAllocateDefaultState FollowVisitAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated;

		//后续全局自动分配默认状态
		public TaskAllocateDefaultState FollowGlobalVisitAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated;


		/// <summary>
		/// 阅片信息签名时间
		/// </summary>
		public DateTime? ReadingInfoSignTime { get; set; }

		/// <summary>
		/// 是否必须全局阅片
		/// </summary>
		public bool IsMustGlobalReading { get; set; } = false;

		#endregion

		/// <summary>
		/// 项目
		/// </summary>
		[ForeignKey("TrialId")]
        [JsonIgnore]
		public Trial Trial { get; set; }

		[JsonIgnore]

		public List<ReadingQuestionTrial> ReadingQuestionTrialList = new List<ReadingQuestionTrial>();
	}


	



}
