⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 crb_xianbingshiview.aspx.cs

📁 web打印控件
💻 CS
📖 第 1 页 / 共 3 页
字号:
                strYc += strOx + "牙龈出血、";
            else
                strZc += "牙龈出血、";

            if (strSzgb != "" && strSzgb != "无")
                strYc += strOx + "神志改变、";
            else
                strZc += "神志改变、";     
        }
        else
        {
            returnValue += "未知。";
        }
        dac.CloseDbReader();

        returnValue += strYc.TrimEnd('、') + ",无" + strZc.TrimEnd('、') + "。";
        return returnValue;

    } 

    /// <summary>
    /// 保存病毒性肝炎结构化的内容
    /// </summary>
    /// <param name="strLx">临床症状类型,0-历次,1-本次</param>
    /// <returns></returns>
    private int SetPageValue(string strLx)
    { 
        string strRef = "";
        string strFl = "";
        string strNc = "";
        string strEx = "";
        string strOt = "";
        string strNh = "";
        string strFz = "";
        string strFt = "";
        string strNl = "";
        string strOx = "";

        string strHb = "";
        string strFr = "";
        string strYycx = "";
        string strSzgb = "";
        string strFsqk = "";
          strFl = plGy_rdFl.SelectedValue;
            strNc = plGy_rdNc.SelectedValue;
            strEx = plGy_rdEx.SelectedValue;
            strOt = plGy_rdOt.SelectedValue;
            strNh = plGy_rdNh.SelectedValue;
            strFz = plGy_rdFz.SelectedValue;
            strFt = plGy_rdFt.SelectedValue;
            strNl = plGy_rdNl.SelectedValue;
            strOx = plGy_rdOx.SelectedValue;
            strFsqk = GetCheckBoxListValue(plGy_rdFsbw, ref strRef);
            //黑便
            strHb = hdhbSel1.Value; 

            if (strHb.Length > 3)
                strHb = strHb.TrimEnd('、').TrimEnd(')') + ")";

            strFr = plGy_rdFr.SelectedValue;
            strYycx = plGy_rdYycx.SelectedValue;
            strSzgb = plGy_rdSzgb.SelectedValue;
        
 

        string strTcz = "";
        string strTcz1 = "";
        strTcz = GetCheckBoxListValue(plGy_ckGyjc, ref strTcz1);


        string strWwrw = "";
        string strWwrw1 = "";
        strWwrw = GetCheckBoxListValue(plGy_ckJcwrw, ref strWwrw1);


        string strXjc = "否认性接触而未采取防护措施。";
        if (plGy_ckXjc.Checked)
            strXjc = "有性接触而未采取防护措施。"; 

        string strZyxh = pi.zyxh;
        string query = "update t_zyys_ryjl_xbs ";
        query += "  set scjzyy=  '" + strScjzyy + "', zyzl = '" + strZyzl + "',scjzsj = '" + strJzsj + "',zd = '" + strZd + "',yymc = '" + strYymc + "',yylx = '" + strYylx + "',";
        query += " bfz = '" + strBfz + "',    xjc = '" + strXjc + "' ,    lctz = '" + strLctz + "', tcz = '" + strTcz + "',  wrw = '" + strWwrw + "', "; 
        query += "   fl = '" + strFl + "',  nc = '" + strNc + "',  ex = '" + strEx + "', ot = '" + strOt + "',  nh = '" + strNh + "',";
        query += " fz = '" + strFz + "',  ft = '" + strFt + "',  nl ='" + strNl + "',  ox = '" + strOx + "',  hb = '" + strHb + "',  fr ='" + strFr + "',";
        query += " yycx = '" + strYycx + "', szgb = '" + strSzgb + "' ,fsqk='"+strFsqk+"'  ";
        query += " where   zyxh = '" + strZyxh + "' and jllx ='" + strLx + "'";
        int nLine = dac.update(query);
        if (nLine == 0)
        {
            query = " insert into t_zyys_ryjl_xbs ";
            query += " ( scjzyy, zyzl, scjzsj, zd, yymc, yylx, bfz,   tcz,  wrw,xjc, lctz, fl, nc, ex, ot, nh, fz, ft, nl, ox, hb, fr, yycx, szgb,   zyxh,jllx)";
            query += " values ";
            query += " ( '" + strScjzyy + "','" + strZyzl + "', '" + strJzsj + "', '" + strZd + "', '" + strYymc + "', '" + strYylx + "', '" + strBfz + "',  '" + strTcz + "', '" + strWwrw + "', '" + strXjc + "', '" + strLctz + "', '" + strFl + "', '" + strNc + "', '" + strEx + "', '" + strOt + "', '" + strNh + "', '" + strFz + "', '" + strFt + "', '" + strNl + "', '" + strOx + "', '" + strHb + "', '" + strFr + "', '" + strYycx + "', '" + strSzgb + "'   , '" + strZyxh + "','" + strLx + "')";
           nLine =    dac.update(query);
        }
        return nLine;
    }


    //结构化输入后组织成正式文本
    /// <summary>
    /// 生成现病史按钮事件,生成现病史的内容
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void DIV1_btnSave_Click(object sender, EventArgs e)
    {
        SetPageValue("0");
        SetPageValue("1");
        tbXianbingshi.Text = GetIllnessDescriptionForBdxGy();
    }
 
    /// <summary>
    /// 保存按钮事件,将现病史的内容保存到数据库中
    /// </summary>
    /// <param name="sender"></param>
    /// <param name="e"></param>
    protected void tbSave_Click(object sender, EventArgs e)
    {
        Label1.Visible = true;       
        if (tbXianbingshi.Text.Trim() != hdXbs.Value)
        {
            if (!CheckTextLen(tbXianbingshi, 2300))
            {
                if (hdSxzt.Value == "1")
                    UpdateHJ();
                else
                    Update();
            }
        }
        else
                Label1.Text = "请先修改记录~~~";
       
    }

    /// <summary>
    /// 更新数据到数据库
    /// </summary>
    private void Update()
    {
        string query1 = "update T_ZYYS_RYJL  set xbs =:xbs where zyxh= '" + pi.zyxh + "'";
        int i = dac.UpdateWithLargerPara(query1, "xbs", tbXianbingshi.Text, "", "");
        //db.Close();
        if (i == 1)
            Label1.Text += "数据已保存!";
        else
            Label1.Text = "数据更新失败";
    }
    /// <summary>
    /// 保存痕迹记录
    /// </summary>
    private void UpdateHJ()
    {
            Update();
            HJJL hj = new HJJL(dac);
            hj.InsertHJJL(pi.zyxh, "入院记录", "现病史", hdXbs.Value, tbXianbingshi.Text, usr.id, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
           Label1.Text += "痕迹已保存!"; 
    }

    /// <summary>
    /// 检查文本框字符长度
    /// </summary>
    /// <param name="tb">文本框控件名称</param>
    /// <param name="len">允许最大长度</param>
    /// <returns></returns>
    private bool CheckTextLen(TextBox tb, int len)
    {
        bool result = false;
        if (CheckValid.CheckTextLen(tb.Text, len))
        {
            string mess = "当前字符数为" + tb.Text.Length.ToString() + "超出最大长度,请将输入内容控制在 " + len.ToString() + " 个字符之内,然后重试~~~";
            this.AddError(mess, tb.ClientID);
            result = true;
        }
        return result;
    }



    #region AjaxPro 用药明细操作
    /// <summary>
    /// 绑定活动
    /// </summary>
    /// <returns>HTML表格数据集</returns>
    [AjaxPro.AjaxMethod()]
    public string BindYy(string strZyxh,string lx)
    {
        string returnValue = "";
        returnValue = "<table border='0' cellpadding='0' cellspacing='1' style='width:100%; background-color:#bbdefa'>";
        returnValue += "<tr style='background-color:White'>";
        returnValue += "<td align='center' style='background-color: aliceblue; width: 10%;'>开始时间</td>";
        returnValue += "<td align='center' style='background-color:aliceblue;'>药物名称</td>";
        returnValue += "<td align='center' style='background-color:aliceblue;width:10%;'>剂量</td>";
        returnValue += "<td align='center' style='background-color:aliceblue;width:10%;'>用法</td>";
        returnValue += "<td align='center' style='background-color:aliceblue;width:10%;'>疗程</td>";
        returnValue += "<td align='center' style='background-color:aliceblue;width:10%;'>疗效</td>";
        returnValue += "<td align='center' style='background-color:aliceblue;width:10%;'>耐药</td>";
        returnValue += "<td align='center' style='background-color:aliceblue;width:10%;'>操作</td>"; 
        returnValue += "</tr>";
        FSDBAccess dac1 = new FSDBAccess(null);
        dac1.CreateDbConnection();
        dac1.OpenDbConnection();
            string strYymx = "";
        try
        {
            string query =" select yymx from t_zyys_ryjl_xbs where zyxh ='"+strZyxh+"' and jllx='"+lx+"'";
            IDataReader reader = dac1.DataReaderQuery(query);
            if (reader.Read())
            {
                strYymx = reader["yymx"].ToString();
            }
            dac1.CloseDbReader();
            dac1.CloseDbConnction();
            
                string[] arrRows = strYymx.Split('$');
                string[] arrCells;
                for (int i = 0; i < arrRows.Length; i++)
                {
                    if (arrRows[i] != "")
                    {
                        arrCells = arrRows[i].Split('&');
                        returnValue += "<tr style='background-color:White'>";
                        returnValue += "<td align='center'>" + arrCells[0] + "</td>";
                        returnValue += "<td align='center'>" + arrCells[1].Split('|')[0] + "</td>";
                         returnValue += "<td align='center'>" + arrCells[2] + "</td>";
                         returnValue += "<td align='center'>" + arrCells[3] + "</td>";
                         returnValue += "<td align='center'>" + arrCells[4] + "</td>";
                         returnValue += "<td align='center'>" + arrCells[5] + "</td>";
                         returnValue += "<td align='center'>" + arrCells[6] + "</td>";
                         returnValue += "<td align='center'><a href='#' onclick=MyEdit('hd" + i.ToString() + "')>编辑</a><input id = 'hd" + i.ToString() + "' type='hidden' value ='" + arrRows[i] + "'></td>";
                         returnValue += "</tr>";
                    }
                }
        }
        catch (Exception ex)
        {
            //returnValue = "0";
        } 
        returnValue += "</table>";
        returnValue += "<input id='hdYymx'   type='hidden' value='" + strYymx + "' />";
         
        return returnValue;
    }

    [AjaxPro.AjaxMethod]
    public string SaveYymx(string strYymx, string strZyxh,string strLx)
    {
        try
        {
            strYymx = strYymx.Replace("$$","$").TrimStart('$');
            string strKbdyys =  strYymx == ""?"无":"有";
            string query = " update t_zyys_ryjl_xbs set kbdyys ='" + strKbdyys + "', yymx = '" + strYymx + "' where zyxh ='" + strZyxh + "' and jllx ='" + strLx + "'";
            FSDBAccess dac1 = new FSDBAccess(null);
            dac1.CreateDbConnection();
            dac1.OpenDbConnection();
            int i = dac1.update(query);
            if (i == 0)
            {
                query = " insert into t_zyys_ryjl_xbs (kbdyys,yymx,zyxh,jllx) values ('" + strKbdyys + "','" + strYymx + "','" + strZyxh + "','" + strLx + "')";
                i = dac1.update(query);
            }
            return i.ToString();
        }
        catch (Exception ex)
        {
            return "-" + ex.ToString();
        }
    }
    #endregion

    //protected void plGy_drJllx_SelectedIndexChanged(object sender, EventArgs e)
    //{
    //    SetPageValue(hdLx.Value); 
    //    hdLx.Value = plGy_drJllx.SelectedValue;
    //    InitRdLists(plGy_drJllx.SelectedValue);
    //    divKbdYys.InnerHtml = BindYy(pi.zyxh, plGy_drJllx.SelectedValue);
    //}
    protected void btnAddLczz_Click(object sender, EventArgs e)
    {
      //  GetLczz(plGy_drJllx.SelectedValue);
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -