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.ViewModel
{
    public class AddTaskLesionAnswerFromLastTaskInDto
    {
        public Guid VisitTaskId { get; set; }
    }

    public class ReadingTaskQuestionAnswerDto : ReadingTaskQuestionAnswer
    {
        public QuestionType QuestionType { get; set; }
    }
    public class TirggerTaskInfo
    {
        public Guid VisitTaskId { get; set; }

        public decimal VisitNum { get; set; }

        /// <summary>
        /// 靶病灶是否为IUPD或者ICPD
        /// </summary>
        public bool TargetAssessmentIsIUorIC { get; set; }

        /// <summary>
        /// 靶病灶是否为IUPD或者ICPD
        /// </summary>
        public bool NewTargetLesionAssessmentIsIUorIC { get; set; } 
    }


    public class TirggerAnswerInfo
    {
        public Guid VisitTaskId { get; set; }

        public QuestionType QuestionType { get; set; }

        public string Answer { get; set; } = string.Empty;

      
    }

    public class VisitStudyTime
    {
        /// <summary>
        /// 访视Id
        /// </summary>
        public Guid SubjectVisitId { get; set; }

        public DateTime? StudyTime { get; set; }
    }

    public class SiteVisitForTumor
    {
        /// <summary>
        /// 访视Id
        /// </summary>
        public Guid VisitTaskId { get; set; }

        public Guid? SubjectVisitId { get; set; }

        /// <summary>
        /// 任务Num
        /// </summary>
        public decimal VisitTaskNum { get; set; }

        /// <summary>
        /// 检查日期
        /// </summary>
        public DateTime? StudyTime { get; set; }

      
    }

    public class AddTaskLesionAnswerFromLastTaskOutDto
    {
        public bool IsBaseLine { get; set; }
    }

    public class IRECISTTargetLesionDto
    {
        /// <summary>
        /// 基线未选择任何靶病灶
        /// </summary>
        public bool NotExistsTargetLesion { get; set; }

        /// <summary>
        /// 上一访视评估
        /// </summary>
        public string LastTaskTarget { get; set; }

        /// <summary>
        /// 满足RECISTPD
        /// </summary>
        public bool MeetRECISTPD { get; set; }

        /// <summary>
        /// 本次访视SOD与触发iRECIST访视相比本次访视SOD增加不小于5mm
        /// </summary>
        public bool SODTiggerAddGreaterThan5 { get; set; }

        /// <summary>
        /// 比整体访视期间最低点SOD增加≥20 %
        /// </summary>
        public bool LowSodAddGreaterThan20Percent { get; set; }

        /// <summary>
        ///  比整体访视期间最低点SOD绝对增加值≥5 mm
        /// </summary>
        public bool LowSodAddGreaterThan5 { get; set; }

        /// <summary>
        /// 当前访视至少有一个“存在”状态的靶病灶
        /// </summary>
        public bool HaveExistLesion { get; set; }

        /// <summary>
        /// 有任一靶病灶为NE状态
        /// </summary>
        public bool HaveNeLesion { get; set; }

        /// <summary>
        /// 所有非淋巴结靶病灶消失，径线总和为0
        /// </summary>
        public bool AllLesionVanish { get; set; }

        /// <summary>
        /// 所有淋巴结靶病灶的短径缩小到 < 10 mm
        /// </summary>
        public bool AllMinorAxisLessThan10 { get; set; }

        /// <summary>
        /// 与基线期SOD相比减小≥30 %
        /// </summary>
        public bool BaseLineLessThan30 { get; set; }

        /// <summary>
        /// 非靶病灶中淋巴结病灶全部消失
        /// </summary>
        public bool NoTargetLymphLoss { get; set; }

    }

    /// <summary>
    /// IRECIST 非靶病灶
    /// </summary>
    public class IRECISTNoTargetLesion
    {
        /// <summary>
        /// 基线未选择任何非靶病灶
        /// </summary>
        public bool NotExistsNoTargetLesion { get; set; }

        /// <summary>
        /// 上次非靶病灶评估结果
        /// </summary>
        public string LastNoTargetLesion { get; set; }

        /// <summary>
        /// 任一非靶病灶状态评估为“进一步增大（iCPD）”
        /// </summary>
        public bool ExistiCPD { get; set; }

        /// <summary>
        /// 出现至少1个上一访视未评估为“显著增大（iUPD）”的病灶本次访视评估为“显著增大（iUPD）”
        /// </summary>
        public bool LastNoUPD { get; set; }

        /// <summary>
        ///  任一非靶病灶状态评估为 iUPD
        /// </summary>
        public bool ExistiUPD { get; set; }

        /// <summary>
        /// 满足RECIST1.1PD
        /// </summary>
        public bool RECISTPD { get; set; }

        /// <summary>
        /// 有任一非靶病灶为NE状态
        /// </summary>
        public bool HaveNeLesion { get; set; }

        /// <summary>
        /// 全部为消失
        /// </summary>
        public bool AllVanish { get; set; }
    }

    /// <summary>
    /// 新靶病灶评估Dto
    /// </summary>
    public class IRECISTNewTargetLesionDto
    {
        /// <summary>
        /// 不存在新靶病灶
        /// </summary>
        public bool NotExistsNewTargetLesion { get; set; }

        /// <summary>
        /// 所有状态为消失
        /// </summary>
        public bool AllVanish { get; set; }

        /// <summary>
        /// 上一访视新靶病灶评估
        /// </summary>
        public string LastTaskNewTargetLesion { get; set; }

        /// <summary>
        /// SOD增加5mm以上
        /// </summary>
        public bool ISODAdd5mm { get; set; }

        /// <summary>
        /// 有"存在"状态的新靶病灶
        /// </summary>
        public bool HaveExixtsState { get; set; }

        /// <summary>
        /// 至少有一个新靶病无法评估
        /// </summary>
        public bool ExixtsUnevaluableState { get; set; }

        /// <summary>
        /// 当有“存在”状态的淋巴结新靶病灶
        /// </summary>
        public bool ExixtsLymphTarget { get; set; }

        /// <summary>
        /// 当有“存在”或“太小”状态的非淋巴结新靶病灶
        /// </summary>
        public bool ExixtsOrLessNoLymphTarget{ get; set; }
    }

    /// <summary>
    /// 其他既往新病灶
    /// </summary>
    public class IRECISTOtherNewTargetLesionDto
    {
        /// <summary>
        /// 不存在其他既往新病灶
        /// </summary>
        public bool NotExistsOtherNewTargetLesion { get; set; }

        /// <summary>
        /// 所有状态为消失
        /// </summary>
        public bool AllVanish { get; set; }

        /// <summary>
        /// 存在明确状态
        /// </summary>
        public bool ExistsClear { get; set; }

        /// <summary>
        /// 至少有一个病灶无法评估
        /// </summary>
        public bool ExixtsUnevaluableState { get; set; }

        /// <summary>
        /// 至少有一个其它既往新病灶为疑似状态
        /// </summary>
        public bool ExixtsSuspectedState { get; set; }
    }

    ///// <summary>
    ///// 触发iRECIST后新病灶评估
    ///// </summary>
    //public class NewLesionAfterTriggeringiRECSITAssessmentDto
    //{
        
    //}

    public class IRECISTNewNoTargetLesionDto
    {
        /// <summary>
        /// 不存在新非靶病灶
        /// </summary>
        public bool NotExistsNewNoTargetLesion { get; set; }

        /// <summary>
        /// 所有状态为消失
        /// </summary>
        public bool AllVanish { get; set; }


        /// <summary>
        /// 上一访视新非靶病灶评估
        /// </summary>
        public string LastTaskNewNoTargetLesion { get; set; }

        /// <summary>
        /// 当前访视的新靶病灶评估
        /// </summary>
        public string NewTargetLesion { get; set; }

        /// <summary>
        /// 任一新非靶病灶状态为“增大”
        /// </summary>
        public bool ExixtsEnlargementState { get; set; }

        /// <summary>
        /// 有"存在"状态的病灶
        /// </summary>
        public bool HaveExixtsState { get; set; }

        /// <summary>
        /// 至少有一个病灶无法评估
        /// </summary>
        public bool ExixtsUnevaluableState { get; set; }
    }

    /// <summary>
    /// IRECIST新病灶Dto
    /// </summary>
    public class IRECISTNewLesionAssessmentDto
    {
        /// <summary>
        /// 上一次任务的新病灶评估为iUPD
        /// </summary>
        public bool LastTaskNewLesioniUPD { get; set; }

        /// <summary>
        /// 上一次任务的新病灶评估为iCPD
        /// </summary>
        public bool LastTaskNewLesioniCPD { get; set; }

        /// <summary>
        /// 存在触发iRECIST后新病灶
        /// </summary>
        public bool ExistxIRECISTNewLesion { get; set; }
    }

    /// <summary>
    /// IRECIST整体肿瘤评估
    /// </summary>
    public class IRECISTTargetLesionEvaluateDto
    {
        /// <summary>
        /// 上一次任务的评估为iUPD或者iCPD
        /// </summary>
        public bool LastTaskLesioniUPDOriCPD { get; set; }
    }
}
