예제 #1
0
        private void btnOK_Click(object sender, EventArgs e)
        {
            int num = 0;//末日次数

            if (this.radioButton1.Checked)
            {
                num = -1;
            }
            else
            {
                num = Convert.ToInt16(this.numericUpDown1.Value);
            }
            //修改末日次数还没做(babyid)
            FrmChgTemiTimes fce = new FrmChgTemiTimes(patlist, num);

            fce.ShowDialog();
            if (!fce.isOK)
            {
                return;
            }
            DataTable groupTb = fce.groupTb;

            HIS.Model.ZY_DOC_ORDERRECORD record = new HIS.Model.ZY_DOC_ORDERRECORD();
            record.ORDER_DOC     = userid;
            record.ORDER_CONTENT = "病人死亡";
            record.ORDER_BDATE   = Convert.ToDateTime(this.dateTimePicker1.Value.ToString());
            record.OPRERATOR     = userid;
            record.EXEC_DEPT     = deptid;
            record.PRES_DEPTID   = deptid;
            patlist.Out_Flag     = 3;
            patlist.OutDate      = Convert.ToDateTime(this.dateTimePicker1.Value.ToString());
            patlist.OutDiagnName = this.txtdiag.Text.Trim();
            List <HIS.Model.ZY_DOC_ORDERRECORD> records = new List <HIS.Model.ZY_DOC_ORDERRECORD>();

            //停所有长嘱
            for (int i = 0; i < groupTb.Rows.Count; i++)
            {
                HIS.Model.ZY_DOC_ORDERRECORD order = new HIS.Model.ZY_DOC_ORDERRECORD();
                order               = (HIS.Model.ZY_DOC_ORDERRECORD)HIS.SYSTEM.PubicBaseClasses.ApiFunction.DataTableToObject(groupTb, i, order);
                order.EORDER_DOC    = userid;
                order.EORDER_DATE   = Convert.ToDateTime(this.dateTimePicker1.Value);
                order.TEMINAL_TIMES = Convert.ToInt32(groupTb.Rows[i]["teminal_times"].ToString());
                order.STATUS_FALG   = 3;
                records.Add(order);
            }
            orderop.records = records;
            if (orderop.Death(record, patlist))
            {
                MessageBox.Show("生成死亡医嘱正确");
                this.isDefineDeath = true;
                this.Close();
            }
            else
            {
                MessageBox.Show("生成死亡医嘱错误!请重试");
                this.Close();
            }
        }
예제 #2
0
        private void btnYes_Click(object sender, EventArgs e)
        {
            int num = 0;

            if (this.radDefault.Checked)
            {
                num = -1;
            }
            else
            {
                num = Convert.ToInt16(this.NumUpDown.Value);
            }
            FrmChgTemiTimes fce = new FrmChgTemiTimes(patlist, num);

            fce.ShowDialog();
            if (!fce.isOK)
            {
                return;
            }
            DataTable groupTb = fce.groupTb;
            //停医嘱
            List <HIS.Model.ZY_DOC_ORDERRECORD> records = new List <HIS.Model.ZY_DOC_ORDERRECORD>();

            for (int i = 0; i < groupTb.Rows.Count; i++)
            {
                HIS.Model.ZY_DOC_ORDERRECORD order = new HIS.Model.ZY_DOC_ORDERRECORD();
                order               = (HIS.Model.ZY_DOC_ORDERRECORD)HIS.SYSTEM.PubicBaseClasses.ApiFunction.DataTableToObject(groupTb, i, order);
                order.EORDER_DOC    = userid;
                order.EORDER_DATE   = HIS.SYSTEM.PubicBaseClasses.XcDate.ServerDateTime;
                order.TEMINAL_TIMES = Convert.ToInt32(groupTb.Rows[i]["teminal_times"].ToString());
                order.STATUS_FALG   = 3;
                records.Add(order);
            }
            HIS.ZYDoc_BLL.OrderInfo.IOrderOP orderop = new HIS.ZYDoc_BLL.OrderInfo.OrderOperation();
            orderop.records = records;
            if (orderop.StopAll())
            {
                MessageBox.Show("停医嘱成功!");
                isDefineStop = true;
                this.Close();
            }
            else
            {
                MessageBox.Show("停医嘱错误!");
                this.Close();
            }
        }
