Esempio n. 1
0
        public string GetHtml(HttpContext context)
        {
            //try
            //{
            //设置显示信息的开始和结束时间
            InitConfig();
            SetViewTime();
            currentPage  = int.Parse(xmlOpe.Element("currentPage").Value);
            PatientNames = xmlOpe.Element("PatientName").Value;
            OpeTime      = xmlOpe.Element("OpeTime").Value;
            DataTable dt = new DataTable();

            dt = PublicMethod.GetPlanNoticeNew(_beginDate, _endDate, OpeTime == "" ? "5" : OpeTime);
            DataRow[] sqzb   = dt.Select("Szstate = '0' and InRoomTime  is not null and OperationBeginTime is null and OperationEndTime is null and OutRoomTime is null");
            DataRow[] ssjxz  = dt.Select("Szstate = '0' and InRoomTime is not null and OperationBeginTime is not null and OperationEndTime is null and OutRoomTime is null");
            DataRow[] ssjxz1 = dt.Select("Szstate = '0' and InRoomTime is not null and OperationBeginTime is not null and  OperationEndTime is not null and OutRoomTime is null");
            DataRow[] shhf   = dt.Select("InRoomTime is not null and OperationBeginTime is not null and OperationEndTime is not null and'" + DateTime.Now + "' < OutRoomTime");
            DataRow[] lkssj  = dt.Select("InRoomTime is not null and OperationBeginTime is not null and OperationEndTime is not null and '" + DateTime.Now + "' > OutRoomTime");
            dts = dt.Clone();
            foreach (DataRow row in sqzb)
            {
                dts.Rows.Add(row.ItemArray);
            }

            foreach (DataRow row in ssjxz)
            {
                dts.Rows.Add(row.ItemArray);
            }

            foreach (DataRow row in ssjxz1)
            {
                dts.Rows.Add(row.ItemArray);
            }

            foreach (DataRow row in shhf)
            {
                dts.Rows.Add(row.ItemArray);
            }

            foreach (DataRow row in lkssj)
            {
                dts.Rows.Add(row.ItemArray);
            }
            //总记录数
            dSum      = dts.Rows.Count;
            countPage = GetPageCount();
            string tdRows = string.Empty;

            if (HttpContext.Current.Request["WorkerCurrentPage"] != null && HttpContext.Current.Request["WorkerCurrentPage"] != "")
            {
                LoadWaitNurseOpe(Convert.ToInt32(HttpContext.Current.Request["WorkerCurrentPage"]));
            }
            JavaScriptSerializer jss = new JavaScriptSerializer();
            message msg = new message(true, body, countPage.ToString(), "");

            context.Response.Write(jss.Serialize(msg));//返回给前台页面
            context.Response.End();

            //}
            //catch (Exception exp)
            //{
            //    body = " <div style='position: absolute;top: 50%;left: 50%;width: 800px;height: 50px;margin-top: -25px; margin-left: -400px; background-color:#000;font: bold 48px/50px Verdana, Geneva, sans-serif; '>";
            //    body += "<marquee direction='left' scrollamount='5' style='font: bold 48px/50px Verdana, Geneva, sans-serif; color:#FF0000'>";
            //    body += exp.Message + " 与数据服务器连接中断,请稍候......</marquee></div>";

            //    PublicMethod.WriteLog(exp);
            //}

            return(body);
        }
Esempio n. 2
0
        /// <summary>
        ///     插入表头
        /// </summary>
        private void insertTitle()
        {
            if (countPage == 0)
            {
                currentPage = 0;
            }
            string titleStr = "";

            titleStr += "<tr style='background:black;color:white;margin-bottom:6px;font-size:40px;font-weight:bold;font-family:\"" + fontFamily + "\";'>";
            titleStr += "<td colspan='9' align='center' valign='middle' height='10%' style='padding:6px;'>";
            titleStr += "<DIV style='left:10px; top: 22px; position: absolute;color:" + titleBgColor + ";font-size:" + fontSize + ";'>" + WebConfigurationManager.AppSettings["BigScreenHospitalName"].ToString();
            titleStr += "</DIV>今日手术<DIV style='right: 10px; top: 22px; position: absolute;color:" + titleBgColor + ";font-size:" + fontSize + ";'>" + PublicMethod.ServerTime().ToString("yyyy-MM-dd HH:mm") + "\n(第" + currentPage + "屏/共" + countPage + "屏)  </DIV></TD></tr>";
            body      = body.Replace("{title}", titleStr);
        }
