public AdmissionDischarge GetAdmissionDischargeInfo()
        {
            //Hashtable hs = new Hashtable();

            // 获取今日入院人数
            string getTodayInHospitalNumCommand = GetIOHospitalNumSQL(DateTime.Now, DateTime.Now, "IN");
            object todayInHospitalNum           = GenerateDate("RS", db, getTodayInHospitalNumCommand);
            // 获取今日出院人数
            string getTodayOutHospitalNumCommand = GetIOHospitalNumSQL(DateTime.Now, DateTime.Now, "OUT");
            object todayOutHospitalNum           = GenerateDate("RS", db, getTodayOutHospitalNumCommand);
            // 获取昨日在院人数
            string getYestdayLiveHospitalNumCommand = GetLiveHospitalNumSQL(DateTime.Now.AddDays(-1));
            object yestdayLiveHospitalNum           = GenerateDate("RS", db, getYestdayLiveHospitalNumCommand);
            // 获取各科室出入院人数情况
            string    getTodayIONumOfDepartmentCommand = GetIONumOfDepartmenSQLt(DateTime.Now);
            ArrayList todayIONumOfDepartment           = GenerateDate(new [] { "ZKMC", "RS", "INNUM", "OUTNUM" }, db, getTodayIONumOfDepartmentCommand);


            // 获取额定空床位
            string getRatedVacantBedsCommand = GetRatedVacantBeds();
            object ratedVacantBedsNum        = GenerateDate("edkcw", db, getRatedVacantBedsCommand);
            //// 获得加床空床位
            string getExtraEmptyBedsCommand = GetExtraEmptyBeds();
            object extraEmptyBedsNum        = GenerateDate("jckcw", db, getExtraEmptyBedsCommand);
            //// 获得虚拟空床位
            string getVirtualEmptyBedsCommand = GetVirtualEmptyBeds();
            object virtualEmptyBedsNum        = GenerateDate("xnkcw", db, getVirtualEmptyBedsCommand);
            // 获得各专科空床情况
            string    getEachSubjectEmptyBedsCommand = GetEachSubjectEmptyBedsSQL();
            ArrayList EachSubjectEmptyBeds           = GenerateDate(new[] { "ZKMC", "EDKCW", "JCKCW", "XNKCW" }, db, getEachSubjectEmptyBedsCommand);

            ////出入院
            //hs.Add("cry", new Hashtable() {
            //    {"zrzy",yestdayLiveHospitalNum},
            //    {"jrcy",todayOutHospitalNum},
            //    {"jrry",todayInHospitalNum}
            //});
            //hs.Add("gzkcryqk",todayIONumOfDepartment);
            ////床位
            //hs.Add("edkcw", ratedVacantBedsNum);
            //hs.Add("jckcw", extraEmptyBedsNum);
            //hs.Add("xnkcw", virtualEmptyBedsNum);
            //hs.Add("gzkkcqk", EachSubjectEmptyBeds);

            AdmissionDischarge ad = new AdmissionDischarge();

            // 出入院
            ad.cry.zrzy = yestdayLiveHospitalNum.ToString();
            ad.cry.jrcy = todayOutHospitalNum.ToString();
            ad.cry.jrry = todayInHospitalNum.ToString();
            foreach (Hashtable o1 in todayIONumOfDepartment)
            {
                ad.addGzkcryqk((string)o1["ZKMC"], (string)o1["RS"], (string)o1["INNUM"], (string)o1["OUTNUM"]);
            }
            // 床位
            ad.edkcw = ratedVacantBedsNum.ToString();
            ad.jckcw = extraEmptyBedsNum.ToString();
            ad.xnkcw = virtualEmptyBedsNum.ToString();
            foreach (Hashtable o2 in EachSubjectEmptyBeds)
            {
                ad.addGzkkcqk((string)o2["ZKMC"], (string)o2["EDKCW"], (string)o2["JCKCW"], (string)o2["XNKCW"]);
            }

            return(ad);
        }
