using IRaCIS.Core.Domain.Share;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IRaCIS.Core.Application.Service.Reading.Dto
{


    public class ClinicalDataTrialSetAddOrEdit
    {
        public Guid? Id { get; set; }


        /// <summary>
        /// 名称
        /// </summary>
        public string ClinicalDataSetName { get; set; }

        /// <summary>
        /// 临床级别
        /// </summary>
        public ClinicalLevel ClinicalDataLevel { get; set; }


        /// <summary>
        /// 上传方式
        /// </summary>
        public ClinicalUploadType ClinicalUploadType { get; set; }

        /// <summary>
        /// 上传角色
        /// </summary>
        public UploadRole UploadRole { get; set; }

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

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

        /// <summary>
        /// 是否勾选
        /// </summary>
        public bool IsConfirm { get; set; }

        /// <summary>
		/// 模板文件名称
		/// </summary>
		public string FileName { get; set; }

        /// <summary>
        /// 文件路径
        /// </summary>
        public string Path { get; set; }


        public List<Guid> TrialCriterionIdList { get; set; }

        //public string CriterionEnumListStr { get; set; } = String.Empty;

        //public List<int> CriterionEnumList { get; set; }
    }

    public class ClinicalDataSystemSetAddOrEdit
    {
        public Guid? Id { get; set; }


        /// <summary>
        /// 枚举
        /// </summary>
        public int ClinicalDataSetEnum { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string ClinicalDataSetName { get; set; }

        /// <summary>
        /// 临床级别
        /// </summary>
        public ClinicalLevel ClinicalDataLevel { get; set; }

        /// <summary>
        /// 上传角色
        /// </summary>
        public UploadRole UploadRole { get; set; }


        /// <summary>
        /// 上传方式
        /// </summary>
        public ClinicalUploadType ClinicalUploadType { get; set; }

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

        /// <summary>
		/// 模板文件名称
		/// </summary>
		public string FileName { get; set; }

        /// <summary>
        /// 文件路径
        /// </summary>
        public string Path { get; set; }


        //public List<Guid> SystemCriterionIdList { get; set; }


        public string CriterionEnumListStr { get; set; } = String.Empty;

        public List<int> CriterionEnumList { get; set; }


    }



    public class ClinicalDataTrialSetView: ClinicalDataTrialSetAddOrEdit
    {
        public List<string> TrialCriterionNameList { get; set; }


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

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



        /// <summary>
        /// 系统的ClinicalDataSetId
        /// </summary>
        public Guid? SystemClinicalDataSetId { get; set; }

      

        /// <summary>
        /// 是否来自于系统数据
        /// </summary>
        public bool IsFromSystemData
        {
            get
            {
                return this.SystemClinicalDataSetId == null ? false : true;
            }
        }

        /// <summary>
        /// 是否使用
        /// </summary>
        public bool IsUsed { get; set; } = false;

    }


    public class ClinicalDataSystemSetView : ClinicalDataSystemSetAddOrEdit
    {

        //public List<string> SystemCriterionNameList { get; set; }

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

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

    }

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

        /// <summary>
        /// 患者ID
        /// </summary>
        public Guid SubjectId { get; set; }

        /// <summary>
        /// 检查批次或者阅片ID
        /// </summary>
        public Guid VisitOrReadId { get; set; }
    }
    public class ClinicalDataQuery : PageInput
    {
        /// <summary>
		/// 项目ID
		/// </summary>
		public Guid? TrialId { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string ClinicalDataSetName { get; set; } = string.Empty;

    }
    public class GetTrialClinicalDataSystemIndto
    {
        /// <summary>
        /// 名称
        /// </summary>
        public string ClinicalDataSetName { get; set; } = String.Empty;

        /// <summary>
        /// 临床级别
        /// </summary>
        public ClinicalLevel? ClinicalDataLevel { get; set; }


        /// <summary>
        /// 上传方式
        /// </summary>
        public ClinicalUploadType? ClinicalUploadType { get; set; }
    }


    public class SetClinicalDataCheckdIndto
    {
        /// <summary>
        /// 项目ID
        /// </summary>
        public Guid TrialId { get; set; }



        public List<Guid> ClinicalDataTrialIds { get; set; }
    }


    public class GetTrialClinicalDataTrialIndto
    {
        public Guid TrialId { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        public string ClinicalDataSetName { get; set; } = String.Empty;

        /// <summary>
        /// 临床级别
        /// </summary>
        public ClinicalLevel? ClinicalDataLevel { get; set; }


        /// <summary>
        /// 上传方式
        /// </summary>
        public ClinicalUploadType? ClinicalUploadType { get; set; }
    }



    public class CriterionSelectDto
    {
        public Guid Id { get; set; }

        public string CriterionName { get; set; }
    }

    public class SystemCriterionSelectDto
    {
        public Guid Id { get; set; }

        public string CriterionName { get; set; }


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

        public bool IsCompleteConfig { get; set; }
    }

    public class TrialCriterionSelectDto
    {
        public Guid Id { get; set; }

        public string CriterionName { get; set; }

        public bool IsEnable { get; set; }

        public bool IsCompleteConfig { get; set; }

        public bool IsConfirm { get; set; }
    }





    public class SystemCriterionSelectQuery
    {
        public string? CriterionName { get; set; }

        public bool? IsEnable { get; set; }

        public bool? IsCompleteConfig { get; set; }
    }

    public class TrialCriterionSelectQuery
    {
        public Guid TrialId { get; set; }
        public string? CriterionName { get; set; }

        public bool? IsEnable { get; set; }

        public bool? IsCompleteConfig { get; set; }

        public bool? IsConfirm { get; set; }
    }
}
