コード例 #1
0
        /// <summary>
        /// 增加患者干预
        /// </summary>
        /// <param name="_pcode"></param>
        /// <returns></returns>
        private bool addIntervene(PatientModel _pnt)
        {
            string diagnose = "";

            PageExport.getDiagnose(AppConst.db, _pnt.PatientCode, ref diagnose);

            DataTable tbl = new DataTable();

            if (!AppConst.db.GetRecordSet(string.Format(SQL.SEL_PNT_TPNITEM, _pnt.PatientCode), ref tbl))
            {
                BLPublic.Dialogs.Error("加载患者信息失败:" + AppConst.db.Error);
                return(false);
            }

            lvExpIntervene.Items.Add(new ExpIntervene()
            {
                PatientCode = _pnt.PatientCode,
                IDate       = DateTime.Now.ToString("yyyy-M-d"),
                HospitalNo  = _pnt.HospitalNo,
                SYZ         = _pnt.Diagnose,
                TND         = getTPNValue(tbl, "tpnitem.7"),  //葡萄糖浓度
                AJSND       = getTPNValue(tbl, "tpnitem.8"),  //氨基酸浓度
                DJZ         = getTPNValue(tbl, "tpnitem.4"),  //电解质
                RDB         = getTPNValue(tbl, "tpnitem.9"),  //热氮比
                TZB         = getTPNValue(tbl, "tpnitem.10"), //糖脂比
                YDS         = getTPNValue(tbl, "comp.7431"),  //胰岛素
                Drugs       = "",
                Dosage      = ""
            });
            tbl.Clear();

            return(true);
        }
コード例 #2
0
ファイル: MainWindow.xaml.cs プロジェクト: ewin66/wholePivas
        private void lvPatient_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            clearPatientInfo();

            if (null == lvPatient.SelectedItem)
            {
                return;
            }

            PatientModel pModel = (PatientModel)lvPatient.SelectedItem;

            //加载患者诊断
            if ((null == pModel.Diagnose) || pModel.Diagnose.Contains("失败:"))
            {
                string dig = "";
                PageExport.getDiagnose(this.db, pModel.PatientCode, ref dig);
                pModel.Diagnose = dig;
            }
            txtDiagnose.Text = pModel.Diagnose;

            //记载患者手术
            if ((null == pModel.Operate) || pModel.Operate.Contains("失败:"))
            {
                IDataReader dr = null;
                if (this.db.GetRecordSet(string.Format(SQL.SEL_PNTOP, pModel.PatientCode), ref dr))
                {
                    pModel.Operate = "";
                    while (dr.Read())
                    {
                        if (!string.IsNullOrWhiteSpace(pModel.Operate))
                        {
                            pModel.Operate += ",";
                        }

                        pModel.Operate += "[" + dr["StartTime"].ToString();
                        pModel.Operate += "-" + dr["EndTime"].ToString() + "]";
                        pModel.Operate += dr["OperateName"].ToString();
                    }

                    dr.Close();
                }
                else
                {
                    pModel.Operate = "加载患者手术失败:" + this.db.Error;
                }
            }

            pnlPatient.DataContext = pModel;

            if (!string.IsNullOrWhiteSpace(pModel.Operate))
            {
                pnlOperate.Visibility = Visibility.Collapsed;
            }

            if ((null != this.activePage) && (this.pageExport != this.activePage))
            {
                this.activePage.setPatient(pModel);
            }
        }