using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using RDH.Data.Models;

namespace RDH.Data.BLL
{
    public partial class PatientInfoBLL : BaseOrclSnapshotBLL<PatientInfo>, IPatientInfoBLL
    {
        public PatientInfoBLL() : base() 
        {
            AliasTableName = "p";
        }

        internal override String TABLE_NAME { get { return "PATIENT_INFO"; } }//TB_NAME
        internal override string ENTITY_NAME { get { return "PatientInfo"; } }
        internal override String KEY_COLUMN { get { return "SNAPSHOT_KEY"; } }//KEY_COLUMN
        internal override string SNAPSHOT_BASE { get { return "PATIENT_INFO_BASE"; } }

        internal override void InitMaps()
        {
            ColumnPropMaps.Add("KEY", "Key");
            ColumnPropMaps.Add("SNAPSHOT_KEY", "SnapshotKey");
            ColumnPropMaps.Add("CREATE_BY", "CreateBy");
            ColumnPropMaps.Add("CREATE_TIME", "CreateTime");
            ColumnPropMaps.Add("PATIENT_ID", "PatientId");
            ColumnPropMaps.Add("SOURCE", "Source");
            ColumnPropMaps.Add("ENCOUNTER_ID", "EncounterId");
            ColumnPropMaps.Add("IN_TIME", "InTime");
            ColumnPropMaps.Add("OUT_TIME", "OutTime");
            ColumnPropMaps.Add("SECTION_KEY", "SectionKey");
            ColumnPropMaps.Add("NAME", "Name");
            ColumnPropMaps.Add("BIRTHDAY", "Birthday");
            ColumnPropMaps.Add("GENDER", "Gender");
            ColumnPropMaps.Add("IDENTITY", "Identity");
            ColumnPropMaps.Add("MEDICIAL_CARD", "MedicialCard");
            ColumnPropMaps.Add("ADDRESS", "Address");
            ColumnPropMaps.Add("TELEPHONE", "Telephone");
            ColumnPropMaps.Add("BED_NO", "BedNo");
            ColumnPropMaps.Add("FLAG", "Flag");
            ColumnPropMaps.Add("CLIENT_TIME", "ClientTime");
            ColumnPropMaps.Add("SERVER_TIME", "ServerTime");
            ColumnPropMaps.Add("EXT01", "Ext01");
            ColumnPropMaps.Add("EXT02", "Ext02");
            ColumnPropMaps.Add("EXT03", "Ext03");
            ColumnPropMaps.Add("EXT04", "Ext04");
            ColumnPropMaps.Add("EXT05", "Ext05");
            ColumnPropMaps.Add("EXT06", "Ext06");
            ColumnPropMaps.Add("EXT07", "Ext07");
            ColumnPropMaps.Add("EXT08", "Ext08");
            ColumnPropMaps.Add("EXT09", "Ext09");
            ColumnPropMaps.Add("EXT10", "Ext10");
            ColumnPropMaps.Add("CHARGE_TYPE", "ChargeType");
            ColumnPropMaps.Add("SECTION_ID", "SectionId");//COLUMN_MAPS
        }

        internal override object GetParam(PatientInfo patientinfo)
        {
            return new
            {

                Key = patientinfo.Key,
                SnapshotKey = patientinfo.SnapshotKey,
                CreateBy = patientinfo.CreateBy,
                CreateTime = patientinfo.CreateTime,
                PatientId = patientinfo.PatientId,
                Source = patientinfo.Source,
                EncounterId = patientinfo.EncounterId,
                InTime = patientinfo.InTime,
                OutTime = patientinfo.OutTime,
                SectionKey = patientinfo.SectionKey,
                Name = patientinfo.Name,
                Birthday = patientinfo.Birthday,
                Gender = patientinfo.Gender,
                Identity = patientinfo.Identity,
                MedicialCard = patientinfo.MedicialCard,
                Address = patientinfo.Address,
                Telephone = patientinfo.Telephone,
                BedNo = patientinfo.BedNo,
                Flag = patientinfo.Flag,
                ClientTime = patientinfo.ClientTime,
                ServerTime = patientinfo.ServerTime,
                Ext01 = patientinfo.Ext01,
                Ext02 = patientinfo.Ext02,
                Ext03 = patientinfo.Ext03,
                Ext04 = patientinfo.Ext04,
                Ext05 = patientinfo.Ext05,
                Ext06 = patientinfo.Ext06,
                Ext07 = patientinfo.Ext07,
                Ext08 = patientinfo.Ext08,
                Ext09 = patientinfo.Ext09,
                Ext10 = patientinfo.Ext10,
                ChargeType = patientinfo.ChargeType,
                SectionId = patientinfo.SectionId,   //Params
            };
        }
    }
}