Example #1
0
        /// <summary>
        /// 新增笔记时刷新
        /// </summary>
        /// <param name="_content"></param>
        public void addNote(int _id, string _content)
        {
            this.tblOpRecord.Rows.Add(new object[] { "note", _id, this.patient.WardName,
                                                     this.patient.BedNo, this.patient.PatientName, DateTime.Now,
                                                     _content, ComClass.getEmpName(AppConst.LoginEmpCode) });

            lvRecord.Items.Refresh();
        }
Example #2
0
        /// <summary>
        /// 增加干预显示
        /// </summary>
        /// <param name="_objName"></param>
        /// <param name="_desc"></param>
        public void addIntervene(int _id, string _objName, string _desc, DateTime _time, string _empCode = null)
        {
            if (null == _empCode)
            {
                _empCode = AppConst.LoginEmpCode;
            }

            this.tblOpRecord.Rows.Add(new object[] { "intervene", _id, _time, _objName + "\r\n" + _desc,
                                                     ComClass.getEmpName(_empCode) });
        }
Example #3
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     if (0 < this.EditID)
     {
         loadCustody();
     }
     else
     {
         txtIntervener.Text = ComClass.getEmpName(AppConst.db, AppConst.LoginEmpCode);
     }
 }
Example #4
0
        /// <summary>
        /// 加载药师日记
        /// </summary>
        private void loadPMNote()
        {
            IDataReader dr = null;

            if (AppConst.db.GetRecordSet(string.Format(SQL.SEL_PM_NOTE, this.patient.PatientCode), ref dr))
            {
                BLPublic.BLDataReader bldr = new BLPublic.BLDataReader(dr);
                while (bldr.next())
                {
                    this.tblOpRecord.Rows.Add(new object[] { "note", bldr.getInt("NoteID"),
                                                             bldr.getDateTime("NoteTime"), bldr.getString("NoteContent"),
                                                             ComClass.getEmpName(bldr.getString("Noter")) });
                }
                dr.Close();
            }
            else
            {
                BLPublic.Dialogs.Error("加载笔记记录失败:" + AppConst.db.Error);
            }
        }
Example #5
0
        private void loadCustody()
        {
            DataTable tbl = new DataTable();

            if (!AppConst.db.GetRecordSet(string.Format(SQL.SEL_INTERVENE_BYID, this.EditID), ref tbl))
            {
                BLPublic.Dialogs.Error("加载干预失败:" + AppConst.db.Error);
                return;
            }

            txtIntervener.Text = "";
            if (0 < tbl.Rows.Count)
            {
                txtInterveneDesc.Text = tbl.Rows[0]["IntervenePlan"].ToString();
                txtIntervener.Text    = tbl.Rows[0]["Intervener"].ToString();
            }
            tbl.Clear();


            if (!AppConst.db.GetRecordSet(string.Format(SQL.SEL_INTERVENE_OBJ, this.EditID), ref tbl))
            {
                BLPublic.Dialogs.Error("加载干预对象失败:" + AppConst.db.Error);
                return;
            }

            BLPublic.BLDataReader bldr = new BLPublic.BLDataReader(tbl.CreateDataReader());
            while (bldr.next())
            {
                setObject(bldr.getString("ObjectType"), bldr.getString("ObjectCode"), bldr.getString("ObjectName"),
                          bldr.getString("ObjectValue"), bldr.getDateTime("ValueTime"));
            }
            bldr.close();
            tbl.Clear();

            if (!string.IsNullOrWhiteSpace(txtIntervener.Text))
            {
                txtIntervener.Text = ComClass.getEmpName(AppConst.db, txtIntervener.Text);
            }
        }