예제 #3
0
        private void button1_Click(object sender, EventArgs e)
        {
            if (this.deptid == Convert.ToInt64(this.cbDept.SelectedValue))
            {
                MessageBox.Show("不允许本科室转本科室!请重新选择科室。");
                return;
            }
            int num = 0;//末日次数

            if (this.radioButton1.Checked)
            {
                num = -1;
            }
            else
            {
                num = Convert.ToInt16(this.numericUpDown1.Value);
            }
            FrmChgTemiTimes fce = new FrmChgTemiTimes(patlist, num);

            fce.ShowDialog();
            if (!fce.isOK)
            {
                return;
            }
            DataTable groupTb = fce.groupTb;
            string    content = "转" + this.cbDept.Text.Trim();

            if (HIS.ZYDoc_BLL.PatInfo.PatOperation.GetNewPatModel(patlist.PatListID).CurrDeptCode != this.deptid.ToString())
            {
                MessageBox.Show("该病人已经不在本科室,请确认!");
                return;
            }
            if (HIS.ZYDoc_BLL.PatInfo.PatOperation.IsTurnDept(patlist.PatListID))
            {
                MessageBox.Show("该病人已存在转科记录,请确认!");
                return;
            }
            HIS.Model.ZY_DOC_ORDERRECORD record = new HIS.Model.ZY_DOC_ORDERRECORD();
            record.PATID         = patlist.PatListID;
            record.PAT_DEPTID    = Convert.ToInt32(patlist.CurrDeptCode);
            record.PRES_DEPTID   = deptid;
            record.ORDER_DOC     = userid;
            record.ORDER_BDATE   = Convert.ToDateTime(this.dateTimePicker2.Value.ToString());
            record.ORDER_CONTENT = content;
            record.OPRERATOR     = userid;
            record.EXEC_DEPT     = deptid;

            HIS.Model.ZY_DOC_TRANSDEPT transdept = new HIS.Model.ZY_DOC_TRANSDEPT();
            transdept.PATID         = patlist.PatListID;
            transdept.ORIGE_DEPT    = Convert.ToInt32(patlist.CurrDeptCode);
            transdept.GET_DEPT      = Convert.ToInt32(this.cbDept.SelectedValue);
            transdept.TRANSFER_DATE = Convert.ToDateTime(this.dateTimePicker2.Value.ToString());
            transdept.OPERATOR      = this.userid;
            transdept.DESCRIPTION   = content;
            transdept.BABY_ID       = 0;
            transdept.FINISH_FLAG   = 0;
            List <HIS.Model.ZY_DOC_ORDERRECORD> records = new List <HIS.Model.ZY_DOC_ORDERRECORD>();

            for (int i = 0; i < groupTb.Rows.Count; i++)
            {
                HIS.Model.ZY_DOC_ORDERRECORD order = new HIS.Model.ZY_DOC_ORDERRECORD();
                order               = (HIS.Model.ZY_DOC_ORDERRECORD)HIS.SYSTEM.PubicBaseClasses.ApiFunction.DataTableToObject(groupTb, i, order);
                order.EORDER_DOC    = userid;
                order.EORDER_DATE   = Convert.ToDateTime(this.dateTimePicker2.Value.ToString());
                order.TEMINAL_TIMES = Convert.ToInt32(groupTb.Rows[i]["teminal_times"].ToString());
                order.STATUS_FALG   = 3;
                records.Add(order);
            }
            orderop.records = records;
            if (orderop.TurnDept(record, transdept))
            {
                MessageBox.Show("转科申请成功");
                this.isTransferDept = true;
                this.Close();
            }
            else
            {
                MessageBox.Show("转科申请失败");
                this.Close();
            }
        }
예제 #4
0
        private void btnOk_Click(object sender, EventArgs e)
        {
            //babyid没判断
            DateTime serverDateTime = HIS.SYSTEM.PubicBaseClasses.XcDate.ServerDateTime;

            if (this.cbOut.SelectedItem == null)
            {
                MessageBox.Show("请选择‘出院情况’!");
                return;
            }
            int num = 0;//末日次数

            if (this.radioButton1.Checked)
            {
                num = -1;
            }
            else
            {
                num = Convert.ToInt16(this.numericUpDown1.Value);
            }

            FrmChgTemiTimes fce = new FrmChgTemiTimes(patlist, num);

            fce.ShowDialog();
            if (!fce.isOK)
            {
                return;
            }
            DataTable groupTb = fce.groupTb;
            string    str     = "";

            if (this.dTimePicker1.Value.Date <= serverDateTime.Date)
            {
                str = "今日";
            }
            else if (this.dTimePicker1.Value.Date == serverDateTime.Date.AddDays(1))
            {
                str = "明日";
            }
            else if (this.dTimePicker1.Value.DayOfWeek == DayOfWeek.Monday)
            {
                str = "星期一";
            }
            else
            {
                str = this.dTimePicker1.Value.Month.ToString() + "月" + this.dTimePicker1.Value.Day.ToString() + "日";
            }
            patlist.Out_Flag     = this.cbOut.SelectedIndex;
            patlist.OutDate      = Convert.ToDateTime(this.dTimePicker1.Value.Date.ToString());
            patlist.OutDiagnName = this.txtxy.Text.Trim();
            if (txtxy.MemberValue != null) //20100507.0.01
            {
                patlist.OutDiagnCode = txtxy.MemberValue.ToString();
            }
            HIS.Model.ZY_DOC_ORDERRECORD record = new HIS.Model.ZY_DOC_ORDERRECORD();
            record.PRES_DEPTID   = deptid;
            record.ORDER_DOC     = userid;
            record.ORDER_BDATE   = dTimePicker1.Value.Date <= serverDateTime.Date ? dTimePicker1.Value : serverDateTime;
            record.ORDER_CONTENT = str + "病人出院";
            record.OPRERATOR     = userid;
            record.EXEC_DEPT     = deptid;
            List <HIS.Model.ZY_DOC_ORDERRECORD> records = new List <HIS.Model.ZY_DOC_ORDERRECORD>();

            for (int i = 0; i < groupTb.Rows.Count; i++)
            {
                HIS.Model.ZY_DOC_ORDERRECORD order = new HIS.Model.ZY_DOC_ORDERRECORD();
                order               = (HIS.Model.ZY_DOC_ORDERRECORD)HIS.SYSTEM.PubicBaseClasses.ApiFunction.DataTableToObject(groupTb, i, order);
                order.EORDER_DOC    = userid;
                order.EORDER_DATE   = Convert.ToDateTime(this.dTimePicker1.Value);
                order.TEMINAL_TIMES = Convert.ToInt32(groupTb.Rows[i]["teminal_times"].ToString());
                order.STATUS_FALG   = 3;
                records.Add(order);
            }
            orderop.records = records;
            if (orderop.Leave(record, patlist))
            {
                isDefineOut = true;
                MessageBox.Show("出院申请成功");
                this.Close();
            }
            else
            {
                MessageBox.Show("出院申请失败!请重试!");
                this.Close();
            }
        }