using System;
using System.Collections;
using System.Runtime.Serialization;
using System.ComponentModel;
using System.Collections.Generic;

namespace RDH.Data.Models
{
	[Serializable]
	[DataContract]
    public partial class PatientOperationInfo : BaseSnapshotModel// IModel , INotifyPropertyChanged
    {
        private Guid _snapshotkey;
        private Guid? _key;
        private DateTime _starttime;
        private DateTime? _endtime;
        private Guid? _createby;
        private Guid? _patientkey;
        private string _bednumber;
        private string _encounterid;
        private string _operationid;
        private string _operationname;
        private DateTime? _operationbegintime;
        private DateTime? _operationovertime;
        private string _description;
        private string _anesscheme;
        private string _patientname;
        private bool? _istempsurgery;
        private Decimal? _age;
        private bool? _gender;
        private string _remark;
        private string _operationtype;
        private Guid? _operationroomkey;
        private bool? _flag;
        private DateTime? _clienttime;
        private DateTime? _servertime;
        private string _ext01;
        private string _ext02;
        private string _ext03;
        private string _ext04;
        private string _ext05;
        private string _ext06;
        private string _ext07;
        private string _ext08;
        private string _ext09;
        private string _ext10;
        private Guid? _surgeonkey;
        private Guid? _analgesistkey;
        private bool? _hascanceled;
        private string _operationroomid;
        private string _analgesistid;
        private OperationRoom _operationroom;
        private PatientInfo _patientinfo;

		#region Public Properties