Esempio n. 3
0
        /// <summary>
        ///     加载所有手术状态为“术前、术中、”的申请信息
        /// </summary>
        /// <param name="m"></param>
        /// <param name="n"></param>
        private void LoadWaitNurseOpe(int curPage)
        {
            //每次去查询时,要更新一下记录总数,RecondSum,每一页显示的记录数为,PageSum ,
            body = "";

            ///创建表
            //CreateTable();
            //创建表头
            //insertTitle();
            ///创建列名

            curPage    -= 1;
            startRecond = curPage * PageSum;
            endRecond   = startRecond + PageSum;
            try
            {
                //状态vchrOpeStatus 手术间vchrOperatingRoomName 时间BeginTime 姓名vchrPatientName
                //手术名称vchrOperationName术者 麻醉者 器械 巡回
                string tdRows = "";
                for (int i = startRecond; i < endRecond; i++)
                {
                    string tdRow = "<tr>";
                    #region 内容的着色设置
                    if (i >= dSum)
                    {
                        tdRow += "<td colspan='9'> </td>";
                    }
                    else
                    {
                        string intApplyID    = dts.Rows[i]["OperationApplyId"].ToString();
                        string OperationRoom = dts.Rows[i]["SqOperationRoom"].ToString();// dts.Rows[i]["SZOperationRoom"].ToString() == "" ? dts.Rows[i]["SqOperationRoom"].ToString() : dts.Rows[i]["SZOperationRoom"].ToString();
                        string vchrOpeStatus = PublicMethod.GetOpeStatus(dts.Rows[i]);
                        if (vchrOpeStatus == "")
                        {
                            continue;
                        }


                        string rowStyle = "";
                        if (i % 2 == 0)
                        {
                            rowStyle = "bgcolor='" + rowEvenBgColor + "' align=left valie=middle style='border-bottom:1px solid #629069;height:50px;font-size:" +
                                       fontSize + ";font-weight:bold; vertical-align: middle;font-family:\"" + fontFamily + "\"; ";
                        }
                        else
                        {
                            rowStyle = "bgcolor='" + rowOddBgColor + "' align=left valie=middle style='border-bottom:1px solid #629069;height:50px;font-size:" +
                                       fontSize + ";font-weight:bold; vertical-align: middle;font-family:\"" + fontFamily + "\"; ";
                        }
                        switch (vchrOpeStatus)
                        {
                        case "等待手术":
                            rowStyle += " color:" + defaultColor + ";'";
                            break;

                        case "手术准备":
                            rowStyle += " color:" + opeBeforColor + ";'";      //2
                            break;

                        case "手术进行中":
                            rowStyle += " color:" + opeInColor + ";'";         //3
                            break;

                        case "术后恢复":
                            rowStyle += " color:" + opeAfterColor + ";'";      //4
                            break;

                        case "手术结束转恢复室":
                            OperationRoom = dts.Rows[i]["PACUBed"].ToString();
                            rowStyle     += " color:" + opeInColor1 + ";'";   //6
                            break;

                        case "手术结束安返病房":
                            rowStyle += " color:" + opeAfterColor1 + ";'";      //57
                            break;

                        case "离开恢复室":
                            OperationRoom = dts.Rows[i]["PACUBed"].ToString();
                            rowStyle     += " color:" + opeAfterColor1 + ";'";  //57
                            break;

                        case "手术结束":
                            rowStyle += " color:" + opeAfterColor1 + ";'";      //57
                            break;

                        default:
                            break;
                        }

                        #endregion
                        //注释时间列改为从床号 LM
                        //vchrFactBeginTime = dts.Rows[i]["OperationBeginTime"].ToString();// == "" ? dts.Rows[i]["OrderOperationTime"].ToString() : dts.Rows[i]["InRoomTime"].ToString();
                        //if (vchrFactBeginTime.Trim().ToString() != "")
                        //{
                        //    vchrFactBeginTime = Convert.ToDateTime(vchrFactBeginTime).ToString("HH:mm");
                        //}
                        //else vchrFactBeginTime = "- -";
                        tdRow += "<td align='center' " + rowStyle + "></td>";
                        tdRow += "<td align='center' " + rowStyle + ">" + dts.Rows[i]["DepartmentName"] + "</td>";
                        tdRow += "<td align='center' " + rowStyle + ">" + dts.Rows[i]["Bed"] + "</td>";
                        string PatientName = "";
                        if (PatientNames == "")
                        {
                            PatientName = dts.Rows[i]["PatientName"].ToString();
                        }
                        else
                        {
                            string name = dts.Rows[i]["PatientName"].ToString().Length < 2 ? "" : dts.Rows[i]["PatientName"].ToString().Substring(2);
                            PatientName = dts.Rows[i]["PatientName"].ToString().Substring(0, 1) + PatientNames + name;
                        }
                        tdRow += "<td align='center' " + rowStyle + ">&nbsp" + PatientName + "</td>";
                        //tdRow += "<td align='center' " + rowStyle + ">&nbsp" + OperationRoom + "</td>";
                        //tdRow += "<td align='center' " + rowStyle + ">&nbsp" + vchrFactBeginTime + " </td>";
                        tdRow += "<td align='center' " + rowStyle + ">" + vchrOpeStatus + "</td>";
                    }
                    tdRow  += "</tr>";
                    tdRows += tdRow;
                }
                //显示备注等
                viewRemark();
                body += tdRows;
                //插入底部
                insertBottom();
            }
            catch (Exception exp)
            {
                throw;
            }
        }
