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 PatientInfo : BaseSnapshotModel// IModel , INotifyPropertyChanged
    {
        private Guid? _key;
        private Guid _snapshotkey;
        private DateTime _starttime;
        private DateTime? _endtime;
        private Guid? _createby;
        private string _patientid;
        private string _source;
        private string _encounterid;
        private DateTime _intime;
        private DateTime? _outtime;
        private Guid? _sectionkey;
        private string _name;
        private DateTime _birthday;
        private bool _gender;
        private string _identity;
        private string _medicialcard;
        private string _address;
        private string _telephone;
        private string _bedno;
        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 string _chargetype;
        private string _sectionid;
        private Section _section;
        private OperationRoom _operationRoomInfo;

		#region Public Properties

        [DataMember]
        public virtual Guid? Key
        {
            get { return _key; }
            set 
            {
                _key = value;
                OnPropertyChanged("Key");
            }
        }
        [DataMember]
        public virtual Guid SnapshotKey
        {
            get { return _snapshotkey; }
            set 
            {
                _snapshotkey = value;
                OnPropertyChanged("SnapshotKey");
            }
        }
        [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 string PatientId
        {
            get { return _patientid; }
            set 
            {
                _patientid = value;
                OnPropertyChanged("PatientId");
            }
        }
        [DataMember]
        public virtual string Source
        {
            get { return _source; }
            set 
            {
                _source = value;
                OnPropertyChanged("Source");
            }
        }
        [DataMember]
        public virtual string EncounterId
        {
            get { return _encounterid; }
            set 
            {
                _encounterid = value;
                OnPropertyChanged("EncounterId");
            }
        }
        [DataMember]
        public virtual DateTime InTime
        {
            get { return _intime; }
            set 
            {
                _intime = value;
                OnPropertyChanged("InTime");
            }
        }
        [DataMember]
        public virtual DateTime? OutTime
        {
            get { return _outtime; }
            set 
            {
                _outtime = value;
                OnPropertyChanged("OutTime");
            }
        }
        [DataMember]
        public virtual Guid? SectionKey
        {
            get { return _sectionkey; }
            set 
            {
                _sectionkey = value;
                OnPropertyChanged("SectionKey");
            }
        }
        [DataMember]
        public virtual string Name
        {
            get { return _name; }
            set 
            {
                _name = value;
                OnPropertyChanged("Name");
            }
        }
        [DataMember]
        public virtual DateTime Birthday
        {
            get { return _birthday; }
            set 
            {
                _birthday = value;
                OnPropertyChanged("Birthday");
            }
        }
        [DataMember]
        public virtual bool Gender
        {
            get { return _gender; }
            set 
            {
                _gender = value;
                OnPropertyChanged("Gender");
            }
        }
        [DataMember]
        public virtual string Identity
        {
            get { return _identity; }
            set 
            {
                _identity = value;
                OnPropertyChanged("Identity");
            }
        }
        [DataMember]
        public virtual string MedicialCard
        {
            get { return _medicialcard; }
            set 
            {
                _medicialcard = value;
                OnPropertyChanged("MedicialCard");
            }
        }
        [DataMember]
        public virtual string Address
        {
            get { return _address; }
            set 
            {
                _address = value;
                OnPropertyChanged("Address");
            }
        }
        [DataMember]
        public virtual string Telephone
        {
            get { return _telephone; }
            set 
            {
                _telephone = value;
                OnPropertyChanged("Telephone");
            }
        }
        [DataMember]
        public virtual string BedNo
        {
            get { return _bedno; }
            set 
            {
                _bedno = value;
                OnPropertyChanged("BedNo");
            }
        }
        [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");
            }
        }
        [DataMember]
        public virtual string Ext03
        {
            get { return _ext03; }
            set 
            {
                _ext03 = value;
                OnPropertyChanged("Ext03");
            }
        }
        [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 string ChargeType
        {
            get { return _chargetype; }
            set 
            {
                _chargetype = value;
                OnPropertyChanged("ChargeType");
            }
        }
        [DataMember]
        public virtual string SectionId
        {
            get { return _sectionid; }
            set 
            {
                _sectionid = value;
                OnPropertyChanged("SectionId");
            }
        }
        [DataMember]
        public Section Section
        {
            get { return _section; }
            set 
            {
                _section = value;
                OnPropertyChanged("Section");
            }
        }
        public OperationRoom OperationRoomInfo 
        {
            get { return _operationRoomInfo; }
            set 
            {
                _operationRoomInfo = value;
                OnPropertyChanged("OperationRoomInfo");
            }
        }
		#endregion 
	}
	
}