using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IRaCIS.Core.Domain.Share
{

    public static class ReadingQestionType
    {

        public static readonly string Table = "table";

        public static readonly string Group = "group";
    }


    public enum RelevanceType
    {
        /// <summary>
        /// 关联的检查批次任务ID (当前任务是检查批次任务的话会有自己)集合
        /// </summary>
        Related = 0,

        /// <summary>
        /// 既往任务Id  不包括自己
        /// </summary>
        PastResult = 1,
    }

    /// <summary>
    /// 数据来源
    /// </summary>
    public enum DataSources
    {

        /// <summary>
        /// 手动录入
        /// </summary>
        ManualEntry = 0,

        /// <summary>
        /// 自动计算
        /// </summary>
        Automatic = 1
    }


    /// <summary>
    /// 自定义计算标记
    /// </summary>
    public enum CustomCalculateMark
    {

        /// <summary>
        /// +
        /// </summary>
        Add = 1,

        /// <summary>
        /// -
        /// </summary>
        Subtract = 2,

        /// <summary>
        /// ×
        /// </summary>
        Multiply = 3,

        /// <summary>
        /// ÷
        /// </summary>
        Divide = 4,

        /// <summary>
        /// ∏ 求积
        /// </summary>
        Quadrature = 5,

        /// <summary>
        /// ∑
        /// </summary>
        Sum = 6,

        /// <summary>
        /// Avg
        /// </summary>
        Avg = 7,

        /// <summary>
        /// Max
        /// </summary>
        Max = 8,

        /// <summary>
        /// Min
        /// </summary>
        Min = 9
    }

    /// <summary>
    /// 数值单位
    /// </summary>
    public enum ValueUnit
    {
        None = 0,

        /// <summary>
        /// MM
        /// </summary>
        MM = 1,

        /// <summary>
        /// CM
        /// </summary>
        CM = 2,

        /// <summary>
        /// 个
        /// </summary>
        Individual = 3,

        /// <summary>
        /// 自定义
        /// </summary>
        Custom = 4,
    }


    /// <summary>
    /// 数值类型
    /// </summary>
    public enum ValueOfType
    {

        /// <summary>
        /// 整形
        /// </summary>
        Plastic = 0,

        /// <summary>
        /// 小数
        /// </summary>
        Decimals = 1,

        /// <summary>
        /// 百分数
        /// </summary>
        Percentage = 2,
    }

    /// <summary>
    /// 报告层级
    /// </summary>
    public enum ReportLayType
    {
        /// <summary>
        /// 分组
        /// </summary>
        Group=0,

        /// <summary>
        /// 问题
        /// </summary>
        Question = 1,

        /// <summary>
        /// 病灶
        /// </summary>
        Lesions = 2,

        /// <summary>
        /// 表格问题
        /// </summary>
        TableQuestion = 3,
    }

    public enum ImagePlatform
    {
        None = 0,


        MINT = 1,

        Ambra = 2,

        /// <summary>
        /// 展影
        /// </summary>
        PACS = 3,
    }


    /// <summary>
    /// 标准文件类型
    /// </summary>
    public enum CriterionFileType
    {

        /// <summary>
        /// 声明
        /// </summary>
        Statement = 0,

        /// <summary>
        /// 回执
        /// </summary>
        Acknowledgement = 1
    }


    /// <summary>
    /// 标准类型
    /// </summary>
    public enum CriterionType
    {
        NoCriterion = -1,

        //自定义
        SelfDefine = 0,

        /// <summary>
        /// RECIST 1.1
        /// </summary>
        RECIST1Pointt1 = 1,

        /// <summary>
        /// PCWG3
        /// </summary>
        PCWG3 = 10,

        /// <summary>
        /// mRECIST Mesothelioma
        /// </summary>
        mRECISTMesothelioma = 11,

        /// <summary>
        /// RECIL
        /// </summary>
        RECIL = 12,

        /// <summary>
        /// RECIST 1.0
        /// </summary>
        RECIST1Point0 = 13,

        /// <summary>
        /// WHO
        /// </summary>
        WHO = 14,

        /// <summary>
        /// PERCIST
        /// </summary>
        PERCIST = 15,

        /// <summary>
        /// Forrest
        /// </summary>
        Forrest = 16,

        /// <summary>
        /// Lugano 2014
        /// </summary>
        Lugano2014 = 2,

        /// <summary>
        /// iRECIST
        /// </summary>
        iRECIST = 3,

        /// <summary>
        /// RANO-BM
        /// </summary>
        RANO_BM = 4,

        /// <summary>
        /// RANO
        /// </summary>
        RANO = 5,

        /// <summary>
        /// IWCLL 2018
        /// </summary>
        IWCLL2018 = 6,

        /// <summary>
        /// mRECIST HCC
        /// </summary>
        mRECISTHCC = 7,

        /// <summary>
        /// Cheson 2007
        /// </summary>
        Cheson2007 = 8,

        /// <summary>
        /// IMWG 2016
        /// </summary>
        IMWG2016 = 9
    }


    /// <summary>
    /// 是否存在疾病
    /// </summary>
    public enum ExistDisease
    {

        /// <summary>
        /// 无
        /// </summary>
        None = 0,

        /// <summary>
        /// 是
        /// </summary>
        Yes = 1,

        /// <summary>
        /// 否
        /// </summary>
        No = 2
    }


    /// <summary>
    /// 病灶分裂或合并
    /// </summary>
    public enum SplitOrMergeType
    {

        /// <summary>
        /// 分裂
        /// </summary>
        Split = 0,

        /// <summary>
        /// 合并
        /// </summary>
        Merge = 1
    }

    /// <summary>
    /// 是否存在或者NA
    /// </summary>
    public enum ExistOrNA
    {
        /// <summary>
        /// NA
        /// </summary>
        NA = -1,

        /// <summary>
        /// 不存在
        /// </summary>
        NotExist = 0,

        /// <summary>
        /// 存在
        /// </summary>
        Exist = 1,

        
    }

    /// <summary>
    /// 是否存在(是否存在和NA)
    /// </summary>
    public enum YesOrNoOrNa
    {

        /// <summary>
        /// NA
        /// </summary>
        NA = -1,

        /// <summary>
        /// 否
        /// </summary>
        No = 0,

        /// <summary>
        /// 是
        /// </summary>
        Yes = 1,

      
    }

    /// <summary>
    /// 是否淋巴结
    /// </summary>
    public enum IsLymph
    {

        /// <summary>
        /// 否
        /// </summary>
        No = 0,

        /// <summary>
        /// 是
        /// </summary>
        Yes = 1
    }

    /// <summary>
    /// 整体肿瘤评估
    /// </summary>
    public enum OverallAssessment
    {
        /// <summary>
        /// NA
        /// </summary>
        NA = -1,

        /// <summary>
        /// CR
        /// </summary>
        CR = 0,

        /// <summary>
        /// ND
        /// </summary>
        ND = 1,

        /// <summary>
        /// NE
        /// </summary>
        NE = 2,

        /// <summary>
        /// NN
        /// </summary>
        NN = 3,

        /// <summary>
        /// PD
        /// </summary>
        PD = 4,

        /// <summary>
        /// PR
        /// </summary>
        PR = 5,

        /// <summary>
        /// SD
        /// </summary>
        SD = 6,

      
    }


    /// <summary>
    /// 病灶评估状态
    /// </summary>
    public enum EvaluationOfState
    {

        /// <summary>
        /// 消失
        /// </summary>
        Loss = 1,

        /// <summary>
        /// 存在
        /// </summary>
        Exists = 2,

        /// <summary>
        /// 良性
        /// </summary>
        Benign = 3,

        /// <summary>
        /// 不可评估
        /// </summary>
        UnableEvaluate = 4,
    }


    /// <summary>
    /// 新病灶评估
    /// </summary>
    public enum NewLesionAssessment
    {
        /// <summary>
        /// NA
        /// </summary>
        NA = -1,

        /// <summary>
        /// 是
        /// </summary>
        Yes = 0,

        /// <summary>
        /// 疑似
        /// </summary>
        Suspected = 1,

        /// <summary>
        /// NE
        /// </summary>
        NE = 2,

        /// <summary>
        /// 否
        /// </summary>
        No = 3,

      
    }

    /// <summary>
    /// 非靶病灶评估
    /// </summary>
    public enum NoTargetAssessment
    {
        /// <summary>
        /// NA
        /// </summary>
        NA = -1,

        /// <summary>
        /// PD
        /// </summary>
        PD = 0,

        /// <summary>
        /// CR
        /// </summary>
        CR = 1,

        /// <summary>
        /// NE
        /// </summary>
        NE = 2,

        /// <summary>
        /// ND
        /// </summary>
        ND = 3,

        /// <summary>
        /// NN
        /// </summary>
        NN = 4,

      
    }

    /// <summary>
    /// 靶病灶评估
    /// </summary>
    public enum TargetAssessment
    {
        /// <summary>
        /// NA
        /// </summary>
        NA = -1,

        /// <summary>
        /// CR
        /// </summary>
        CR = 0,

        /// <summary>
        /// PR
        /// </summary>
        PR = 1,

        /// <summary>
        /// SD
        /// </summary>
        SD = 2,

        /// <summary>
        /// PD
        /// </summary>
        PD = 3,

        /// <summary>
        /// NE
        /// </summary>
        NE = 4,

        /// <summary>
        /// ND
        /// </summary>
        ND = 5,

       
    }


    /// <summary>
    /// 非靶病灶状态
    /// </summary>
    public enum NoTargetState
    {
        /// <summary>
        /// 存在
        /// </summary>
        Exist = 0,

        /// <summary>
        /// 显著增大
        /// </summary>
        Increase = 1,

        /// <summary>
        /// 无法评估
        /// </summary>
        UnableEvaluate = 2,

        /// <summary>
        /// 消失
        /// </summary>
        Loss = 3
    }


    /// <summary>
    /// 新病灶状态
    /// </summary>
    public enum NewLesionState
    {

        /// <summary>
        /// 存在
        /// </summary>
        Exist = 0,

        /// <summary>
        /// 疑似
        /// </summary>
        Suspected = 1,

        /// <summary>
        /// 无法评估
        /// </summary>
        UnableEvaluate = 2,

        /// <summary>
        /// 消失
        /// </summary>
        Loss = 3
    }

    /// <summary>
    /// 靶病灶状态
    /// </summary>
    public enum TargetState
    {

        /// <summary>
        /// 存在
        /// </summary>
        Exist = 0,

        /// <summary>
        /// 太小
        /// </summary>
        TooSmall = 1,

        /// <summary>
        /// 无法评估
        /// </summary>
        UnableEvaluate = 2,

        /// <summary>
        /// 消失
        /// </summary>
        Loss = 3
    }

    /// <summary>
    /// 模块枚举
    /// </summary>
    public enum ModuleTypeEnum
    {
        /// <summary>
        /// 计划内检查批次
        /// </summary>
        InPlanSubjectVisit = 0,

        /// <summary>
        /// 计划外检查批次
        /// </summary>
        OutPlanSubjectVisit = 1,

        ///// <summary>
        ///// 阅片期
        ///// </summary>
        //Read = 2,

        /// <summary>
        /// 全局阅片
        /// </summary>
        Global = 3,

        /// <summary>
        /// 裁判
        /// </summary>
        Referee = 4,

        /// <summary>
        /// 肿瘤学
        /// </summary>
        Oncology = 5,


    }

    public enum ReadingSetType
    {
        /// <summary>
        /// 影像阅片
        /// </summary>
        ImageReading = 0,

        /// <summary>
        /// 肿瘤阅片
        /// </summary>
        TumorReading = 1,
    }

    /// <summary>
    /// 阅片期范围
    /// </summary>
    public enum ReadingScopeEnum
    {
        /// <summary>
        /// 全部
        /// </summary>
        All = 0,

        /// <summary>
        /// 根据Site
        /// </summary>
        Site = 1,
    }

    /// <summary>
    /// 全局阅片展示类型
    /// </summary>
    public enum GlobalReadingShowType
    {

        /// <summary>
        /// 全都显示
        /// </summary>
        AllShow = 0,

        /// <summary>
        /// 基线显示
        /// </summary>
        BaseLineShow = 1,

        /// <summary>
        /// 随访显示
        /// </summary>
        FollowVisitShow = 2,

        /// <summary>
        /// 不显示
        /// </summary>
        NotShow =3
    }



    /// <summary>
    /// 状态
    /// </summary>
    public enum ReadingPeriodStatus
    {
        /// <summary>
        /// 未生效
        /// </summary>
        NotTakeEffect = 0,

        /// <summary>
        /// 已生效
        /// </summary>
        TakeEffect = 1,

        /// <summary>
        /// 已撤销
        /// </summary>
        Revocation = 2,
    }

    /// <summary>
    /// 上传角色
    /// </summary>
    public enum UploadRole
    {
        /// <summary>
        /// IC
        /// </summary>
        CRC = 0,

        /// <summary>
        /// PM
        /// </summary>
        PM = 1,
    }

    /// <summary>
	/// 上传方式
	/// </summary>
	public enum ClinicalUploadType
    {
        /// <summary>
        /// 表格
        /// </summary>
        [Display(Name = "表格")]
        Table = 0,

        /// <summary>
        /// PDF
        /// </summary>
        [Display(Name = "PDF")]
        PDF = 1,

    }

    /// <summary>
    /// 数据类型
    /// </summary>
    public enum ClinicalDataType
    {
        /// <summary>
        /// 既往局部治疗史
        /// </summary>
        MedicalHistory = 0,

        /// <summary>
        /// 影像模态（PET临床信息）
        /// </summary>
        PET = 1,

        /// <summary>
        /// 胸水
        /// </summary>
        Hydrothorax = 2,
    }

    public enum LesionType
    {
        /// <summary>
        /// 靶病灶
        /// </summary>
        TargetLesion = 0,

        /// <summary>
        /// 非靶病灶
        /// </summary>
        NonTargetLesions = 1,

        /// <summary>
        /// 新病灶
        /// </summary>
        NewLesions = 2,

        /// <summary>
        /// 既往新病灶
        /// </summary>
        AlwaysNewLesions = 3,

        /// <summary>
        /// 基线病灶
        /// </summary>
        BaselineLesions=4,

    }


    public enum OrganType
    {
        /// <summary>
        /// 非靶和新病灶
        /// </summary>
        OffTargetAndNewLesions = 0,


        /// <summary>
        /// 淋巴结病灶
        /// </summary>
        NodularTargetLesions = 1,


        /// <summary>
        /// 非淋巴结靶病灶
        /// </summary>
        NonNodularTargetLesions = 2,

        /// <summary>
        /// 通用
        /// </summary>
        General = 3,
    }

    /// <summary>
    /// 临床分组级别
    /// </summary>
    public enum ClinicalLevel
    {
        /// <summary>
        /// 患者
        /// </summary>
        [DisplayAttribute(Name = "患者")]
        Subject = 0,

        /// <summary>
        /// 检查批次
        /// </summary>
        [DisplayAttribute(Name = "检查批次")]
        SubjectVisit = 1,

        /// <summary>
        /// 影像学阅片
        /// </summary>
        [DisplayAttribute(Name = "影像学阅片")]
        ImageRead = 2,

        /// <summary>
        /// 肿瘤学阅片
        /// </summary>
        [DisplayAttribute(Name = "肿瘤学阅片")]
        OncologyRead = 3,
    }

    /// <summary>
    /// 全局答案类型
    /// </summary>
    public enum GlobalAnswerType
    {

        /// <summary>
        /// 问题答案
        /// </summary>
        Question = 0,

        /// <summary>
        /// 原因
        /// </summary>
        Reason = 1,

        /// <summary>
        /// 是否同意
        /// </summary>
        AgreeOrNot = 2,

        /// <summary>
        /// 评估更新类型
        /// </summary>
        UpdateType = 3
    }

    public enum QuestionMark
    {
        /// <summary>
        /// 长径
        /// </summary>
        MajorAxis = 0,

        /// <summary>
        /// 短径
        /// </summary>
        ShortAxis = 1,

        /// <summary>
        /// 是否淋巴结
        /// </summary>
        IsLymph = 2,

        /// <summary>
        /// 自增Id
        /// </summary>
        AutoId = 3,

        /// <summary>
        /// 病灶名称
        /// </summary>
        Lesion = 4,

        /// <summary>
        /// 所在器官
        /// </summary>
        Organ = 5,

        /// <summary>
        /// 所在位置
        /// </summary>
        Location = 6,

        /// <summary>
        /// 状态
        /// </summary>
        State = 7,

        /// <summary>
        /// 所在部位
        /// </summary>
        Part = 8,

        /// <summary>
        /// 病灶数量
        /// </summary>
        LesionNumber=11,
    }

    /// <summary>
    /// 问题类型  这里序号关系着计算顺序 请勿修改
    /// </summary>
    public enum QuestionType
    {
        /// <summary>
        /// 靶病灶径线之和（SOD）
        /// </summary>
        SOD = 0,

        /// <summary>
        /// 非淋巴结靶病灶长径之和
        /// </summary>
        SumOfDiameter = 1,

        /// <summary>
        /// 与基线SOD相比变化量（mm）
        /// </summary>
        SODChange = 2,

        /// <summary>
        /// 与基线检查批次相比SOD变化百分比
        /// </summary>
        SODPercent = 3,

        /// <summary>
        /// 与整个检查批次期间SOD最低点相比增加的值（mm）  其他任务需要改
        /// </summary>
        LowestIncrease = 4,

        /// <summary>
        /// 与整个检查批次期间SOD最低点相比增加的百分比   其他任务需要改
        /// </summary>
        LowPercent = 5,

        /// <summary>
        /// 整个检查批次期间SOD最低点检查批次名称            其他任务需要改
        /// </summary>
        LowVisit = 6,

        /// <summary>
        /// 是否存在非淋巴结靶病灶
        /// </summary>
        IsLymphTarget = 7,

        /// <summary>
        /// 是否存在淋巴结靶病灶且该病灶比上一检查批次短径增加5MM以上
        /// </summary>
        IsAddFive = 8,

        /// <summary>
        /// 被评估为NE的单个靶病灶
        /// </summary>
        NETarget = 9,

        /// <summary>
        /// 靶病灶评估  TargetAssessment
        /// </summary>
        TargetLesion = 10,

        /// <summary>
        /// 非靶病灶评估  NoTargetAssessment
        /// </summary>
        NoTargetLesion = 11,

        /// <summary>
        /// 是否存在新病灶   NewLesionAssessment
        /// </summary>
        NewLesions = 12,

        /// <summary>
        /// 整体肿瘤评估
        /// </summary>
        Tumor = 13,

        /// <summary>
        /// 检查批次点备注 --注册证环境   评估总结
        /// </summary>
        /// </summary>
        AdjustReason = 14,

        /// <summary>
        /// 是否存在疾病
        /// </summary>
        ExistDisease = 15,

        /// <summary>
        /// 基线病灶计数
        /// </summary>
        BaseLineLesionsCount = 16,

        /// <summary>
        /// 新病灶计数
        /// </summary>
        NewLesionsCount = 17,

        /// <summary>
        /// 既往新病灶
        /// </summary>
        AlwaysNewLesionsCount = 18,

        /// <summary>
        /// 自治疗后第二个检查批次点以来持续的新骨病变数量
        /// </summary>
        NewBoneLesionsCount = 19,

        /// <summary>
        /// 疗效评估分组
        /// </summary>
        TherapeuticEffectEvaluationGroup=20,

        /// <summary>
        /// 检查批次点肿瘤评估
        /// </summary>
        SiteVisitForTumorEvaluation = 21,

        /// <summary>
        /// 间隔天数
        /// </summary>
        DaysBetween = 22,


    }

    /// <summary>
    /// 检查批次点肿瘤评估
    /// </summary>
    public enum VisitTumorEvaluation
    {

        /// <summary>
        /// PD
        /// </summary>
        PD = 1,

        /// <summary>
        /// ND
        /// </summary>
        ND = 2,

        /// <summary>
        /// NE
        /// </summary>
        NE = 3,

        /// <summary>
        /// 非PD
        /// </summary>
        NoPD = 4,

        /// <summary>
        /// NA
        /// </summary>
        NA = 5
    }

    /// <summary>
    /// 裁判阅片问题类型
    /// </summary>
    public enum JudgeReadingQuestionType
    {
        /// <summary>
        /// 问题
        /// </summary>
        Question = 1,

        /// <summary>
        /// 全局修改
        /// </summary>
        GlobalChange = 2,

        /// <summary>
        /// 检查批次点注释
        /// </summary>
        VisitRemark = 3,
    }

    public enum JudgeTypeEnum
    {
        None = 0,

        /// <summary>
        /// 答案不相同
        /// </summary>
        AnswerDisaffinity = 1,

        /// <summary>
        /// 答案分组
        /// </summary>
        AnswerGroup = 2,

        /// <summary>
        /// 答案组合
        /// </summary>
        AnswerCombination = 3,

        /// <summary>
        /// 不计算
        /// </summary>
        NotCalculate=4,

    }

    /// <summary>
    /// 限制编辑
    /// </summary>
    public enum LimitEdit
    {

        /// <summary>
        /// 否
        /// </summary>
        None = 0,

        /// <summary>
        /// 仅基线
        /// </summary>
        OnlyBaseLine = 1,

        /// <summary>
        /// 仅随访
        /// </summary>
        OnlyVisit = 2
    }


    /// <summary>
    /// 是否必填
    /// </summary>
    public enum IsRequired
    {
        /// <summary>
        /// 必填
        /// </summary>
        Required = 0,

        /// <summary>
        /// 依赖父问题
        /// </summary>
        Rely = 1,

        /// <summary>
        /// 不必填
        /// </summary>
        NotRequired = 2,


    }


    /// <summary>
    /// 是否关联
    /// </summary>
    public enum IsDepend
    {
        /// <summary>
        /// 是
        /// </summary>
        Yes = 0,

        /// <summary>
        /// 依赖父问题
        /// </summary>
        Rely = 1,

        /// <summary>
        /// 否
        /// </summary>
        No = 2,

    }

    /// <summary>
    /// 是否显示问题
    /// </summary>
    public enum ShowQuestion
    {
        /// <summary>
        /// 显示
        /// </summary>
        Show = 0,

        /// <summary>
        /// 依赖父问题
        /// </summary>
        Rely = 1,

        /// <summary>
        /// 不显示
        /// </summary>
        Hide = 2,

    }

    /// <summary>
    /// 阅片状态
    /// </summary>
    public enum ReadingStatusEnum
    {
        /// <summary>
        /// 影像上传（未提交）
        /// </summary>
        ImageNotSubmit = 0,

        /// <summary>
        /// 影像质控(未质控通过 --已提交)
        /// </summary>
        ImageQuality = 1,

        /// <summary>
        /// 一致性核查（未一致性核查通过 ---已质控通过）
        /// </summary>
        ConsistencyCheck = 2,

        /// <summary>
        /// 任务分配 (一致性核查通过 --未分配)
        /// </summary>
        TaskAllocate = 3,

        /// <summary>
        /// 影像阅片中（任务已分配--未阅片完成）
        /// </summary>
        ImageReading = 4,

        /// <summary>
        /// 阅片完成
        /// </summary>
        ReadCompleted = 5,

   
    }


    public enum ReadingClinicalDataStatus
    {
        WaitUpload = 0,

        HaveUploaded = 1,

        HaveChecked = 2,

        HaveSigned = 3

    }

    public enum ClinicalFileType
    {
        //既往手术
        PreviousSurgery = 1,

        //既往放疗历史
        PreviousHistory = 2,

        //其他
        PreviousOther = 3

    }



}