        [DataMember]
        public virtual Guid SnapshotKey
        {
            get { return _snapshotkey; }
            set 
            {
                _snapshotkey = value;
                OnPropertyChanged("SnapshotKey");
            }
        }
        [DataMember]
        public virtual Guid? Key
        {
            get { return _key; }
            set 
            {
                _key = value;
                OnPropertyChanged("Key");
            }
        }
        [DataMember]
        public virtual DateTime StartTime
        {
            get { return _starttime; }
            set 
            {
                _starttime = value;
                OnPropertyChanged("StartTime");
            }
        }
        [DataMember]
        public virtual DateTime? EndTime
        {
            get { return _endtime; }
            set 
            {
                _endtime = value;
                OnPropertyChanged("EndTime");
                EndFlag = value == null ? 0 : 1;
            }
        }
        [DataMember]
        public virtual Guid? CreateBy
        {
            get { return _createby; }
            set 
            {
                _createby = value;
                OnPropertyChanged("CreateBy");
            }
        }
        [DataMember]
        public virtual Guid? PatientKey
        {
            get { return _patientkey; }
            set 
            {
                _patientkey = value;
                OnPropertyChanged("PatientKey");
            }
        }
        [DataMember]
        public virtual string BedNumber
        {
            get { return _bednumber; }
            set 
            {
                _bednumber = value;
                OnPropertyChanged("BedNumber");
            }
        }
        [DataMember]
        public virtual string EncounterId
        {
            get { return _encounterid; }
            set 
            {
                _encounterid = value;
                OnPropertyChanged("EncounterId");
            }
        }
        [DataMember]
        public virtual string OperationId
        {
            get { return _operationid; }
            set 
            {
                _operationid = value;
                OnPropertyChanged("OperationId");
            }
        }
        [DataMember]
        public virtual string OperationName
        {
            get { return _operationname; }
            set 
            {
                _operationname = value;
                OnPropertyChanged("OperationName");
            }
        }
        [DataMember]
        public virtual DateTime? OperationBeginTime
        {
            get { return _operationbegintime; }
            set 
            {
                _operationbegintime = value;
                OnPropertyChanged("OperationBeginTime");
            }
        }
        [DataMember]
        public virtual DateTime? OperationOverTime
        {
            get { return _operationovertime; }
            set 
            {
                _operationovertime = value;
                OnPropertyChanged("OperationOverTime");
            }
        }
        [DataMember]
        public virtual string Description
        {
            get { return _description; }
            set 
            {
                _description = value;
                OnPropertyChanged("Description");
            }
        }
        [DataMember]
        public virtual string AnesScheme
        {
            get { return _anesscheme; }
            set 
            {
                _anesscheme = value;
                OnPropertyChanged("AnesScheme");
            }
        }
        [DataMember]
        public virtual string PatientName
        {
            get { return _patientname; }
            set 
            {
                _patientname = value;
                OnPropertyChanged("PatientName");
            }
        }
        [DataMember]
        public virtual bool? IsTempSurgery
        {
            get { return _istempsurgery; }
            set 
            {
                _istempsurgery = value;
                OnPropertyChanged("IsTempSurgery");
            }
        }
        [DataMember]
        public virtual Decimal? Age
        {
            get { return _age; }
            set 
            {
                _age = value;
                OnPropertyChanged("Age");
            }
        }
        [DataMember]
        public virtual bool? Gender
        {
            get { return _gender; }
            set 
            {
                _gender = value;
                OnPropertyChanged("Gender");
            }
        }
        [DataMember]
        public virtual string Remark
        {
            get { return _remark; }
            set 
            {
                _remark = value;
                OnPropertyChanged("Remark");
            }
        }
        [DataMember]
        public virtual string OperationType
        {
            get { return _operationtype; }
            set 
            {
                _operationtype = value;
                OnPropertyChanged("OperationType");
            }
        }
        [DataMember]
        public virtual Guid? OperationRoomKey
        {
            get { return _operationroomkey; }
            set 
            {
                _operationroomkey = value;
                OnPropertyChanged("OperationRoomKey");
            }
        }
        [DataMember]
        public virtual bool? Flag
        {
            get { return _flag; }
            set 
            {
                _flag = value;
                OnPropertyChanged("Flag");
            }
        }
        [DataMember]
        public virtual DateTime? ClientTime
        {
            get { return _clienttime; }
            set 
            {
                _clienttime = value;
                OnPropertyChanged("ClientTime");
            }
        }
        [DataMember]
        public virtual DateTime? ServerTime
        {
            get { return _servertime; }
            set 
            {
                _servertime = value;
                OnPropertyChanged("ServerTime");
            }
        }
        [DataMember]
        public virtual string Ext01
        {
            get { return _ext01; }
            set 
            {
                _ext01 = value;
                OnPropertyChanged("Ext01");
            }
        }
        [DataMember]
        public virtual string Ext02
        {
            get { return _ext02; }
            set 
            {
                _ext02 = value;
                OnPropertyChanged("Ext02");
            }
        }
        /// <summary>
        /// 临时手术时存放设备Key
        /// </summary>
        [DataMember]
        public virtual string Ext03
        {
            get { return _ext03; }
            set 
            {
                _ext03 = value;
                OnPropertyChanged("Ext03");
            }
        }
        /// <summary>
        /// 临时手术时，存放核销手术的Key
        /// </summary>
        [DataMember]
        public virtual string Ext04
        {
            get { return _ext04; }
            set 
            {
                _ext04 = value;
                OnPropertyChanged("Ext04");
            }
        }
        [DataMember]
        public virtual string Ext05
        {
            get { return _ext05; }
            set 
            {
                _ext05 = value;
                OnPropertyChanged("Ext05");
            }
        }
        [DataMember]
        public virtual string Ext06
        {
            get { return _ext06; }
            set 
            {
                _ext06 = value;
                OnPropertyChanged("Ext06");
            }
        }
        [DataMember]
        public virtual string Ext07
        {
            get { return _ext07; }
            set 
            {
                _ext07 = value;
                OnPropertyChanged("Ext07");
            }
        }
        [DataMember]
        public virtual string Ext08
        {
            get { return _ext08; }
            set 
            {
                _ext08 = value;
                OnPropertyChanged("Ext08");
            }
        }
        [DataMember]
        public virtual string Ext09
        {
            get { return _ext09; }
            set 
            {
                _ext09 = value;
                OnPropertyChanged("Ext09");
            }
        }
        [DataMember]
        public virtual string Ext10
        {
            get { return _ext10; }
            set 
            {
                _ext10 = value;
                OnPropertyChanged("Ext10");
            }
        }
        [DataMember]
        public virtual Guid? SurgeonKey
        {
            get { return _surgeonkey; }
            set 
            {
                _surgeonkey = value;
                OnPropertyChanged("SurgeonKey");
            }
        }
        [DataMember]
        public virtual Guid? AnalgesistKey
        {
            get { return _analgesistkey; }
            set 
            {
                _analgesistkey = value;
                OnPropertyChanged("AnalgesistKey");
            }
        }
        [DataMember]
        public virtual bool? HasCanceled
        {
            get { return _hascanceled; }
            set 
            {
                _hascanceled = value;
                OnPropertyChanged("HasCanceled");
            }
        }
        [DataMember]
        public virtual string OperationRoomId
        {
            get { return _operationroomid; }
            set 
            {
                _operationroomid = value;
                OnPropertyChanged("OperationRoomId");
            }
        }
        [DataMember]
        public virtual string AnalgesistId
        {
            get { return _analgesistid; }
            set 
            {
                _analgesistid = value;
                OnPropertyChanged("AnalgesistId");
            }
        }
        [DataMember]
        public OperationRoom OperationRoom
        {
            get { return _operationroom; }
            set 
            {
                _operationroom = value;
                OnPropertyChanged("OperationRoom");
            }
        }
        [DataMember]
        public PatientInfo PatientInfo
        {
            get { return _patientinfo; }
            set 
            {
                _patientinfo = value;
                OnPropertyChanged("PatientInfo");
            }
        }
		#endregion 
	}
}