Пример #1
0
        /// <summary>
        /// 添加手术
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void btnSurAdd_Click(object sender, EventArgs e)
        {
            ucICD9.setWidth(ucICD9.Width);
            frmUser us = new frmUser("ICD9");

            us.ShowDialog();
            if (ucElement.id != "" && ucElement.myName != "")
            {
                ucElement element = new ucElement(ucElement.myName, ucElement.id);
                ucICD9.createUser(element);
            }
        }
Пример #2
0
        /// <summary>
        /// 加载控件信息
        /// </summary>
        public void IniControls(Class_FollowInfo info)
        {
            if (info != null)
            {
                txtFollowName.Text = info.Follow_name;

                //加载相关科室
                txtExecSecs.Text = info.Exec_secnames;
                txtExecSecs.Tag  = info.Exec_sections;
                //加载相关病区
                txtExecSickAeras.Text = info.Exec_sickareanames;
                txtExecSickAeras.Tag  = info.Exec_sickarea;
                //加载病人相关科室
                txtSection.Text = info.Section_names;
                txtSection.Tag  = info.Section_ids;
                //手术
                if (icd9codes != "")
                {
                    DataSet  ds_icd9   = App.GetDataSet("select code ,name  from oper_def_icd9");
                    string[] opred     = info.Icd9codes.Split(',');
                    string   opredname = "";

                    for (int i = 0; i < opred.Length; i++)
                    {
                        for (int j = 0; j < ds_icd9.Tables[0].Rows.Count; j++)
                        {
                            if (opred[i] == ds_icd9.Tables[0].Rows[j][0].ToString())
                            {
                                opredname = ds_icd9.Tables[0].Rows[j][1].ToString();
                                ucICD9.setWidth(ucICD9.Width);
                                ucElement element = new ucElement(opredname, opred[i]);
                                ucICD9.createUser(element);
                                break;
                            }
                        }
                    }
                }
                if (info.Icd10codes != "")
                {
                    DataSet  dsIcd10  = App.GetDataSet("select code ,name  from diag_def_icd10");
                    string[] diag     = info.Icd10codes.Split(',');
                    string   diagName = "";
                    for (int i = 0; i < diag.Length; i++)
                    {
                        for (int j = 0; j < dsIcd10.Tables[0].Rows.Count; j++)
                        {
                            if (diag[i] == dsIcd10.Tables[0].Rows[j][0].ToString())
                            {
                                diagName = dsIcd10.Tables[0].Rows[j][1].ToString();
                                ucICD10.setWidth(ucICD10.Width);
                                ucElement element = new ucElement(diagName, diag[i]);
                                ucICD10.createUser(element);
                                break;
                            }
                        }
                    }
                }
                //是否主诊断
                if (info.Ismaindiag == "Y")
                {
                    checkMain.Checked = true;
                }
                else
                {
                    checkMain.Checked = false;
                }
                //默认参考时间
                cmbStartTime.Text = info.Startingtime;
                //首次默认时间
                txtDefaultDay.Text = info.Defaultdays;
                //随访方式
                if (info.Followtype != "")
                {
                    grpBoxDefineTime.Enabled = false;
                    int i = 0;
                    foreach (Object ob in cmbFollowTimeType.Items)
                    {
                        DataRowView drv   = ob as DataRowView;
                        string      value = drv["typename"].ToString();
                        if (value == info.Followtype)
                        {
                            cmbFollowTimeType.SelectedIndex = i;
                            break;
                        }
                        i++;
                    }
                }
                //添加循环方式
                else
                {
                    string   times;
                    string[] days = info.Definefollows.Split(',');
                    for (int i = 0; i < days.Length; i++)
                    {
                        int temp = i + 1;
                        times = "第" + temp + "次";
                        dgvDefineTime.Rows.Add(false, times, days[i]);
                    }
                }
                //
                if (info.FinishType != "")
                {
                    ckbEnd.Checked = true;
                    panel3.Enabled = true;
                    if (info.FinishType.IndexOf("年") != -1)
                    {
                        rbtnTime.Checked  = true;
                        rbtnTimes.Checked = false;
                        txtTime.Text      = info.FinishType.Substring(0, info.FinishType.IndexOf("年"));
                        cmbYMD2.Text      = "年";
                    }
                    else if (info.FinishType.IndexOf("月") != -1)
                    {
                        rbtnTime.Checked  = true;
                        rbtnTimes.Checked = false;
                        txtTime.Text      = info.FinishType.Substring(0, info.FinishType.IndexOf("月"));
                        cmbYMD2.Text      = "月";
                    }
                    else if (info.FinishType.IndexOf("日") != -1)
                    {
                        rbtnTime.Checked  = true;
                        rbtnTimes.Checked = false;
                        txtTime.Text      = info.FinishType.Substring(0, info.FinishType.IndexOf("日"));
                        cmbYMD2.Text      = "日";
                    }
                    else if (info.FinishType.IndexOf("次") != -1)
                    {
                        rbtnTime.Checked  = false;
                        rbtnTimes.Checked = true;
                        txtTimes.Text     = info.FinishType.Substring(0, info.FinishType.IndexOf("次"));
                    }
                }
                else
                {
                    panel3.Enabled = false;
                    ckbEnd.Checked = false;
                }
                //
                DataSet  ds_texttype = App.GetDataSet("select id,textname from t_follow_text where  enable_flag='Y'");
                string[] texttypes   = info.Followtextid.Split(',');
                txtFollowType.Tag = info.Followtextid;
                ///加载文书类型
                if (info.Followtextid != "")
                {
                    for (int i = 0; i < texttypes.Length; i++)
                    {
                        if (texttypes[i] == "")
                        {
                            break;
                        }
                        else
                        {
                            for (int j = 0; j < ds_texttype.Tables[0].Rows.Count; j++)
                            {
                                if (texttypes[i] == ds_texttype.Tables[0].Rows[j][0].ToString())
                                {
                                    if (txtFollowType.Text == "")
                                    {
                                        txtFollowType.Text = ds_texttype.Tables[0].Rows[j]["textname"].ToString();
                                    }
                                    else
                                    {
                                        txtFollowType.Text += "," + ds_texttype.Tables[0].Rows[j]["textname"].ToString();
                                    }
                                    break;
                                }
                            }
                        }
                    }
                }

                //是否有效复选框
                if (info.Isenable == "Y")
                {
                    rbtnValid.Checked = true;
                }
                else
                {
                    rbtnVain.Checked = true;
                }
                //创建时间
                dataTimeCreate.Value = Convert.ToDateTime(info.Createtime);
            }
        }