using IRaCIS.Core.Application.Service.Reading.Dto;
using IRaCIS.Core.Domain.Share;
using IRaCIS.Core.Domain.Share.Reading;
using Newtonsoft.Json;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace IRaCIS.Core.Application.Contracts
{
    public class BasicTrialConfig
    {
        public Guid TrialId { get; set; }
        /// 
        /// 受试者编号具体规则
        /// 
        public string SubjectCodeRule { get; set; } = string.Empty;
        public bool IsSubjectSecondCodeView { get; set; }
        /// 
        /// 是否 验证拍片日期  
        /// 
        public bool IsVerifyVisitImageDate { get; set; } = false;
        /// 
        ///  是否 提醒受试者编号规则  
        /// 
        public bool IsNoticeSubjectCodeRule { get; set; } = true;
        /// 
        /// 是否 有基准时间(首次给药时间)
        /// 
        public bool IsHaveFirstGiveMedicineDate { get; set; } = true;
        /// 
        /// 是否有  受试者年龄
        /// 
        public bool IsHaveSubjectAge { get; set; } = false;
        public bool IsTrialBasicLogicConfirmed { get; set; } = false;
        /// 
        /// 出组后计划外访视名称
        /// 
        public string OutEnrollmentVisitName { get; set; } = "EOT";
        public bool IsSubjectSexView { get; set; } = false;
        public int ChangeDefalutDays { get; set; } = 5;
        /// 
        /// 跨项目复制
        /// 
        public bool IsImageReplicationAcrossTrial { get; set; } = false;
        [MaxLength]
        public string BodyPartTypes { get; set; } = string.Empty;
        public string Modalitys { get; set; } = string.Empty;
        public List ModalityList { get; set; } = new List();
        public List TrialObjectNameList { get; set; }
    }
    public class ConfigTrialProcessInfoVerificationInDto
    {
        public Guid TrialId { get; set; }
        public List TrialCriterionIds { get; set; } = new List();
        public List ClinicalDataTrialSetIds { get; set; } = new List();
    }
    public class TrialProcessConfig
    {
        public List CriterionIds { get; set; } = new List();
        public List TrialCriterionIds { get; set; } = new List();
        public Guid TrialId { get; set; }
        /// 
        /// 临床信息传输 1:系统录入2:系统录入+PDF 0:无
        /// 
        public int ClinicalInformationTransmissionEnum { get; set; } = 1;
        public List ClinicalDataTrialSetIds { get; set; } = new List();
        /// 
        /// QC流程  0 不审,1 单审,2双审  
        /// 
        public TrialQCProcess QCProcessEnum { get; set; }
        /// 
        /// 影像一致性核查
        /// 
        public bool IsImageConsistencyVerification { get; set; } = false;
        /// 
        /// 流程是否确认
        /// 
        public bool IsTrialProcessConfirmed { get; set; } = false;
        /// 
        /// 1 Mint、2 PACS  
        /// 
        public int ImagePlatform { get; set; } = 1;
        //阅片方式
        public int ReadingMode { get; set; }
        ////阅片类型 
        //public int ReadingType { get; set; }
        //public bool IsGlobalReading { get; set; } = true;
        public bool? IsArbitrationReading { get; set; }
        public bool? IsClinicalReading { get; set; }
        public int? DigitPlaces { get; set; }
        /// 
        /// 仲裁规则
        /// 
        public ArbitrationRule ArbitrationRule { get; set; }
        /// 
        /// 阅片是否显示受试者信息
        /// 
        public bool IsReadingShowSubjectInfo { get; set; } = false;
        /// 
        /// 阅片是否显示既往结果
        /// 
        public bool IsReadingShowPreviousResults { get; set; }
        public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; }
        [Comment("阅片任务产生之前 采集影像")]
        public CollectImagesType CollectImagesEnum { get; set; }
    }
    public class TrialTaskConfig
    {
        public Guid TrialId { get; set; }
        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 FollowVisitAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated;
        public TaskAllocateDefaultState FollowGlobalVisitAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated;
        public TaskAllocateDefaultState FollowJudgeTaskAutoAssignDefaultState { get; set; } = TaskAllocateDefaultState.Allocated;
    }
    public class TrialBasicConfigView : TrialTaskConfigView
    {
        /// 
        /// 流程是否确认
        /// 
        public bool IsTrialProcessConfirmed { get; set; } = false;
        //阅片方式
        public int ReadingMode { get; set; }
        //public bool IsGlobalReading { get; set; } = true;
        public bool? IsArbitrationReading { get; set; }
        public bool? IsClinicalReading { get; set; }
        public ArbitrationRule ArbitrationRule { get; set; }
    }
    public class TrialProcessConfigDTO
    {
        /// 
        /// QC流程  0 不审,1 单审,2双审  
        /// 
        public TrialQCProcess QCProcessEnum { get; set; } = TrialQCProcess.DoubleAudit;
        public bool IsImageConsistencyVerification { get; set; } = true;
        public bool IsPACSConnect { get; set; }
        public bool IsTrialPACSConfirmed { get; set; }
    }
    public class TrialTaskConfigView : TrialTaskConfig
    {
        public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; }
        public ReadingOrder IsReadingTaskViewInOrder { get; set; }
        //public ReadingMethod ReadingType { get; set; }
        /// 
        /// 阅片是否显示受试者信息
        /// 
        public bool IsReadingShowSubjectInfo { get; set; }
        /// 
        /// 阅片是否显示既往结果
        /// 
        public bool IsReadingShowPreviousResults { get; set; }
        public ReadingTool ReadingTool { get; set; }
        /// 
        /// QC流程  0 不审,1 单审,2双审  
        /// 
        public TrialQCProcess QCProcessEnum { get; set; } = TrialQCProcess.DoubleAudit;
        /// 
        /// 影像一致性核查
        /// 
        public bool IsImageConsistencyVerification { get; set; } = true;
    }
    public class TrialReadingTaskViewConfig
    {
        public Guid TrialId { get; set; }
        public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; }
        public ReadingOrder IsReadingTaskViewInOrder { get; set; }
        /// 
        /// 阅片是否显示受试者信息
        /// 
        public bool IsReadingShowSubjectInfo { get; set; }
        /// 
        /// 阅片是否显示既往结果
        /// 
        public bool IsReadingShowPreviousResults { get; set; }
    }
    public class TrialJudgeTaskConfig
    {
        public Guid TrialId { get; set; }
        public bool IsFollowJudgeTaskAutoAssign { get; set; }
        public TaskAllocateDefaultState FollowJudgeTaskAutoAssignDefaultState { get; set; }
    }
    public class TrialUrgentConfig
    {
        public Guid TrialId { get; set; }
        public bool IsSubjectExpeditedView { get; set; } = false;
        /// 
        /// 是否有 入组评估确认
        /// 
        public bool IsEnrollementQualificationConfirm { get; set; } = false;
        /// 
        /// 流程配置是否确认
        /// 
        public bool IsTrialUrgentConfirmed { get; set; } = false;
        public bool IsUrgent { get; set; }
        public bool IsPDProgressView { get; set; }
    }
    public class TrialPACSConfig
    {
        [NotDefault]
        public Guid TrialId { get; set; }
        public bool IsPACSConnect { get; set; }
        public bool IsTrialPACSConfirmed { get; set; } = true;
    }
    public class TrialStateChangeDTO
    {
        public Guid Id { get; set; }
        public Guid TrialId { get; set; }
        public string OriginState { get; set; } = String.Empty;
        public string NowState { get; set; } = String.Empty;
        public string Reason { get; set; } = String.Empty;
        public DateTime CreateTime { get; set; }
        public Guid CreateUserId { get; set; }
        public string UserName { get; set; } = String.Empty;
        public string UserRealName { get; set; } = String.Empty;
        public string SignCode { get; set; } = string.Empty;
    }
    public class GetTrialReadingInfoOutDto
    {
        public string TrialModalitys { get; set; }
        public bool IsImageFilter { get; set; }
        public string TrialReadingCriterionName { get; set; }
        /// 
        /// 项目ID
        /// 
        public Guid TrialId { get; set; }
        public CriterionType CriterionType { get; set; }
        /// 
		/// 是否有阅片期
		/// 
		public bool IsReadingPeriod { get; set; } = true;
        public bool IsSystemCriterion
        {
            get
            {
                return this.ReadingQuestionCriterionSystemId != null;
            }
        }
        /// 
        /// 是否加急
        /// 
        public bool IsUrgent { get; set; } = false;
        public bool IsSystemSetOncology { get; set; } = false;
        /// 
        /// 阅片平台
        /// 
        public int ImagePlatform { get; set; } = 1;
        /// 
        /// 修约小数点
        /// 
        public int? DigitPlaces { get; set; } = 2;
        /// 
        /// 系统标准ID
        /// 
        public Guid? ReadingQuestionCriterionSystemId { get; set; }
        /// 
        /// 阅片模式
        /// 
        public ReadingMethod ReadingType { get; set; }
        public string GlobalUpdateType { get; set; } = string.Empty;
        /// 
        /// 任务组织级别
        /// 
        public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; }
        /// 
        /// 影像是否有标注
        /// 
        public bool IsImageIabeled { get; set; }
        /// 
        /// IR阅片是否显示受试者信息
        /// 
        public bool IsReadingShowSubjectInfo { get; set; } = false;
        /// 
        /// IR阅片是否显示既往结果
        /// 
        public bool IsReadingShowPreviousResults { get; set; }
        //读片任务显示是否顺序
        public ReadingOrder IsReadingTaskViewInOrder { get; set; }
        public List GlobalAssessTypeIds { get; set; }
        /// 
        /// 全局阅片
        /// 
        public bool IsGlobalReading { get; set; }
        /// 
        /// 阅片工具
        /// 
        public ReadingTool? ReadingTool { get; set; } = IRaCIS.Core.Domain.Share.ReadingTool.Dicom;
        /// 
        /// 仲裁规则/对象
        /// 
        public ArbitrationRule ArbitrationRule { get; set; }
        /// 
        /// 阅片信息签名时间
        /// 
        public DateTime? ReadingInfoSignTime { get; set; }
        public bool IsSign
        {
            get
            {
                return this.ReadingInfoSignTime != null;
            }
        }
        /// 
        ///  eCRF报告是否显示在图像页面
        /// 
        public bool IseCRFShowInDicomReading { get; set; } = false;
        public bool IsClinicalReading { get; set; }
        /// 
        /// 仲裁阅片
        /// 
        public bool? IsArbitrationReading { get; set; }
        /// 
        /// 是否必须全局阅片
        /// 
        public bool IsMustGlobalReading { get; set; } = false;
        ///// 
        ///// 阅片模式
        ///// 
        //public ReadingMethod ReadingType { get; set; } 
        ///// 
        ///// 全局阅片
        ///// 
        //public bool IsGlobalReading { get; set; }
        /// 
        /// 肿瘤学阅片  原字段 IsClinicalReading
        /// 
        public bool IsOncologyReading { get; set; }
        //是否附加评估
        public bool IsAdditionalAssessment { get; set; }
        //自动  手动生成任务
        public bool IsAutoCreate { get; set; }
        public List TrialCriterionAdditionalAssessmentTypeList { get; set; } = new List();
        public string CriterionModalitys { get; set; }
        public ReadingImageDownload ImageDownloadEnum { get; set; }
        public ReadingImageUpload? ImageUploadEnum { get; set; }
        public Guid TrialReadingCriterionId { get; set; }
    }
    public class ReadingCriterionPageDto
    {
        /// 
        /// pageId
        /// 
        public Guid Id { get; set; }
        /// 
		/// 项目ID
		/// 
		public Guid TrialId { get; set; }
        /// 
        /// 分页名称
        /// 
        public string PageName { get; set; }
        /// 
        /// 是否启用
        /// 
        public bool IsEnable { get; set; }
        /// 
		/// 是否公共分页
		/// 
		public bool IsPublicPage { get; set; }
        public int ShowOrder { get; set; }
        /// 
        /// 创建时间
        /// 
        public DateTime CreateTime { get; set; }
        /// 
        /// 创建用户ID
        /// 
        public Guid CreateUserId { get; set; }
    }
    public class TrialReadQuestion : ReadingQuestionTrial
    {
        /// 
        /// 分页名称
        /// 
        public string PageName { get; set; }
        /// 
        /// 父问题名称
        /// 
        public string ParentQuestionName { get; set; }
        /// 
        /// Parent字典code
        /// 
        public string ParentDictionaryCode { get; set; } = string.Empty;
        /// 
		/// Parent问题类型
		/// 
		public TableQuestionType? ParentQuestionGenre { get; set; }
        public int? RelevanceShowOrder { get; set; }
        public int? ParentQuestionShowOrder { get; set; }
    }
    public class TrialAdditionaQuestion : TrialReadQuestion
    {
        public List Childrens { get; set; } = new List();
        public string Answer { get; set; } = string.Empty;
    }
    public class TrialJudgeQuestion
    {
        public Guid ReadingQuestionCriterionTrialId { get; set; }
        public Guid QuestionId { get; set; }
        /// 
		/// 问题名称
		/// 
		public string QuestionName { get; set; }
        public string PageName { get; set; }
        /// 
        /// 答案分组
        /// 
        public string AnswerGroup { get; set; } = string.Empty;
        /// 
        /// 答案组合
        /// 
        public string AnswerCombination { get; set; } = string.Empty;
        /// 
        /// 裁判类型
        /// 
        public JudgeTypeEnum JudgeType { get; set; }
    }
    public class TrialReadingCriterion
    {
        public Guid Id { get; set; }
        /// 
		/// 标准
		/// 
		public string CriterionName { get; set; }
    }
    public class GetTrialConfirmCriterionListInDto
    {
        public Guid TrialId { get; set; }
    }
    public class GetTrialConfirmCriterionOutDto
    {
        public Guid TrialCriterionId { get; set; }
        public string CriterionName { get; set; }
    }
    public class TrialReadingInfoSignInDto
    {
        [NotDefault]
        public Guid TrialReadingCriterionId { get; set; }
    }
    public class GetTrialReadingCriterionInfoOutDto
    {
        /// 
        /// 阅片信息签名时间
        /// 
        public DateTime? ReadingInfoSignTime { get; set; }
        public bool IsSign
        {
            get
            {
                return this.ReadingInfoSignTime != null;
            }
        }
        /// 
		/// 是否必须全局阅片
		/// 
		public bool IsMustGlobalReading { get; set; } = false;
        /// 
        /// 修约小数点
        /// 
        public int? DigitPlaces { get; set; }
        /// 
        ///  eCRF报告是否显示在图像页面
        /// 
        public bool IseCRFShowInDicomReading { get; set; } = false;
        public bool IsFromSystem { get; set; } = false;
        public FormType? FormType { get; set; }
        public bool IsSystemCriterion { get; set; }
        /// 
        /// 项目标准Id
        /// 
        public Guid? TrialCriterionId { get; set; }
        /// 
        /// 项目分页
        /// 
        public List ReadingCriterionPageList { get; set; }
        /// 
        /// 项目问题集合
        /// 
        public List TrialQuestionList { get; set; }
    }
    public class SetOncologySetInDto
    {
        /// 
        /// 项目标准ID
        /// 
        public Guid TrialReadingCriterionId { get; set; }
        public List OncologyAssessIds { get; set; }
        /// 
        /// 评估结果
        /// 
        public string EvaluationResult { get; set; } = string.Empty;
        /// 
        /// 评估原因
        /// 
        public string EvaluationReason { get; set; } = string.Empty;
        /// 
        /// 是否显示详情
        /// 
        public bool IsShowDetail { get; set; }
    }
    public class GetOncologySetOutDto
    {
        public bool IsSign { get; set; }
        public List OncologyAssessIds { get; set; }
        public bool IsSystemCriterion { get; set; }
        /// 
        /// 评估原因
        /// 
        public string EvaluationReason { get; set; } = string.Empty;
    }
    public class GetGlobalReadingOutDto
    {
        public List GlobalAssessTypes { get; set; }
        /// 
        /// 全局阅片
        /// 
        public bool IsGlobalReading { get; set; }
        public bool IsSystemCriterion { get; set; }
        public bool IsSign { get; set; }
    }
    public class AsyncTrialCriterionDictionaryInDto
    {
        [NotDefault]
        public Guid TrialReadingCriterionId { get; set; }
    }
    public class SetGlobalReadingInfoInDto
    {
        [NotDefault]
        public Guid TrialReadingCriterionId { get; set; }
        public List GlobalAssessList { get; set; }
        ///// 
        ///// 全局阅片
        ///// 
        //public bool IsGlobalReading { get; set; }
    }
    public class SetGlobalReading
    {
        /// 
        /// DictionaryId
        /// 
        public Guid DictionaryId { get; set; }
        /// 
        /// IsBaseLineUse
        /// 
        public bool IsBaseLineUse { get; set; }
        /// 
        /// IsBaseUse
        /// 
        public bool IsFollowVisitUse { get; set; }
    }
    public class GetOncologySetInDto
    {
        public Guid TrialReadingCriterionId { get; set; }
    }
    public class GetTrialReadingInfoInDto
    {
        [NotDefault]
        public Guid TrialId { get; set; }
        [NotDefault]
        public Guid TrialReadingCriterionId { get; set; }
    }
    public class SetTrialReadingCriterionInDto
    {
        public Guid TrialReadingCriterionId { get; set; }
        /// 
        /// 表单类型
        /// 
        public FormType FormType { get; set; }
        ///// 
        ///// 修约小数点
        ///// 
        //public int? DigitPlaces { get; set; }
        public bool IsSignSave { get; set; } = false;
    }
    public class AddOrUpdateTrialCriterionAdditional
    {
        public Guid Id { get; set; }
        public Guid TrialReadingCriterionId { get; set; }
        public CriterionType CriterionType { get; set; }
        public AdditionalAssessmentType AdditionalAssessmentType { get; set; }
        public bool? IsSelected { get; set; }
    }
    public class SetCriterionReadingInfoInDto
    {
        public bool IsImageFilter { get; set; }
        public string CriterionModalitys { get; set; }
        public ReadingImageDownload ImageDownloadEnum { get; set; }
        public ReadingImageUpload ImageUploadEnum { get; set; }
        //是否附加评估
        public bool IsAdditionalAssessment { get; set; }
        public CriterionType CriterionType { get; set; }
        //自动  手动生成任务
        public bool IsAutoCreate { get; set; } = true;
        /// 
        /// 项目标准ID
        /// 
        public Guid TrialReadingCriterionId { get; set; }
        /// 
        ///  eCRF报告是否显示在图像页面
        /// 
        public bool IseCRFShowInDicomReading { get; set; }
        /// 
        /// 是否有阅片期
        /// 
        public bool IsReadingPeriod { get; set; } = true;
        public string GlobalUpdateType { get; set; } = string.Empty;
        /// 
        /// 修约小数点
        /// 
        public int? DigitPlaces { get; set; } = 2;
        /// 
        /// 阅片工具
        /// 
        public ReadingTool? ReadingTool { get; set; }
        /// 
        /// 阅片平台
        /// 
        public ImagePlatform ImagePlatform { get; set; } = ImagePlatform.MINT;
        /// 
        /// 任务组织级别
        /// 
        public ReadingTaskViewMethod ReadingTaskViewEnum { get; set; }
        /// 
        /// 影像是否有标注
        /// 
        public bool IsImageIabeled { get; set; }
        //读片任务显示是否顺序
        public ReadingOrder IsReadingTaskViewInOrder { get; set; }
        /// 
        /// IR阅片是否显示受试者信息
        /// 
        public bool IsReadingShowSubjectInfo { get; set; } = false;
        /// 
        /// IR阅片是否显示既往结果
        /// 
        public bool IsReadingShowPreviousResults { get; set; }
        /// 
        /// 仲裁规则/对象
        /// 
        public ArbitrationRule ArbitrationRule { get; set; }
        /// 
		/// 阅片模式
		/// 
		public ReadingMethod ReadingType { get; set; } = ReadingMethod.Double;
        /// 
        /// 全局阅片
        /// 
        public bool IsGlobalReading { get; set; } = true;
        /// 
        /// 仲裁阅片
        /// 
        public bool IsArbitrationReading { get; set; } = true;
        /// 
        /// 肿瘤学阅片  原字段 IsClinicalReading
        /// 
        public bool IsOncologyReading { get; set; }
        /// 
        /// 是否加急
        /// 
        public bool IsUrgent { get; set; } = false;
        public List TrialCriterionAdditionalAssessmentTypeList { get; set; } = new List();
    }
    public class SignConfirmDTO
    {
        [NotDefault]
        public Guid TrialId { get; set; }
        //[NotDefault]
        //public Guid SignId { get; set; }
        [NotDefault]
        public string SignCode { get; set; } = string.Empty;
    }
    public class TrialSPMConfigCommand
    {
        public Guid Id { get; set; }   
        [Comment("SPM 参与中心调研")]
        public bool IsSPMJoinSiteSurvey { get; set; }
        [Comment("SPM 参与阅片人筛选")]
        public bool IsSPMJoinReviewerSelect { get; set; }
        [Comment("SPM 参与重阅审批")]
        public bool IsSPMJoinReReadingApproval { get; set; }
    }
    public class TrialConfigDTO : BasicTrialConfig
    {
        [Comment("阅片任务产生之前 采集影像")]
        public CollectImagesType CollectImagesEnum { get; set; }
        [Comment("SPM 参与中心调研")]
        public bool IsSPMJoinSiteSurvey { get; set; }
        [Comment("SPM 参与阅片人筛选")]
        public bool IsSPMJoinReviewerSelect { get; set; }
        [Comment("SPM 参与重阅审批")]
        public bool IsSPMJoinReReadingApproval { get; set; }
        public List TrialCriterionIds { get; set; } = new List();
        public List TrialCriterionNames { get; set; } = new List();
        public List ClinicalDataTrialSetIds { get; set; } = new List();
        public int ClinicalInformationTransmissionEnum { get; set; }
        public bool IsTrialProcessConfirmed { get; set; }
        public bool IsTrialUrgentConfirmed { get; set; }
        /// 
        /// QC流程  0 不审,1 单审,2双审  
        /// 
        public TrialQCProcess QCProcessEnum { get; set; }
        /// 
        /// 影像一致性核查
        /// 
        public bool IsImageConsistencyVerification { get; set; } = false;
        //阅片方式
        public int ReadingMode { get; set; }
        public bool IsSubjectExpeditedView { get; set; } = false;
        /// 
        /// 是否有 入组评估确认
        /// 
        public bool IsEnrollementQualificationConfirm { get; set; } = false;
        public bool IsUrgent { get; set; }
        public bool IsPDProgressView { get; set; }
        public bool IsQCQuestionConfirmed { get; set; }
        public string TrialStatusStr { get; set; } = string.Empty;
        public List ClinicalDataSetNames { get; set; } = new List();
        //public bool IsTrialStart { get; set; } = false;
        //public List CriterionIds { get; set; } = new List();
        //public bool IsGlobalReading { get; set; } = true;
        //public bool? IsArbitrationReading { get; set; }
        //public bool? IsClinicalReading { get; set; }
        //public ArbitrationRule ArbitrationRule { get; set; }
        //public int DigitPlaces { get; set; }
        ///// 
        ///// 1 Mint、2 PACS  
        ///// 
        //public int ImagePlatform { get; set; } = 1;
        ////阅片类型 
        //public int ReadingType { get; set; }
        //public string DocumentConfirmSignText { get; set; } = string.Empty;
        //public string ImageQCSignText { get; set; } = string.Empty;
        //public string PreliminaryAuditReuploadText { get; set; } = string.Empty;
        //public string ReviewAuditReuploadText { get; set; } = string.Empty;
        //public string CheckBackText { get; set; } = string.Empty;
        //public string CheckCloseText { get; set; } = string.Empty;
        //public string ChallengeTypes { get; set; } = string.Empty;
        //public bool IsImageExport { get; set; } = false;
        //public bool IsCRAAuditClinicalInformation { get; set; } = false;
        //public string TrialSiteSurveyUserRoles { get; set; } = string.Empty;
        //public string TrialSiteSurveyEquipmentType { get; set; } = string.Empty;
    }
    public class AddOrUpdateTrialBodyPartCommand
    {
        public string Code { get; set; }
        public string Name { get; set; }
        public string NameCN { get; set; }
        public Guid? Id { get; set; }
        [NotDefault]
        public Guid TrialId { get; set; }
        public bool IsHandAdd { get; set; } = true;
    }
    public class TrialBodyPartView
    {
        public string Code { get; set; }
        public string Name { get; set; }
        public Guid Id { get; set; }
        public bool IsHandAdd { get; set; }
    }
}