Beispiel #1
0
 /// <summary>
 /// Work for 目标定容量
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void TextField3_change(object sender, EventArgs e)
 {
     try
     {
         if (TextField3.Text != (Convert.ToDecimal(txt_weight_before.Text) - Convert.ToDecimal(txt_weight_after_expect.Text)).ToString())
         {
             TextField3.RemoveCls("Text-red");
             TextField3.AddCls("Text-black");
         }
     }
     catch
     { }
 }
Beispiel #2
0
        protected void init_PAGE1()
        {
            ImageButton1.Visible = false;
            Grid_Show_TPRBP.Visible = true;
            FormPanel1.Title = "治疗参数";

            cbo_diagnosis.ReadOnly = true;
            cbo_mechine_model.ReadOnly = true;
            cbo_hpack3.ReadOnly = true;
            txt_weight_before.ReadOnly = true; 
            txt_weight_after_expect.ReadOnly = true;
            TextField3.ReadOnly = true;
            txt_weight_after.ReadOnly = true;
            TextField8.ReadOnly = true;
            TextAdd.ReadOnly = true;
            TextAmount.ReadOnly = true;
            SelectBox10.ReadOnly = true;
            
            //Checkbox1.ReadOnly = true;
            //Checkbox2.ReadOnly = true;

            cbo_dialysis_type.ReadOnly = true;
            cbo_h_type.ReadOnly = true;            
            
            TextArea1.ReadOnly = true;

            cbo_diagnosis.RemoveCls("Text-black");
            cbo_diagnosis.AddCls("Text-blue");

            cbo_mechine_model.RemoveCls("Text-black");
            cbo_mechine_model.AddCls("Text-blue");

            cbo_hpack3.RemoveCls("Text-black");
            cbo_hpack3.AddCls("Text-blue");

            txt_weight_before.RemoveCls("Text-black");
            txt_weight_before.AddCls("Text-blue");
            TextField3.RemoveCls("Text-black");
            TextField3.AddCls("Text-blue");
            cbo_dialysis_type.RemoveCls("Text-black");
            cbo_dialysis_type.AddCls("Text-blue");
            cbo_h_type.RemoveCls("Text-black");
            cbo_h_type.AddCls("Text-blue");
        }