Пример #2
0
        public AdmissionDischarge GetAdmissionDischargeInfo()
        {
            //Hashtable hs = new Hashtable();

            ////出入院
            //hs.Add("cry", new Hashtable() {{"zrzy",2800},{"jrcy",503},{"jrry",623}});
            //hs.Add("gzkcryqk", new ArrayList() {
            //    new Hashtable(){{"ZKMC","肝胆外科"},{"RS",31},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","感染科"},{"RS",1},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","内分泌科"},{"RS",65},{"INNUM",1},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","神经外科"},{"RS",143},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","消化内二科"},{"RS",115},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","心血管内科	"},{"RS",99},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","医疗保健中心"},{"RS",135},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","整形科"},{"RS",45},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","急诊医学科	"},{"RS",24},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","精神卫生科"},{"RS",242},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","康复科"},{"RS",45},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","神经内科(一)"},{"RS",87},{"INNUM",0},{"OUTNUM",5}},
            //    new Hashtable(){{"ZKMC","眼科"},{"RS",1},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","肿瘤科"},{"RS",4},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","产科"},{"RS",100},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","儿科"},{"RS",42},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","老年病"},{"RS",299},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","皮肤科"},{"RS",24},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","生殖中心"},{"RS",7},{"INNUM",10},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","胃肠外科"},{"RS",85},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","胸外科"},{"RS",24},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","血透"},{"RS",78},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","针推理疗科	"},{"RS",12},{"INNUM",0},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","EICU"},{"RS",3},{"INNUM",10},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","肛肠外科"},{"RS",75},{"INNUM",1},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","呼吸内科"},{"RS",27},{"INNUM",1},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","介入治疗"},{"RS",17},{"INNUM",2},{"OUTNUM",0}},
            //    new Hashtable(){{"ZKMC","泌尿外科"},{"RS",38},{"INNUM",0},{"OUTNUM",0}},
            //});

            //// 床位
            //hs.Add("edkcw",356);
            //hs.Add("jckcw",320);
            //hs.Add("xnkcw",719);
            //hs.Add("gzkkcqk", new ArrayList() {
            //    new Hashtable(){{"ZKMC","ICU"},{"EDKCW",19},{"JCKCW",0},{"XNKCW",3}},
            //    new Hashtable(){{"ZKMC","PICU"},{"EDKCW",4},{"JCKCW",0},{"XNKCW",0}},
            //    new Hashtable(){{"ZKMC","耳鼻喉科"},{"EDKCW",0},{"JCKCW",0},{"XNKCW",34}},
            //    new Hashtable(){{"ZKMC","肝胆外科"},{"EDKCW",0},{"JCKCW",0},{"XNKCW",19}},
            //    new Hashtable(){{"ZKMC","感染科"},{"EDKCW",0},{"JCKCW",0},{"XNKCW",9}},
            //    new Hashtable(){{"ZKMC","内分泌科"},{"EDKCW",18},{"JCKCW",0},{"XNKCW",8}},
            //    new Hashtable(){{"ZKMC","神经外科"},{"EDKCW",0},{"JCKCW",0},{"XNKCW",2}},
            //    new Hashtable(){{"ZKMC","消化内二科"},{"EDKCW",21},{"JCKCW",0},{"XNKCW",0}},
            //    new Hashtable(){{"ZKMC","小儿外科"},{"EDKCW",0},{"JCKCW",0},{"XNKCW",9}},
            //    new Hashtable(){{"ZKMC","心血管内科"},{"EDKCW",7},{"JCKCW",1},{"XNKCW",0}},
            //    new Hashtable(){{"ZKMC","神经外科"},{"EDKCW",36},{"JCKCW",14},{"XNKCW",0}},
            //    new Hashtable(){{"ZKMC","医疗保健中心"},{"EDKCW",0},{"JCKCW",0},{"XNKCW",3}},
            //    new Hashtable(){{"ZKMC","综合留观"},{"EDKCW",2},{"JCKCW",1},{"XNKCW",1}},
            //    new Hashtable(){{"ZKMC","急诊医学科"},{"EDKCW",0},{"JCKCW",1},{"XNKCW",3}},
            //    new Hashtable(){{"ZKMC","精神卫生科"},{"EDKCW",0},{"JCKCW",0},{"XNKCW",4}},
            //    new Hashtable(){{"ZKMC","康复科"},{"EDKCW",10},{"JCKCW",0},{"XNKCW",5}}
            //});

            AdmissionDischarge ad = new AdmissionDischarge();

            // 出入院
            ad.cry.zrzy = "2800";
            ad.cry.jrcy = "503";
            ad.cry.jrry = "623";
            ad.addGzkcryqk("肝胆外科", "31", "0", "0");
            ad.addGzkcryqk("感染科", "1", "0", "0");
            ad.addGzkcryqk("内分泌科", "65", "1", "0");
            ad.addGzkcryqk("神经外科", "143", "0", "0");
            ad.addGzkcryqk("消化内二科", "115", "0", "0");
            ad.addGzkcryqk("心血管内科", "99", "0", "0");
            ad.addGzkcryqk("医疗保健中心", "135", "0", "0");
            ad.addGzkcryqk("整形科", "45", "0", "0");
            ad.addGzkcryqk("急诊医学科", "24", "0", "0");
            ad.addGzkcryqk("精神卫生科", "242", "0", "0");
            ad.addGzkcryqk("康复科", "45", "0", "0");
            ad.addGzkcryqk("神经内科(一)", "87", "0", "5");
            ad.addGzkcryqk("眼科", "1", "0", "0");
            ad.addGzkcryqk("肿瘤科", "4", "0", "0");
            ad.addGzkcryqk("产科", "100", "0", "0");
            ad.addGzkcryqk("儿科", "42", "0", "0");
            ad.addGzkcryqk("老年病", "299", "0", "0");
            ad.addGzkcryqk("皮肤科", "24", "0", "0");
            ad.addGzkcryqk("生殖中心", "7", "10", "0");
            ad.addGzkcryqk("胃肠外科", "85", "0", "0");
            ad.addGzkcryqk("胸外科", "24", "0", "0");
            ad.addGzkcryqk("血透", "78", "0", "0");
            ad.addGzkcryqk("针推理疗科", "12", "0", "0");
            ad.addGzkcryqk("EICU", "3", "10", "0");
            ad.addGzkcryqk("肛肠外科", "75", "1", "0");
            ad.addGzkcryqk("呼吸内科", "27", "1", "0");
            ad.addGzkcryqk("介入治疗", "17", "2", "0");
            ad.addGzkcryqk("泌尿外科", "38", "0", "0");

            // 床位
            ad.edkcw = "356";
            ad.jckcw = "320";
            ad.xnkcw = "719";
            ad.addGzkkcqk("ICU", "19", "0", "3");
            ad.addGzkkcqk("PICU", "4", "0", "0");
            ad.addGzkkcqk("耳鼻喉科", "0", "0", "34");
            ad.addGzkkcqk("肝胆外科", "0", "0", "19");
            ad.addGzkkcqk("感染科", "0", "0", "9");
            ad.addGzkkcqk("内分泌科", "18", "0", "8");
            ad.addGzkkcqk("神经外科", "0", "0", "2");
            ad.addGzkkcqk("消化内二科", "21", "0", "0");
            ad.addGzkkcqk("小儿外科", "0", "0", "9");
            ad.addGzkkcqk("心血管内科", "7", "1", "0");
            ad.addGzkkcqk("神经外科", "36", "14", "0");
            ad.addGzkkcqk("医疗保健中心", "0", "0", "3");
            ad.addGzkkcqk("综合留观", "2", "1", "1");
            ad.addGzkkcqk("急诊医学科", "0", "1", "3");
            ad.addGzkkcqk("精神卫生科", "0", "0", "4");
            ad.addGzkkcqk("康复科", "10", "0", "5");

            return(ad);
        }