Example #6
0
        /// <summary>
        /// 加载药师日记
        /// </summary>
        private void loadPMNote()
        {
            string sql = "";

            if (true == cbAllPatient.IsChecked)
            {
                sql = string.Format(SQL.SEL_PM_NOTE_WPNT_BYDATE, ((DateTime)dpSDate.SelectedDate).ToString("yyyy-MM-dd"),
                                    ((DateTime)dpEDate.SelectedDate).AddDays(1).ToString("yyyy-MM-dd"));
            }
            else if (null == this.patient)
            {
                return;
            }
            else
            {
                sql = string.Format(SQL.SEL_PM_NOTE_WPNT_BYPNT, this.patient.PatientCode);
            }

            IDataReader dr = null;

            if (AppConst.db.GetRecordSet(sql, ref dr, true))
            {
                BLPublic.BLDataReader bldr = new BLPublic.BLDataReader(dr);
                while (bldr.next())
                {
                    this.tblOpRecord.Rows.Add(new object[] { "note", bldr.getInt("NoteID"),
                                                             bldr.getString("DeptName"), bldr.getString("BedNo"), bldr.getString("PatientName"),
                                                             bldr.getDateTime("NoteTime"), bldr.getString("NoteContent"),
                                                             ComClass.getEmpName(bldr.getString("Noter")) });
                }
                dr.Close();
            }
            else
            {
                BLPublic.Dialogs.Error("加载药师笔记失败:" + AppConst.db.Error);
            }
        }
Example #7
0
        /// <summary>
        /// 加载干预
        /// </summary>
        private void loadIntervene()
        {
            string sql = "";

            if (true == cbAllPatient.IsChecked)
            {
                sql = string.Format(SQL.SEL_INTERVENE_BYDATE, ((DateTime)dpSDate.SelectedDate).ToString("yyyy-MM-dd"),
                                    ((DateTime)dpEDate.SelectedDate).AddDays(1).ToString("yyyy-MM-dd"));
            }
            else if (null == this.patient)
            {
                return;
            }
            else
            {
                sql = string.Format(SQL.SEL_INTERVENE_BYPNT2, this.patient.PatientCode);
            }

            IDataReader dr = null;

            if (AppConst.db.GetRecordSet(sql, ref dr, true))
            {
                BLPublic.BLDataReader bldr = new BLPublic.BLDataReader(dr);
                string content             = "";
                while (bldr.next())
                {
                    content = WinInterveneEdit.getObjectStr(bldr.getInt("InterveneID")) + ". " + bldr.getString("IntervenePlan");

                    this.tblOpRecord.Rows.Add(new object[] { "intervene", bldr.getInt("InterveneID"),
                                                             bldr.getString("DeptName"), bldr.getString("BedNo"), bldr.getString("PatientName"),
                                                             bldr.getDateTime("InterveneTime"), content, ComClass.getEmpName(bldr.getString("Intervener")) });
                }
                dr.Close();
            }
            else
            {
                BLPublic.Dialogs.Error("加载干预失败:" + AppConst.db.Error);
            }
        }
Example #8
0
        /// <summary>
        /// 加载监护
        /// </summary>
        private void loadCustody()
        {
            string sql = "";

            if (true == cbAllPatient.IsChecked)
            {
                sql = string.Format(SQL.SEL_CUSTODY_BYDATE, ((DateTime)dpSDate.SelectedDate).ToString("yyyy-MM-dd"),
                                    ((DateTime)dpEDate.SelectedDate).AddDays(1).ToString("yyyy-MM-dd"));
            }
            else if (null == this.patient)
            {
                return;
            }
            else
            {
                sql = string.Format(SQL.SEL_CUSTODY_BYPNT2, this.patient.PatientCode);
            }

            DataTable tbl = null;

            if (AppConst.db.GetRecordSet(sql, ref tbl))
            {
                BLPublic.BLDataReader bldr = new BLPublic.BLDataReader(tbl.CreateDataReader());
                string content             = "";
                while (bldr.next())
                {
                    content = WinCustodyEdit.getObjectStr(bldr.getInt("CustodyID")) + ". " + bldr.getString("CustodyDesc");
                    if (!bldr.isNull("FinishTime"))
                    {
                        content += ". (已结束)";
                    }

                    this.tblOpRecord.Rows.Add(new object[] { "custody", bldr.getInt("CustodyID"),
                                                             bldr.getString("DeptName"), bldr.getString("BedNo"), bldr.getString("PatientName"),
                                                             bldr.getDateTime("CustodyTime"), content, ComClass.getEmpName(bldr.getString("Custodyer")) });
                }

                bldr.close();
                tbl.Clear();
            }
            else
            {
                BLPublic.Dialogs.Error("加载监护失败:" + AppConst.db.Error);
            }
        }