Beispiel #3
0
        protected void Show()
        {
            GetComboxData(); //取得各項COMBOBOX資料
            Label2.Text = patient_name.Text;
            Label4.Text = floor.Text;
            Label6.Text = bedno.Text;
            string sql;
            sql = "SELECT * FROM clinical1_nurse ";
            sql += "WHERE cln1_patic = '" + patient_id.Text + "' AND cln1_diadate <> '" + toDay + "' ";
            sql += "ORDER BY cln1_diadate DESC LIMIT 1";
            DataTable dt0 = db.Query(sql);
            if (dt0.Rows.Count > 0)
            {
                info_date1.Text = dt0.Rows[0]["cln1_diadate"].ToString(); //上次日期
                cln1_col1 = dt0.Rows[0]["cln1_col1"].ToString();
                cln1_col6 = dt0.Rows[0]["cln1_col6"].ToString();
                cln1_col13 = dt0.Rows[0]["cln1_col13"].ToString();
                cln1_col14 = dt0.Rows[0]["cln1_col14"].ToString();
                cln1_col15 = dt0.Rows[0]["cln1_col15"].ToString();
                cln1_col26 = dt0.Rows[0]["cln1_col26"].ToString();
                cln1_col27 = dt0.Rows[0]["cln1_col27"].ToString();
                cln1_col17 = dt0.Rows[0]["cln1_col17"].ToString(); //
                cln1_col18 = dt0.Rows[0]["cln1_col18"].ToString(); //置换方式
                cln1_col19 = dt0.Rows[0]["cln1_col19"].ToString(); //置换方式
                cln1_col34 = dt0.Rows[0]["cln1_col34"].ToString(); //血管通路
            };
            dt0.Dispose();

            // 治療參數
            Common.SetComboBoxValue(cbo_dialysis_type, machine_type.Text, false);//透析方式

            DataTable dt = new DataTable();
            sql = "SELECT a.*, c.cln1_col11 AS Henan1, c.cln1_col12 AS Henan2, c.cln1_col21 AS Henan3, c.cln1_col22 AS Henan4, ";
            sql += "b.cln1_col11 as col11, b.cln1_col12 as col12, ";
            sql += "b.cln1_col21 as col21, b.cln1_col22 as col22, ";
            sql += "b.cln1_col31 as col31, b.cln1_col32 as col32, ";
            sql += "b.cln1_col41 as col41, b.cln1_col42 as col42, ";
            sql += "b.cln1_col50 as col50 FROM clinical1_nurse a ";
            sql += "LEFT JOIN clinical1_nurse_suzhou b ON a.cln1_patic=b.cln1_patic AND a.cln1_diadate=b.cln1_diadate ";
            sql += "LEFT JOIN clinical1_nurse_henan c ON a.cln1_patic=c.cln1_patic AND a.cln1_diadate=c.cln1_diadate ";
            sql += "WHERE a.cln1_patic = '" + patient_id.Text + "' AND a.cln1_diadate='" + info_date1.Text + "'";
            dt = db.Query(sql);
            if (dt.Rows.Count > 0)
            {
                DataRow row = dt.Rows[0];

                if (row["cln1_col1"].ToString() == "")
                    Common.SetComboBoxValue(cbo_diagnosis, cln1_col1, false);//诊断
                else
                    Common.SetComboBoxValue(cbo_diagnosis, row["cln1_col1"].ToString(), false);

                if (row["cln1_col26"].ToString() == "")
                    Common.SetComboBoxValue(cbo_mechine_model, cln1_col26, false);//透析器型号
                else
                    Common.SetComboBoxValue(cbo_mechine_model, row["cln1_col26"].ToString(), false);//透析器型号

                if (row["cln1_col34"].ToString() == "")
                    Common.SetComboBoxValue(cbo_h_type, cln1_col34, false);//血管通路
                else
                    Common.SetComboBoxValue(cbo_h_type, dt.Rows[0]["cln1_col34"].ToString(), false);//血管通路

                if (row["cln1_col15"].ToString() == "")
                    Common.SetComboBoxValue(SelectBox10, cln1_col15, false);//肝素
                else
                    Common.SetComboBoxValue(SelectBox10, dt.Rows[0]["cln1_col15"].ToString(), false);//肝素

                string tube_model = Common.get_tube_model(row, "cln1_col27");
                if (tube_model != null)
                    Common.SetComboBoxValue(cbo_hpack3, tube_model, false); //管路型号

                txt_weight_after.Text = row["cln1_col8"].ToString(); //透析后体重
                if (row["cln1_col6"].ToString() == "")
                    txt_weight_after_expect.Text = cln1_col6; //干體重
                else
                    txt_weight_after_expect.Text = row["cln1_col6"].ToString(); //干体重
                try
                {
                    txt_weight_before.Text = dt.Rows[0]["cln1_col5"].ToString(); //透析前体重
                    if (dt.Rows[0]["cln1_col7"].ToString() == "")
                        TextField3.Text = (Convert.ToDecimal(txt_weight_before.Text) - Convert.ToDecimal(txt_weight_after_expect.Text)).ToString();
                    else
                        TextField3.Text = dt.Rows[0]["cln1_col7"].ToString();
                }
                catch (Exception ex)
                {
                    //目标定容量
                    TextField3.Text = "";
                }

                TextField5.Text = dt.Rows[0]["cln1_col10"].ToString(); //透析開始時間
                TextField6.Text = dt.Rows[0]["cln1_col11"].ToString(); //透析結束時間
                TextField7.Text = dt.Rows[0]["cln1_col12"].ToString(); //透析合計時間
                TextField8.Text = row["cln1_col13"].ToString();
                TextAdd.Text = row["cln1_col14"].ToString();
                TextAmount.Text = row["cln1_col17"].ToString();

                TextField2.Text = row["Henan1"].ToString();
                TextField4.Text = row["Henan2"].ToString();
                TextField9.Text = row["Henan3"].ToString();
                TextField10.Text = row["Henan4"].ToString();

                TextField12.Text = dt.Rows[0]["cln1_col20"].ToString();
                TextField13.Text = dt.Rows[0]["cln1_col21"].ToString();
                TextField14.Text = dt.Rows[0]["cln1_col22"].ToString();
                TextField131.Text = dt.Rows[0]["cln1_col25"].ToString();
                TextField24.Text = dt.Rows[0]["cln1_col35"].ToString();
                TextField25.Text = dt.Rows[0]["cln1_col36"].ToString();
                TextField23.Text = dt.Rows[0]["cln1_col33"].ToString();

                Col11 = dt.Rows[0]["col11"].ToString();
                coltext11 = dt.Rows[0]["col12"].ToString();
                Col21 = dt.Rows[0]["col21"].ToString();
                coltext21 = dt.Rows[0]["col22"].ToString();
                Col31 = dt.Rows[0]["col31"].ToString();
                coltext31 = dt.Rows[0]["col32"].ToString();
                Col41 = dt.Rows[0]["col41"].ToString();
                coltext41 = dt.Rows[0]["col42"].ToString();
                Col50 = dt.Rows[0]["col50"].ToString();

                TextArea1.Text = row["cln1_col23"].ToString();

                //置换量
                TextField37.Text = dt.Rows[0]["cln1_col37"].ToString();
                TextField38.Text = dt.Rows[0]["cln1_col38"].ToString();
                Common.SetComboBoxValue(SelectBox39, dt.Rows[0]["cln1_col39"].ToString(), false);

                string[] check = row["cln1_col16"].ToString().Split(new Char[] { ',' });

                try
                {
                    if (txt_weight_before.Text == "")
                        txt_weight_before.Text = "0";
                    decimal before_weight = Convert.ToDecimal(txt_weight_before.Text);
                    if (txt_weight_before.Text != patient_weight.Text)
                    {
                        txt_weight_before.RemoveCls("Text-red");
                        txt_weight_before.AddCls("Text-black");
                    }

                    TextField3.Text = dt.Rows[0]["cln1_col7"].ToString();
                    decimal dec1 = 0;
                    if (txt_weight_after_expect.Text != "")
                        dec1 = Convert.ToDecimal(txt_weight_after_expect.Text);
                    else
                        dec1 = 0;
                    if (TextField3.Text != (before_weight - dec1).ToString())
                    {
                        TextField3.RemoveCls("Text-red");
                        TextField3.AddCls("Text-black");
                    }
                }
                catch (Exception ex)
                {
                    Common._ErrorMsgShow(ex.Message.ToString());
                }
            }
            
            dt.Dispose();
            CheckcboValue();
            db.myConnection.Close();
        }