using HelperDB;
using System;
using System.Collections;
using System.Collections.Generic;
using System.Data;
using System.Xml.Serialization;
namespace DrawGraph
{
    [Serializable]
    public partial class OperationRecord : EventObj
    {
        //患者信息
        private string hISPatientId;
        private string inHospitalNo;
        private string medicalHistoryNo;
        private string visitTimes;
        private int? departmentId;
        private string name;
        private string sex;
        private DateTime? birthDay;
        private string height;
        private string weight;
        private string identity;
        private string bloodType;
        private string rHBloodType;
        private string fareType;
        private string endemicArea;
        private string bed;
        private string contacts;
        private string contactsPhone; 
        private string age;
        [ClassAttributs(Description = "HIS编号")]
        public string HISPatientId
        {
            get { return hISPatientId; }
            set { hISPatientId = value; }
        }
        [ClassAttributs(Description = "住院号")]
        public string InHospitalNo
        {
            get { return inHospitalNo; }
            set { inHospitalNo = value; }
        }
        [ClassAttributs(Description = "病历号")]
        public string MedicalHistoryNo
        {
            get { return medicalHistoryNo; }
            set { medicalHistoryNo = value; }
        }
        [ClassAttributs(Description = "住院次数")]
        public string VisitTimes
        {
            get { return visitTimes; }
            set { visitTimes  = value; }
        }
        [ClassAttributs(Description = "科室编号")]
        public int? DepartmentId
        {
            get { return departmentId; }
            set { departmentId = value; }
        }
        [ClassAttributs(Description = "患者姓名")]
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
        [ClassAttributs(Description = "性别")]
        public string Sex
        {
            get { return sex; }
            set { sex = value; }
        }
        [ClassAttributs(Description = "出生日期")]
        public DateTime? BirthDay
        {
            get { return birthDay; }
            set { birthDay = value; }
        }
        [ClassAttributs(Description = "年龄")]
        public string Age
        {
            get { return age; }
            set { age = value; }
        }
        [ClassAttributs(Description = "身高,单位cm")]
        public string Height
        {
            get { return height; }
            set { height = value; }
        }
        [ClassAttributs(Description = "体重,单位kg")]
        public string Weight
        {
            get { return weight; }
            set { weight = value; }
        }
        [ClassAttributs(Description = "身份证号码")]
        public string Identity
        {
            get { return identity; }
            set { identity = value; }
        }
        [ClassAttributs(Description = "血型")]
        public string BloodType
        {
            get { return bloodType; }
            set { bloodType = value; }
        }
        [ClassAttributs(Description = "RH血型")]
        public string RHBloodType
        {
            get { return rHBloodType; }
            set { rHBloodType = value; }
        }
        [ClassAttributs(Description = "医保类别")]
        public string FareType
        {
            get { return fareType; }
            set { fareType = value; }
        }
        [ClassAttributs(Description = "病区")]
        public string EndemicArea
        {
            get { return endemicArea; }
            set { endemicArea = value; }
        }
        [ClassAttributs(Description = "病区床位")]
        public string Bed
        {
            get { return bed; }
            set { bed = value; }
        }
        [ClassAttributs(Description = "联系人")]
        public string Contacts
        {
            get { return contacts; }
            set { contacts = value; }
        }
        [ClassAttributs(Description = "联系人电话")]
        public string ContactsPhone
        {
            get { return contactsPhone; }
            set { contactsPhone = value; }
        } 
        //申请信息
        private string patientType;
        private int? applyDepartmentId;
        private string applyDepartmentName;
        private string patientDepName;
        private string applyDepName;
        private string applydiagnose;
        private string applydiagnoseRemark;
        private string applyoperation;
        private string applyOperationRemark;
        private string operationType;
        public DateTime PlanOperationTime;
        private string operation;
        private string diagnose;
        private string operationDoctor;
        private string assistant1;
        private string assistant2;
        private string assistant3;
        private string anaesthesiaMethodId;
        private string anesthesiaDoctor;
        private string instrumentNurse;
        private string tourNurse;
        private string ortherDoctorId;
        private string operationSiteId;
        private string operationPositionId;
        [ClassAttributs(Description = "住院门诊类型")]
        public string PatientType
        {
            get { return patientType; }
            set { patientType = value; }
        }
        [NoCreatControlAttributs]
        public int? ApplyDepartmentId
        {
            get { return applyDepartmentId; }
            set { applyDepartmentId = value; }
        }
        [ClassAttributs(Description = "患者科室")]
        public string PatientDepName
        {
            get { return patientDepName; }
            set { patientDepName = value; }
        }
        [ClassAttributs(Description = "申请科室+床号")]
        public string ApplyDepartmentName
        {
            get { return applyDepartmentName; }
            set { applyDepartmentName = value; }
        }
        [ClassAttributs(Description = "申请科室2")]
        public string ApplyDepName
        {
            get { return applyDepName; }
            set { applyDepName = value; }
        }
        [ClassAttributs(Description = "术前诊断")]
        public string Applydiagnose
        {
            get { return applydiagnose; }
            set { applydiagnose = value; }
        }
        [ClassAttributs(Description = "术前诊断备注")]
        public string ApplydiagnoseRemark
        {
            get { return applydiagnoseRemark; }
            set { applydiagnoseRemark = value; }
        }
        [ClassAttributs(Description = "术前手术")]
        public string Applyoperation
        {
            get { return applyoperation; }
            set { applyoperation = value; }
        }
        [ClassAttributs(Description = "术前手术备注")]
        public string ApplyOperationRemark
        {
            get { return applyOperationRemark; }
            set { applyOperationRemark = value; }
        }
        [ClassAttributs(Description = "择期急诊")]
        public string OperationType
        {
            get { return operationType; }
            set { operationType = value; }
        }
        [ClassAttributs(Description = "手术名称")]
        /// 
        /// 手术名称,保存手术Id,可多选,逗号分隔
        /// 
        public string Operation
        {
            get { return operation; }
            set { operation = value; }
        }
        [ClassAttributs(Description = "诊断名称")]
        /// 
        /// 诊断名称,保存诊断Id,可多选,逗号分隔
        /// 
        public string Diagnose
        {
            get { return diagnose; }
            set { diagnose = value; }
        }
        [ClassAttributs(Description = "手术医生")]
        /// 
        /// 手术医生,保存手术医生Id,可多选,逗号分隔
        /// 
        public string OperationDoctor
        {
            get { return operationDoctor; }
            set { operationDoctor = value; }
        }
        [ClassAttributs(Description = "助理1")]
        /// 
        /// 助理1,保存手术助理医生Id,可多选,逗号分隔
        /// 
        public string Assistant1
        {
            get { return assistant1; }
            set { assistant1 = value; }
        }
        [ClassAttributs(Description = "助理2")]
        /// 
        /// 助理2,保存手术助理医生Id,可多选,逗号分隔
        /// 
        public string Assistant2
        {
            get { return assistant2; }
            set { assistant2 = value; }
        }
        [ClassAttributs(Description = "助理3")]
        /// 
        /// 助理3,保存手术助理医生Id,可多选,逗号分隔
        /// 
        public string Assistant3
        {
            get { return assistant3; }
            set { assistant3 = value; }
        }
        [ClassAttributs(Description = "麻醉方式")]
        /// 
        /// 麻醉方式,保存麻醉Id,可多选,逗号分隔
        /// 
        public string AnaesthesiaMethodId
        {
            get { return anaesthesiaMethodId; }
            set { anaesthesiaMethodId = value; }
        }
        [ClassAttributs(Description = "麻醉医生")]
        /// 
        /// 麻醉医生,保存麻醉医生Id,可多选,逗号分隔
        /// 
        public string AnesthesiaDoctor
        {
            get { return anesthesiaDoctor; }
            set { anesthesiaDoctor = value; }
        }
        [ClassAttributs(Description = "器械护士")]
        /// 
        /// 器械护士,保存器械护士Id,可多选,逗号分隔
        /// 
        public string InstrumentNurse
        {
            get { return instrumentNurse; }
            set { instrumentNurse = value; }
        }
        [ClassAttributs(Description = "巡回护士")]
        /// 
        /// 巡回护士,保存巡回护士Id,可多选,逗号分隔
        /// 
        public string TourNurse
        {
            get { return tourNurse; }
            set { tourNurse = value; }
        }
        [ClassAttributs(Description = "其他医生")]
        /// 
        /// 其他医生 
        /// 
        public string OrtherDoctorId
        {
            get { return ortherDoctorId; }
            set { ortherDoctorId = value; }
        }
        [ClassAttributs(Description = "手术体位")]
        /// 
        /// 手术体位,保存手术体位Id,可多选,逗号分隔
        /// 
        public string OperationSiteId
        {
            get { return operationSiteId; }
            set { operationSiteId = value; }
        }
        [ClassAttributs(Description = "手术部位")]
        /// 
        /// 手术部位
        /// 
        public string OperationPositionId
        {
            get { return operationPositionId; }
            set { operationPositionId = value; }
        }
        //术中信息 
        private int? id;
        private int? patientId;
        private int? operationApplyId;
        private DateTime? inRoomTime;
        private DateTime? outRoomTime;
        private DateTime? operationBeginTime;
        private DateTime? operationEndTime;
        private DateTime? anesthesiaBeginTime;
        private DateTime? anesthesiaEndTime;
        private int? aSALevel;
        private string specialCase;
        private string fasting;
        private string operationDate;
        private string opeSpecialCondition;
        private string bMI;
        private string beforeDrugs;
        private string anaesthesiaMethodName;
        private string anaesthesiaTechnology;
        private string anaesthesiaComplication;
        private string specialEvent;
        private string suddenSituation;
        private string conditionChage;
        private string rescueMeasures;
        private string rescueTime;
        private string rescuePerson;
        private string rescueTechnology;
        private DateTime? spileInTime;
        private DateTime? spileOutTime;
        private string spileSituation;
        private string spileWard;
        private string spileBeforCondition;
        private string spileAffterCondition;
        private string refluxFlag;
        private string muscleStrengthRecovery;
        private string coughReflex;
        private string inOperaRoomState;
        private string bloodPressure;
        private string tempeture;
        private string pulse;
        private string breath;
        private string isolationIndicator;
        private string anesMachine;
        private string controlledAnalgesia;
        private string analgesiaModel;
        private string analgesiaRate;
        private string analgesiaDrug;
        private string aldreteScore;
        private string routeMonitoring;
        private string entourage;
        private string remark1;
        private string remark2;
        private string remark3;
        private string crystal;
        private string colloid;
        private string inAmount;
        private string outAmount;
        private string operationTimeSpan;
        private string anaesthesiaTimeSpan;
        private string roomTimeSpan;
        private string anesthesiaDoctorTimeMinute;
        private string anesthesiaDoctorSucceedTimeMinute;
        private string instrumentNurseTimeMinute;
        private string instrumentNurseSucceedTimeMinute;
        private string tourNurseTimeMinute;
        private string tourNurseSucceedTimeMinute;
        private string recordPageCount;
        private string signName;
        private string signTime;
        private int? roomId;
        private int? state;
        private int? recoverId;
        private string operatorNo;
        private string operatorName;
        private DateTime? operateDate;
        private string remarks;
        private string spareOne;
        private string spareTwo;
        private string spareThree;
        private string spareFour;
        private string spareFive;
        private string spareSix;
        private string spareSeven;
        private string spareEight;
        private string spareNine;
        private string spareTen;
        [NoCreatControlAttributs]
        public int? Id
        {
            get { return id; }
            set { id = value; }
        }
        [NoCreatControlAttributs]
        public int? PatientId
        {
            get { return patientId; }
            set { patientId = value; }
        }
        [NoCreatControlAttributs]
        public int? OperationApplyId
        {
            get { return operationApplyId; }
            set { operationApplyId = value; }
        } 
        /// 
        /// 入手术室时间
        /// 
        [ClassAttributs(Description = "入手术室时间")]
        public DateTime? InRoomTime
        {
            get { return inRoomTime; }
            set { inRoomTime = value; }
        }
        /// 
        /// 出手术室时间
        ///  
        [ClassAttributs(Description = "出手术室时间")]
        public DateTime? OutRoomTime
        {
            get { return outRoomTime; }
            set { outRoomTime = value; }
        }
        /// 
        /// 手术开始时间
        /// 
        [ClassAttributs(Description = "手术开始时间")]
        public DateTime? OperationBeginTime
        {
            get { return operationBeginTime; }
            set { operationBeginTime = value; }
        }
        /// 
        /// 手术结束时间
        /// 
        [ClassAttributs(Description = "手术结束时间")]
        public DateTime? OperationEndTime
        {
            get { return operationEndTime; }
            set { operationEndTime = value; }
        }
        /// 
        /// 麻醉开始时间
        /// 
        [ClassAttributs(Description = "麻醉开始时间")]
        public DateTime? AnesthesiaBeginTime
        {
            get { return anesthesiaBeginTime; }
            set { anesthesiaBeginTime = value; }
        }
        /// 
        /// 麻醉结束时间
        /// 
        [ClassAttributs(Description = "麻醉结束时间")]
        public DateTime? AnesthesiaEndTime
        {
            get { return anesthesiaEndTime; }
            set { anesthesiaEndTime = value; }
        }
        /// 
        /// ASA分级
        ///      
        [ClassAttributs(Description = "ASA分级")]
        public int? ASALevel
        {
            get { return aSALevel; }
            set { aSALevel = value; }
        }
        /// 
        /// 特殊情况
        ///       
        [ClassAttributs(Description = "特殊情况")]
        public string SpecialCase
        {
            get { return specialCase; }
            set { specialCase = value; }
        }
        /// 
        /// 是否禁食
        ///      
        [ClassAttributs(Description = "是否禁食")]
        public string Fasting
        {
            get { return fasting; }
            set { fasting = value; }
        }
        /// 
        /// 手术日期
        ///        
        [ClassAttributs(Description = "手术日期")]
        public string OperationDate
        {
            get { return operationDate; }
            set { operationDate = value; }
        }
        /// 
        /// 术中特殊情况
        ///     
        [ClassAttributs(Description = "术中特殊情况")]
        public string OpeSpecialCondition
        {
            get { return opeSpecialCondition; }
            set { opeSpecialCondition = value; }
        }
        /// 
        /// BMI指数
        ///      
        [ClassAttributs(Description = "BMI指数")]
        public string BMI
        {
            get { return bMI; }
            set { bMI = value; }
        }
        /// 
        /// 麻醉前用药
        ///      
        [ClassAttributs(Description = "麻醉前用药")]
        public string BeforeDrugs
        {
            get { return beforeDrugs; }
            set { beforeDrugs = value; }
        }
        /// 
        /// 麻醉方法
        ///    
        [ClassAttributs(Description = "麻醉方法")]
        public string AnaesthesiaMethodName
        {
            get { return anaesthesiaMethodName; }
            set { anaesthesiaMethodName = value; }
        }
        /// 
        /// 麻醉技术
        ///      
        [ClassAttributs(Description = "麻醉技术")]
        public string AnaesthesiaTechnology
        {
            get { return anaesthesiaTechnology; }
            set { anaesthesiaTechnology = value; }
        }
        /// 
        /// 麻醉期间并发症
        ///         
        [ClassAttributs(Description = "麻醉期间并发症")]
        public string AnaesthesiaComplication
        {
            get { return anaesthesiaComplication; }
            set { anaesthesiaComplication = value; }
        }
        /// 
        /// 特殊事件
        ///        
        [ClassAttributs(Description = "特殊事件")]
        public string SpecialEvent
        {
            get { return specialEvent; }
            set { specialEvent = value; }
        }
        /// 
        /// 突发情况
        ///        
        [ClassAttributs(Description = "突发情况")]
        public string SuddenSituation
        {
            get { return suddenSituation; }
            set { suddenSituation = value; }
        }
        /// 
        /// 病情变化情况
        ///        
        [ClassAttributs(Description = "病情变化情况")]
        public string ConditionChage
        {
            get { return conditionChage; }
            set { conditionChage = value; }
        }
        /// 
        /// 抢救措施
        ///    
        [ClassAttributs(Description = "抢救措施")]
        public string RescueMeasures
        {
            get { return rescueMeasures; }
            set { rescueMeasures = value; }
        }
        /// 
        /// 抢救时间
        ///      
        [ClassAttributs(Description = "抢救时间")]
        public string RescueTime
        {
            get { return rescueTime; }
            set { rescueTime = value; }
        }
        /// 
        /// 抢救的医务人员姓名
        ///         
        [ClassAttributs(Description = "抢救的医务人员姓名")]
        public string RescuePerson
        {
            get { return rescuePerson; }
            set { rescuePerson = value; }
        }
        /// 
        /// 抢救的医务人员专业技术职称
        ///    
        [ClassAttributs(Description = "抢救的医务人员专业技术职称")]
        public string RescueTechnology
        {
            get { return rescueTechnology; }
            set { rescueTechnology = value; }
        }
        /// 
        /// 气管导管插入时间
        ///     
        [ClassAttributs(Description = "气管导管插入时间")]
        public DateTime? SpileInTime
        {
            get { return spileInTime; }
            set { spileInTime = value; }
        }
        /// 
        /// 气管导管拔除时间
        ///    
        [ClassAttributs(Description = "气管导管拔除时间")]
        public DateTime?  SpileOutTime
        {
            get { return spileOutTime; }
            set { spileOutTime = value; }
        }
        /// 
        /// 气管导管插入情况
        ///   
        [ClassAttributs(Description = "气管导管插入情况")]
        public string SpileSituation
        {
            get { return spileSituation; }
            set { spileSituation = value; }
        }
        /// 
        /// 气管导管拔除地点
        ///   
        [ClassAttributs(Description = "气管导管拔除地点")]
        public string SpileWard
        {
            get { return spileWard; }
            set { spileWard = value; }
        }
        /// 
        /// 拔管前操作
        ///   
        [ClassAttributs(Description = "拔管前操作")]
        public string SpileBeforCondition
        {
            get { return spileBeforCondition; }
            set { spileBeforCondition = value; }
        }
        /// 
        /// 拔管后操作
        ///        
        [ClassAttributs(Description = "拔管后操作")]
        public string SpileAffterCondition
        {
            get { return spileAffterCondition; }
            set { spileAffterCondition = value; }
        }
        /// 
        /// 返流标志
        ///  
        [ClassAttributs(Description = "返流标志")]
        public string RefluxFlag
        {
            get { return refluxFlag; }
            set { refluxFlag = value; }
        }
        /// 
        /// 肌力恢复
        ///  
        [ClassAttributs(Description = "肌力恢复")]
        public string MuscleStrengthRecovery
        {
            get { return muscleStrengthRecovery; }
            set { muscleStrengthRecovery = value; }
        }
        /// 
        /// 咳嗽吞咽反射
        ///     
        [ClassAttributs(Description = "咳嗽吞咽反射")]
        public string CoughReflex
        {
            get { return coughReflex; }
            set { coughReflex = value; }
        }
        /// 
        /// 意识
        ///       
        [ClassAttributs(Description = "意识")]
        public string InOperaRoomState
        {
            get { return inOperaRoomState; }
            set { inOperaRoomState = value; }
        }
        /// 
        /// 血压
        ///   
        [ClassAttributs(Description = "血压")]
        public string BloodPressure
        {
            get { return bloodPressure; }
            set { bloodPressure = value; }
        }
        /// 
        /// 体温
        ///         
        [ClassAttributs(Description = "体温")]
        public string Tempeture
        {
            get { return tempeture; }
            set { tempeture = value; }
        }
        /// 
        /// 脉搏
        ///         
        [ClassAttributs(Description = "脉搏")]
        public string Pulse
        {
            get { return pulse; }
            set { pulse = value; }
        }
        /// 
        /// 呼吸
        ///       
        [ClassAttributs(Description = "呼吸")]
        public string Breath
        {
            get { return breath; }
            set { breath = value; }
        }
        /// 
        /// 隔离标识
        ///        
        [ClassAttributs(Description = "隔离标识")]
        public string IsolationIndicator
        {
            get { return isolationIndicator; }
            set { isolationIndicator = value; }
        }
        /// 
        /// 麻醉机型
        ///      
        [ClassAttributs(Description = "麻醉机型")]
        public string AnesMachine
        {
            get { return anesMachine; }
            set { anesMachine = value; }
        }
        /// 
        /// 自控镇痛
        ///    
        [ClassAttributs(Description = "自控镇痛")]
        public string ControlledAnalgesia
        {
            get { return controlledAnalgesia; }
            set { controlledAnalgesia = value; }
        }
        /// 
        /// 镇痛模式
        ///      
        [ClassAttributs(Description = "镇痛模式")]
        public string AnalgesiaModel
        {
            get { return analgesiaModel; }
            set { analgesiaModel = value; }
        }
        /// 
        /// 镇痛泵频次
        ///      
        [ClassAttributs(Description = "镇痛泵频次")]
        public string AnalgesiaRate
        {
            get { return analgesiaRate; }
            set { analgesiaRate = value; }
        }
        /// 
        /// 泵入药物
        ///      
        [ClassAttributs(Description = "泵入药物")]
        public string AnalgesiaDrug
        {
            get { return analgesiaDrug; }
            set { analgesiaDrug = value; }
        }
        /// 
        ///  Aldrete恢复评分
        ///        
        [ClassAttributs(Description = "Aldrete恢复评分")]
        public string AldreteScore
        {
            get { return aldreteScore; }
            set { aldreteScore = value; }
        }
        /// 
        /// 运送途中患者监测
        ///  
        [ClassAttributs(Description = "运送途中患者监测")]
        public string RouteMonitoring
        {
            get { return routeMonitoring; }
            set { routeMonitoring = value; }
        }
        /// 
        /// 陪同人员
        ///     
        [ClassAttributs(Description = "陪同人员")]
        public string Entourage
        {
            get { return entourage; }
            set { entourage = value; }
        }
        /// 
        /// 备注1
        ///       
        [ClassAttributs(Description = "备注1")]
        public string Remark1
        {
            get { return remark1; }
            set { remark1 = value; }
        }
        /// 
        /// 备注2
        ///     
        [ClassAttributs(Description = "备注2")]
        public string Remark2
        {
            get { return remark2; }
            set { remark2 = value; }
        }
        /// 
        /// 备注3
        ///     
        [ClassAttributs(Description = "备注3")]
        public string Remark3
        {
            get { return remark3; }
            set { remark3 = value; }
        }
        /// 
        /// 晶体量
        ///     
        [ClassAttributs(Description = "晶体量")]
        public string Crystal
        {
            get { return crystal; }
            set { crystal = value; }
        }
        /// 
        /// 胶体量
        ///     
        [ClassAttributs(Description = "胶体量")]
        public string Colloid
        {
            get { return colloid; }
            set { colloid = value; }
        }
        /// 
        /// 总入量
        ///     
        [ClassAttributs(Description = "总入量")]
        public string InAmount
        {
            get { return inAmount; }
            set { inAmount = value; }
        }
        /// 
        /// 总出量
        ///     
        [ClassAttributs(Description = "总出量")]
        public string OutAmount
        {
            get { return outAmount; }
            set { outAmount = value; }
        }
        /// 
        /// 手术时长分
        ///   
        [ClassAttributs(Description = "手术时长分")]
        public string OperationTimeSpan
        {
            get { return operationTimeSpan; }
            set { operationTimeSpan = value; }
        }
        /// 
        /// 麻醉时长分
        ///      
        [ClassAttributs(Description = "麻醉时长分")]
        public string AnaesthesiaTimeSpan
        {
            get { return anaesthesiaTimeSpan; }
            set { anaesthesiaTimeSpan = value; }
        }
        /// 
        /// 入出室时长分
        ///       
        [ClassAttributs(Description = "入出室时长分")]
        public string RoomTimeSpan
        {
            get { return roomTimeSpan; }
            set { roomTimeSpan = value; }
        }
        [NoCreatControlAttributs]
        public string AnesthesiaDoctorTimeMinute
        {
            get { return anesthesiaDoctorTimeMinute; }
            set { anesthesiaDoctorTimeMinute = value; }
        }
        [NoCreatControlAttributs]
        public string AnesthesiaDoctorSucceedTimeMinute
        {
            get { return anesthesiaDoctorSucceedTimeMinute; }
            set { anesthesiaDoctorSucceedTimeMinute = value; }
        }
        [NoCreatControlAttributs]
        public string InstrumentNurseTimeMinute
        {
            get { return instrumentNurseTimeMinute; }
            set { instrumentNurseTimeMinute = value; }
        }
        [NoCreatControlAttributs]
        public string InstrumentNurseSucceedTimeMinute
        {
            get { return instrumentNurseSucceedTimeMinute; }
            set { instrumentNurseSucceedTimeMinute = value; }
        }
        [NoCreatControlAttributs]
        public string TourNurseTimeMinute
        {
            get { return tourNurseTimeMinute; }
            set { tourNurseTimeMinute = value; }
        }
        [NoCreatControlAttributs]
        public string TourNurseSucceedTimeMinute
        {
            get { return tourNurseSucceedTimeMinute; }
            set { tourNurseSucceedTimeMinute = value; }
        }
        [NoCreatControlAttributs]
        public string RecordPageCount
        {
            get { return recordPageCount; }
            set { recordPageCount = value; }
        }
        /// 
        /// 签名人
        ///    
        [ClassAttributs(Description = "签名人")]
        public string SignName
        {
            get { return signName; }
            set { signName = value; }
        }
        /// 
        /// 签名时间
        ///    
        [ClassAttributs(Description = "签名时间")]
        public string SignTime
        {
            get { return signTime; }
            set { signTime = value; }
        }
        [NoCreatControlAttributs]
        public int? RoomId
        {
            get { return roomId; }
            set { roomId = value; }
        }
        /// 
        /// 1手术中
        /// 2.手术结束
        ///  
        [NoCreatControlAttributs]
        public int? State
        {
            get { return state; }
            set { state = value; }
        }
        [NoCreatControlAttributs]
        public int? RecoverId
        {
            get { return recoverId; }
            set { recoverId = value; }
        }
        /// 
        /// 操作人工号
        ///  
        [NoCreatControlAttributs] 
        public string OperatorNo
        {
            get { return operatorNo; }
            set { operatorNo = value; }
        }
        /// 
        /// 操作人姓名
        ///      
        [NoCreatControlAttributs] 
        public string OperatorName
        {
            get { return operatorName; }
            set { operatorName = value; }
        }
        /// 
        /// 操作时间
        ///     
        [NoCreatControlAttributs] 
        public DateTime? OperateDate
        {
            get { return operateDate; }
            set { operateDate = value; }
        }
        /// 
        /// 备注S
        ///          
        public string Remarks
        {
            get { return remarks; }
            set { remarks = value; }
        }
        [ClassAttributs(Description = "备用字段1")]
        public string SpareOne
        {
            get { return spareOne; }
            set { spareOne = value; }
        }
        [ClassAttributs(Description = "备用字段2")]
        public string SpareTwo
        {
            get { return spareTwo; }
            set { spareTwo = value; }
        }
        [ClassAttributs(Description = "备用字段3")]
        public string SpareThree
        {
            get { return spareThree; }
            set { spareThree = value; }
        }
        [ClassAttributs(Description = "备用字段4")]
        public string SpareFour
        {
            get { return spareFour; }
            set { spareFour = value; }
        }
        [ClassAttributs(Description = "备用字段5")]
        public string SpareFive
        {
            get { return spareFive; }
            set { spareFive = value; }
        }
        [ClassAttributs(Description = "备用字段6")]
        public string SpareSix
        {
            get { return spareSix; }
            set { spareSix = value; }
        }
        [ClassAttributs(Description = "备用字段7")]
        public string SpareSeven
        {
            get { return spareSeven; }
            set { spareSeven = value; }
        }
        [ClassAttributs(Description = "备用字段8")]
        public string SpareEight
        {
            get { return spareEight; }
            set { spareEight = value; }
        }
        [ClassAttributs(Description = "备用字段9")]
        public string SpareNine
        {
            get { return spareNine; }
            set { spareNine = value; }
        }
        [ClassAttributs(Description = "备用字段10")]
        public string SpareTen
        {
            get { return spareTen; }
            set { spareTen = value; }
        }
        private List factEventsList;
        private List factDrugList;
        private List factOutputLiquidsList;
        private List factBloodGasAnalysisList;
        private List anaseDataQualityRecordList;
        private OperationRecordInfo opeRecordInfo;
        private OperationRecoverInInfo opeRecoverInInfo;
        private OperationRecoverOutInfo opeRecoverOutInfo;
        private OperationRecordInstrumentList instrumentList;
        public List EventListstr = new List();
        public List DrugsListstr = new List();
        public List SapsListstr = new List();
        public List AfterDrugsListstr = new List();
        public List FluidListstr = new List();
        public List PunctureAndIntubatio;
        public List addPhysioList;
        [ClassAttributs(Description = "总页数")]
        public int currentPage { get; set; }
        [ClassAttributs(Description = "当前页数")]
        public int pageCount { get; set; }
        [ClassAttributs(Description = "手术间")]
        public string OperationRoom { get; set; }
        [ClassAttributs(Description = "是否只读")]
        public bool IsReadOnly = false;
        [ClassAttributs(Description = "绘图开始时间")]
        public DateTime sharpBegin;
        [ClassAttributs(Description = "页开始时间")]
        public DateTime pageBegin;
        [ClassAttributs(Description = "页结束时间")]
        public DateTime lastPageBegin; 
        [NoCreatControlAttributs]
        public string InCGType;
        [NoCreatControlAttributs]
        public string MedicalRecord;
        [NoCreatControlAttributs]
        public string StateName;
        [NoCreatControlAttributs]
        public DataTable PhysioParamList;
        [ClassAttributs(Description = "选中范围的对象")]
        [NoCreatControlAttributs]
        public SelectedAreaObj SAreaObj
        {
            get { return SelectedAreaObj.GetInstance(); }
        }
        [NoCreatControlAttributs]
        public List FactEventsList
        {
            get
            {
                return factEventsList;
            }
            set
            {
                factEventsList = value;
            }
        }
        [NoCreatControlAttributs]
        public List FactDrugList
        {
            get
            {
                return factDrugList;
            }
            set
            {
                factDrugList = value;
            }
        }
        [NoCreatControlAttributs]
        public List FactOutputLiquidsList
        {
            get
            {
                return factOutputLiquidsList;
            }
            set
            {
                factOutputLiquidsList = value;
            }
        }
        [NoCreatControlAttributs]
        public List FactBloodGasAnalysisList
        {
            get
            {
                return factBloodGasAnalysisList;
            }
            set
            {
                factBloodGasAnalysisList = value;
            }
        }
        [NoCreatControlAttributs]
        public List AnaseDataQualityRecordList
        {
            get
            {
                return anaseDataQualityRecordList;
            }
            set
            {
                anaseDataQualityRecordList = value;
            }
        }
        [ClassAttributs(Description = "麻醉信息类")]
        public OperationRecordInfo OpeRecordInfo
        {
            get
            {
                return opeRecordInfo;
            }
            set
            {
                opeRecordInfo = value;
            }
        }
        [ClassAttributs(Description = "入恢复信息类")]
        public OperationRecoverInInfo OpeRecoverInInfo
        {
            get
            {
                return opeRecoverInInfo;
            }
            set
            {
                opeRecoverInInfo = value;
            }
        }
        [ClassAttributs(Description = "出恢复信息类")]
        public OperationRecoverOutInfo OpeRecoverOutInfo
        {
            get
            {
                return opeRecoverOutInfo;
            }
            set
            {
                opeRecoverOutInfo = value;
            }
        }
        [ClassAttributs(Description = "器械清点单类")]
        public OperationRecordInstrumentList InstrumentList
        {
            get
            {
                return instrumentList;
            }
            set
            {
                instrumentList = value;
            }
        }
        public OperationRecord()
        {
            iniAddList();
            SetDefaultValue();
        }
        /// 
        /// 初始化各种对象列表
        /// 
        public void iniAddList()
        {
            PhysioParamList = AddOtherPhysioParamList();
            FactEventsList = new List();
            FactDrugList = new List();
            FactOutputLiquidsList = new List();
            AnaseDataQualityRecordList = new List();
            addPhysioList = new List();
            OpeRecordInfo = new OperationRecordInfo();
            OpeRecoverInInfo = new OperationRecoverInInfo();
            OpeRecoverOutInfo = new OperationRecoverOutInfo();
            InstrumentList = new OperationRecordInstrumentList();
            FactBloodGasAnalysisList = new List(); 
        }
        private void SetDefaultValue()
        {
            EventListstr = new List();
            DrugsListstr = new List();
            SapsListstr = new List();
            FluidListstr = new List();
            PunctureAndIntubatio = new List();
            BeforeDrugs = "";
            AnalgesiaDrug = "";
        }
        /// 
        /// 清除各种对象数据
        /// 
        /// 
        public void ClearEventstr(ZedGraphControl zgc)
        {
            if (zgcAnas == null || zgcAnas != zgc) zgcAnas = zgc;
            for (int i = 0; i <= 67; i++)
            {
                delAddObj("RemarkRow" + i);
                delAddObj("PunctureAndIntubatio" + i);
            }
            delAddObj("allOutputLiquidsDose");
            delAddObj("allOutputLiquidsDoseDate");
            delAddObj("allSapDose");
            delAddObj("allSapDosedate");
        }
        public void ClearDrugsDose(ZedGraphControl zgc)
        {
            if (zgcAnas == null || zgcAnas != zgc) zgcAnas = zgc;
            delAddObj("allDrugDose");
            delAddObj("allOutDose");
            delAddObj("allqtDrugDose");
            for (int i = 1; i <= 19; i++)
            {
                delAddObj("Out" + i);
            }
        }
        public DataTable AddOtherPhysioParamList()
        {
            string strSql = "SELECT pc.Id, pc.Name, pc.Color, pc.imgPath, pc.HighLimit, pc.LowLimit,pc.IsValid" +
                            " FROM PhysioDataConfig pc WHERE pc.NAME IN ('入室','麻醉开始','手术开始','手术结束','麻醉完成','出室','插管','拔管')";
            DataTable dt = HelperDB.DbHelperSQL.GetDataTable(strSql);
            return dt;
        }
        public static DateTime getOpeMaxTime(OperationRecord myOpeRecord)
        {
            try
            {
                DateTime dts = lastMaxOperationDate(myOpeRecord.patientId.Value);
                DateTime nowDate = DateTime.Now;
                TimeSpan tsp = nowDate - dts;
                if (tsp.TotalHours <= 12 && tsp.TotalDays <= 1 && dts < nowDate)//&& IsReview == false 
                {
                    dts = nowDate;
                }
                if (dts.ToString("yyyy-MM-dd HH:mm") == myOpeRecord.pageBegin.AddMinutes(240).ToString("yyyy-MM-dd HH:mm"))
                {
                    dts = myOpeRecord.pageBegin.AddMinutes(240);
                }
                if (myOpeRecord.OutRoomTime != null)
                {
                    DateTime outRoomTime = DateTime.Parse(myOpeRecord.OutRoomTime.ToString());
                    if (DateTime.Compare(dts, outRoomTime) > 0)
                    {
                        dts = outRoomTime;
                    }
                }
                return dts;
            }
            catch (Exception)
            {
                return DateTime.Now;
            }
        }
        /// 
        /// 得到手术的最大时间点
        /// 
        /// 
        /// 
        public static DateTime lastMaxOperationDate(int PatientId)
        {
            string sqlStr = "select top 1 * from (SELECT s.PatientId , s.EventEndTime etime FROM FactEvents s WHERE s.PatientId = " + PatientId + " union all SELECT s.PatientId , s.DrugEndTime FROM[dbo].[FactDrug]  s WHERE s.PatientId = " + PatientId + " ) a order by a.etime desc";
            DataTable dt = DBHelper.GetDataTable(sqlStr);
            return DateTime.Parse(dt.Rows[0][1].ToString());
        }
    }
}