Esempio n. 4
0
 private void SetViewTime()
 {
     _beginDate = PublicMethod.ServerTime().Date.AddSeconds(1);
     _endDate   = PublicMethod.ServerTime().Date.AddHours(23).AddMinutes(59).AddSeconds(59);
 }
        private string LoadWaitNurseOpe(int curPage)
        {
            htmlbody = "";

            //每次去查询时,要更新一下记录总数,RecondSum,每一页显示的记录数为,PageSum ,
            body = "";
            ///创建表
            //CreateTable();
            //插入表头
            //InsertTitle();
            ///创建列名{ "状态", "手术间","科室", "时间", "姓名", "手术名称", "手术医生", "麻醉医生", "洗手护士", "巡回护士" };
            //string[] colsName = { "", "术间", "科室", "姓名", "手术名称", "手术医生", "麻醉医生", "护士", "时间", "状态" };
            //string[] colsWidth = { "1%", "5%", "13%", "8%", "19%", "9%", "14%", "14%", "8%", "9%" };
            //InsertCols(colsName, colsWidth);

            curPage    -= 1;
            startRecond = curPage * PageSum;
            endRecond   = startRecond + PageSum;
            try
            {
                //状态vchrOpeStatus 手术间vchrOperatingRoomName 时间BeginTime 姓名vchrPatientName
                //手术名称vchrOperationName术者 麻醉者 器械 巡回
                string tdRows = "";
                for (int i = startRecond; i < endRecond; i++)
                {
                    string tdRow = "<tr>";
                    if (i >= dSum)
                    {
                        tdRow += "<td colspan='9'> </td>";
                    }
                    else
                    {
                        #region 内容的着色设置
                        string rowStyle = "";
                        if (i % 2 == 0)
                        {
                            rowStyle = "bgcolor='" + rowEvenBgColor +
                                       "' align=center valie=middle style='border-bottom:1px solid #629069; height:50px; font-size:" +
                                       fontSize + ";font-weight:bold; vertical-align: middle; font-family:\"" + fontFamily + "\"; ";
                        }
                        else
                        {
                            rowStyle = "bgcolor='" + rowOddBgColor +
                                       "' align=center valie=middle style='border-bottom:1px solid #629069; height:50px; font-size:" +
                                       fontSize + ";font-weight:bold;  vertical-align: middle; font-family:\"" + fontFamily + "\"; ";
                        }
                        string intApplyID    = dts.Rows[i]["OperationApplyId"].ToString();
                        string vchrOpeStatus = PublicMethod.GetOpeStatus(dts.Rows[i]);
                        //临时手术状态
                        if (vchrOpeStatus == "")
                        {
                            continue;
                        }
                        string opeStatu          = "";
                        string vchrFactBeginTime = "";
                        vchrFactBeginTime = dts.Rows[i]["OperationBeginTime"].ToString();// == "" ? dts.Rows[i]["OrderOperationTime"].ToString() : dts.Rows[i]["InRoomTime"].ToString();
                        if (vchrFactBeginTime.Trim().ToString() != "")
                        {
                            vchrFactBeginTime = Convert.ToDateTime(vchrFactBeginTime).ToString("HH:mm");
                        }
                        else
                        {
                            vchrFactBeginTime = "- -";
                        }
                        string OperationRoom = dts.Rows[i]["SqOperationRoom"].ToString();// dts.Rows[i]["SZOperationRoom"].ToString() == "" ? dts.Rows[i]["SqOperationRoom"].ToString() : dts.Rows[i]["SZOperationRoom"].ToString();
                        switch (vchrOpeStatus)
                        {
                        case "等待手术":
                            opeStatu      = "等待手术";
                            rowStyle     += " color:" + defaultColor + ";'";
                            OperationRoom = dts.Rows[i]["SqOperationRoom"].ToString();
                            break;

                        case "术前准备":
                            opeStatu      = "术前准备";
                            rowStyle     += " color:" + opeBeforColor + ";'";  //2
                            OperationRoom = dts.Rows[i]["SqOperationRoom"].ToString();
                            break;

                        case "手术进行中":
                            opeStatu      = "手术中";
                            rowStyle     += " color:" + opeInColor + ";'";
                            OperationRoom = dts.Rows[i]["SZOperationRoom"].ToString();
                            break;

                        case "术后恢复":
                            break;

                        case "转入复苏室":
                            opeStatu      = "转入复苏室";
                            OperationRoom = dts.Rows[i]["PACUBed"].ToString();
                            rowStyle     += " color:" + opeInColor1 + ";'";   //6
                            //OperationRoom = dts.Rows[i]["PACUBed"].ToString();
                            break;

                        case "离开手术室":
                            opeStatu      = "手术结束";
                            rowStyle     += " color:" + opeAfterColor + ";'";
                            OperationRoom = dts.Rows[i]["SZOperationRoom"].ToString();
                            //OperationRoom = dts.Rows[i]["PACUBed"].ToString();
                            break;

                        case "手术拒绝":
                            opeStatu  = "手术拒绝";
                            rowStyle += " color:#B559F5;'";
                            break;

                        default:
                            break;
                        }
                        #endregion
                        tdRow += "<td align='center' " + rowStyle + "></td>";
                        tdRow += "<td align='center' " + rowStyle + ">" + OperationRoom + "</td>";
                        #region 科室和申请科室
                        string Depatrtment = dts.Rows[i]["DepartmentName"].ToString() == "" ? dts.Rows[i]["ApplyDepartmentName"].ToString() : dts.Rows[i]["DepartmentName"].ToString();
                        tdRow += "<td align='center'" + rowStyle + ">" + Depatrtment + "</td>";
                        #endregion
                        tdRow += "<td align='center' " + rowStyle + ">" + dts.Rows[i]["PatientName"] + "</td>";
                        string SZOperation = dts.Rows[i]["SZOperation"].ToString() == "" ? dts.Rows[i]["SQOperation"].ToString() : dts.Rows[i]["SZOperation"].ToString();
                        tdRow += "<td align='center' " + rowStyle + ">" + SZOperation + "</td>";

                        #region 读取医生的条件
                        string SZOperationDoctor = dts.Rows[i]["SZOperationDoctor"].ToString() == "" ? dts.Rows[i]["SQOperationDoctor"].ToString() : dts.Rows[i]["SZOperationDoctor"].ToString();
                        tdRow += "<td align='center' " + rowStyle + ">" + SZOperationDoctor + "</td>";
                        #endregion

                        #region 读取麻醉医生2
                        string SZAnesthesiaDoctor = dts.Rows[i]["SZAnesthesiaDoctor"].ToString() == "" ? dts.Rows[i]["SqAnesthesiaDoctor"].ToString() : dts.Rows[i]["SZAnesthesiaDoctor"].ToString();
                        SZAnesthesiaDoctor = SZAnesthesiaDoctor == "" ? "- -" : SZAnesthesiaDoctor;
                        tdRow += "<td align='center' " + rowStyle + ">" + SZAnesthesiaDoctor + "</td>";
                        #endregion

                        #region 读取器械护士巡回护士
                        string SZTourNurse       = dts.Rows[i]["SZTourNurse"].ToString() == "" ? dts.Rows[i]["SQTourNurse"].ToString() : dts.Rows[i]["SZTourNurse"].ToString();
                        string SZInstrumentNurse = dts.Rows[i]["SZInstrumentNurse"].ToString() == "" ? dts.Rows[i]["SQInstrumentNurse"].ToString() : dts.Rows[i]["SZInstrumentNurse"].ToString();
                        if (SZInstrumentNurse == "")
                        {
                            SZInstrumentNurse = "- -";
                        }
                        if (SZTourNurse == "")
                        {
                            SZTourNurse = "- -";
                        }
                        tdRow += "<td align='center' " + rowStyle + ">" + SZInstrumentNurse + "/" + SZTourNurse + "</td>";
                        #endregion

                        tdRow += "<td align='center' " + rowStyle + ">" + vchrFactBeginTime + "</td>";
                        tdRow += "<td align='center' " + rowStyle + ">" + opeStatu + "</td>";
                    }
                    tdRow  += "</tr>";
                    tdRows += tdRow;
                }
                //htmlbody = tdRows == "" ? htmlbody : body.Replace("{rows}", tdRows);
                return(tdRows);
            }
            catch (Exception exp)
            {
                return("");

                throw;
            }
        }