Пример #1
0
        private void btnAdd_Click(object sender, EventArgs e)
        {
            frmAidChooseDoct frm = new frmAidChooseDoct();

            frm.EmpTypeId = 3;
            if (frm.ShowDialog() == DialogResult.OK)
            {
                // 可能是多个医生ID
                DataTable          dt        = null;
                string[]           doctIdArr = frm.DoctIDArr.Replace("'", "").Split(',');
                clsBIHOrderService svc       = new clsDcl_GetSvcObject().m_GetOrderSvcObject();
                foreach (string doctId in doctIdArr)
                {
                    dt = svc.GetEmployeeByEmpId(doctId);
                    if (dt != null && dt.Rows.Count > 0)
                    {
                        ListViewItem lvi = null;
                        foreach (DataRow dr2 in dt.Rows)
                        {
                            lvi = new ListViewItem(dr2["deptname_vchr"].ToString());
                            lvi.SubItems.Add(dr2["lastname_vchr"].ToString());
                            lvi.SubItems.Add(dr2["deptid_chr"].ToString());
                            lvi.SubItems.Add(dr2["empid_chr"].ToString());
                            this.lvExperts.Items.Add(lvi);
                        }
                    }
                }
            }
        }
Пример #2
0
        /// <summary>
        /// Init
        /// </summary>
        void Init()
        {
            this.lblPatName.Text    = this.patVo.m_strPatientName;
            this.lsvItemICD.Height  = 0;
            this.lsvItemPath.Height = 0;
            this.lsvItemSyn.Height  = 0;

            clsBIHOrderService svc      = new clsDcl_GetSvcObject().m_GetOrderSvcObject();
            string             deptCode = svc.GetCpDeptCode(patVo.m_strDeptID);

            //deptCode = "0327";
            PathDataSource = svc.GetCpListByDeptCode(deptCode);
            SynDataSource  = svc.GetSyndrome();

            if (PathDataSource != null && PathDataSource.Rows.Count > 0)
            {
                PathDataSourceFilter = PathDataSource.Clone();
                PathDataSourceFilter.BeginLoadData();
                List <string> lstCpId = new List <string>();
                foreach (DataRow dr in PathDataSource.Rows)
                {
                    if (lstCpId.IndexOf(dr["cpid"].ToString()) < 0)
                    {
                        lstCpId.Add(dr["cpid"].ToString());
                        PathDataSourceFilter.LoadDataRow(dr.ItemArray, true);
                    }
                }
                PathDataSourceFilter.EndLoadData();
            }
        }
Пример #3
0
 /// <summary>
 /// 查询
 /// </summary>
 void Query()
 {
     try
     {
         if (this.dtmBegin.Text.Trim() == "" || this.dtmEnd.Text.Trim() == "")
         {
             MessageBox.Show("请输入查询开始时间和结束时间", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
             return;
         }
         DateTime beginTime = Convert.ToDateTime(this.dtmBegin.Text + " 00:00:00");
         DateTime endTime   = Convert.ToDateTime(this.dtmEnd.Text + " 23:59:59");
         if (beginTime > endTime)
         {
             MessageBox.Show("开始时间不能大于结束时间", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
             return;
         }
         this.Cursor = Cursors.WaitCursor;
         string areaId = (this.bizType == 1 ? "" : this.LoginInfo.m_strInpatientAreaID);
         using (clsBIHOrderService svc = new clsDcl_GetSvcObject().m_GetOrderSvcObject())
         {
             DataSource = svc.GetPretestMed(beginTime.ToString("yyyy-MM-dd HH:mm:ss"), endTime.ToString("yyyy-MM-dd HH:mm:ss"), areaId);
             this.dgvData.DataSource = DataSource;
             this.SetRowBackColor();
         }
         DataSourceDept.Clear();
         this.cboDept.Items.Clear();
         List <string> lstDeptId = new List <string>();
         if (DataSource != null && DataSource.Count > 0)
         {
             DataSourceDept.Add(new EntityDept()
             {
                 deptId = "00", deptName = "全 院"
             });
             EntityDept vo = null;
             foreach (EntityPretestMed item in DataSource)
             {
                 vo          = new EntityDept();
                 vo.deptId   = item.deptId;
                 vo.deptName = item.deptName;
                 if (lstDeptId.IndexOf(vo.deptId) < 0)
                 {
                     lstDeptId.Add(vo.deptId);
                     DataSourceDept.Add(vo);
                 }
             }
         }
         foreach (EntityDept item in DataSourceDept)
         {
             this.cboDept.Items.Add(item.deptName);
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Пример #4
0
        /// <summary>
        /// Init
        /// </summary>
        void Init()
        {
            this.lsvItemPath.Height = 0;

            clsBIHOrderService svc = new clsDcl_GetSvcObject().m_GetOrderSvcObject();
            DataTable          tmp = svc.GetCpExecPlan(this.patVo.m_strRegisterID);

            ExecPlanDataSource = tmp.Rows[0];
            string deptCode = svc.GetCpDeptCode(patVo.m_strDeptID);

            //deptCode = "0327";
            PathDataSource = svc.GetCpListByDeptCode(deptCode);
            VarDataSource  = svc.GetCpVariation(Convert.ToInt32(this.ExecPlanDataSource["cpid"].ToString()));
            GetHistory(svc.GetCpExecVarList(Convert.ToDecimal(this.ExecPlanDataSource["execid"].ToString())));
            if (PathDataSource != null && PathDataSource.Rows.Count > 0)
            {
                PathDataSourceFilter = PathDataSource.Clone();
                PathDataSourceFilter.BeginLoadData();
                List <string> lstCpId = new List <string>();
                foreach (DataRow dr in PathDataSource.Rows)
                {
                    if (lstCpId.IndexOf(dr["cpid"].ToString()) < 0)
                    {
                        lstCpId.Add(dr["cpid"].ToString());
                        PathDataSourceFilter.LoadDataRow(dr.ItemArray, true);
                    }
                }
                PathDataSourceFilter.EndLoadData();
            }

            this.clstTarget.Items.Clear();
            if (VarDataSource != null && VarDataSource.Rows.Count > 0)
            {
                foreach (DataRow dr in VarDataSource.Rows)
                {
                    this.clstTarget.Items.Add(dr["varinfo"].ToString());
                }
            }

            this.lblCpName.Text   = this.ExecPlanDataSource["cpname"].ToString();
            this.lblDeptName.Text = this.patVo.m_strDeptName;
            this.lblBedNo.Text    = this.patVo.m_strBedName + "床";
            this.lblPatName.Text  = this.patVo.m_strPatientName;
            this.lblIpNo.Text     = this.patVo.m_strInHospitalNo;
        }
Пример #5
0
 /// <summary>
 /// Delete
 /// </summary>
 void Delete()
 {
     if (this.txtMedName.Tag == null)
     {
         SetData(null, null);
     }
     else
     {
         EntityBihSadcApply applyVo = this.txtMedName.Tag as EntityBihSadcApply;
         if (applyVo.status > 0)
         {
             MessageBox.Show("申请已经通过审核,不能删除。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
             return;
         }
         if (MessageBox.Show("删除前请再次确认?", "系统提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
         {
             try
             {
                 this.Cursor = Cursors.WaitCursor;
                 clsBIHOrderService svc = new clsDcl_GetSvcObject().m_GetOrderSvcObject();
                 int ret = svc.CancelSadcApply(applyVo.applyid);
                 svc = null;
                 if (ret > 0)
                 {
                     this.GetHistory();
                     SetData(null, null);
                     MessageBox.Show("删除成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                 }
                 else
                 {
                     MessageBox.Show("删除失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                 }
             }
             catch (Exception ex)
             {
                 MessageBox.Show(ex.Message, "删除异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
             }
             finally
             {
                 this.Cursor = Cursors.Default;
             }
         }
     }
 }
Пример #6
0
 /// <summary>
 /// Load
 /// </summary>
 void LoadData(decimal applyId)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         DataTable          dtMain     = null;
         DataTable          dtResponse = null;
         clsBIHOrderService svc        = new clsDcl_GetSvcObject().m_GetOrderSvcObject();
         svc.GetSadcRecord(applyId, out dtMain, out dtResponse);
         if (dtMain != null && dtMain.Rows.Count > 0)
         {
             DataRow dr = dtMain.Rows[0];
             SetData(dr, dtResponse);
         }
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
Пример #7
0
        /// <summary>
        /// Save2
        /// </summary>
        void Save2()
        {
            if (this.txtPathName.Text.Trim() == string.Empty || this.txtPathName.Tag == null)
            {
                MessageBox.Show("请选择路径(名称)", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.txtPathName.Focus();
                return;
            }
            DataRow            dr    = this.txtPathName.Tag as DataRow;
            int                isFit = this.rdoYes.Checked ? 1 : 0;
            clsBIHOrderService svc   = new clsDcl_GetSvcObject().m_GetOrderSvcObject();

            if (svc.SaveIsFitCp(patVo.m_strRegisterID, isFit, dr["cpname"].ToString()) > 0)
            {
                MessageBox.Show("保存成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            else
            {
                MessageBox.Show("保存失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Пример #8
0
        private void bintheChargeList(DataView myDataView)
        {
            m_dtvOrderdicCharge.Rows.Clear();
            double m_intChargeSum = 0;
            double QTY_INT = 0, MinPrice = 0;

            if (myDataView.Count > 0)
            {
                QTY_INT  = 0;
                MinPrice = 0;
                for (int i = 0; i < myDataView.Count; i++)
                {
                    DataRowView row = myDataView[i];

                    m_dtvOrderdicCharge.Rows.Add();
                    DataGridViewRow m_dgvRow = m_dtvOrderdicCharge.Rows[m_dtvOrderdicCharge.RowCount - 1];
                    m_dgvRow.Cells["itemCode"].Value = row["ITEMCODE_VCHR"].ToString();
                    m_dgvRow.Cells["ItemName"].Value = row["ItemName"].ToString();
                    if (row["IsChiefItem"].ToString().Trim().Equals("1"))
                    {
                        m_dgvRow.Cells["IsChiefItem"].Value = "主";
                    }
                    else
                    {
                        m_dgvRow.Cells["IsChiefItem"].Value = "";
                    }
                    m_dgvRow.Cells["QTY_INT"].Value = row["QTY_INT"].ToString();
                    if (row["ipcurrentgross_num"].ToString().Trim() == "")
                    {
                        m_dgvRow.Cells["QTY_INT"].Value = 0;
                    }
                    else
                    {
                        m_dgvRow.Cells["QTY_INT"].Value = row["ipcurrentgross_num"].ToString().Trim();
                    }
                    double.TryParse(row["QTY_INT"].ToString(), out QTY_INT);
                    double.TryParse(row["MinPrice"].ToString(), out MinPrice);
                    m_dgvRow.Cells["DOSAGE_DEC"].Value     = row["DOSAGE_DEC"].ToString();
                    m_dgvRow.Cells["DOSAGEUNIT_CHR"].Value = row["DOSAGEUNIT_CHR"].ToString();
                    m_dgvRow.Cells["ITEMIPUNIT_CHR"].Value = row["ITEMIPUNIT_CHR"].ToString();
                    m_dgvRow.Cells["ITEMSPEC_VCHR"].Value  = row["ITEMSPEC_VCHR"].ToString().Trim();
                    m_dgvRow.Cells["MinPrice"].Value       = row["MinPrice"].ToString();
                    if (row["itemsrctype_int"].ToString().Trim().Equals("1") && row["IPNOQTYFLAG_INT"].ToString().Trim().Equals("1"))
                    {
                        m_dgvRow.Cells["IPNOQTYFLAG_INT"].Value = "缺药";
                        m_dgvRow.DefaultCellStyle.ForeColor     = System.Drawing.Color.Red;
                    }
                    m_dgvRow.Cells["MinPrice"].Value                  = row["MinPrice"].ToString();
                    m_dgvRow.Cells["MedicareTypeName"].Value          = row["MedicareTypeName"].ToString();
                    m_dgvRow.Cells["orderdicid_chr"].Value            = row["orderdicid_chr"].ToString();
                    m_dgvRow.Cells["MEDICINEPREPTYPENAME_VCHR"].Value = row["MEDICINEPREPTYPENAME_VCHR"].ToString();

                    if (row["IFSTOP_INT"].ToString().Trim().Equals("1"))//1停用,0-正常
                    {
                        m_dgvRow.Cells["IFSTOP_INT"].Value  = "停";
                        m_dgvRow.DefaultCellStyle.ForeColor = SystemColors.Control;
                    }
                    else
                    {
                        m_dgvRow.Cells["IFSTOP_INT"].Value = "";
                    }

                    m_dgvRow.Cells["expenselimit_mny"].Value = row["expenselimit_mny"].ToString();
                    //
                    string             m_strPrecent_dec = "";
                    clsBIHOrderService m_objService     = new clsDcl_GetSvcObject().m_GetOrderSvcObject();
                    m_objService.m_lngGetChargeItemPrecent(row["itemid_chr"].ToString(), strPayType, out m_strPrecent_dec);
                    m_dgvRow.Cells["precent_dec"].Value = m_strPrecent_dec + "%";

                    /*
                     * ItemName  收费项
                     * IsChiefItem 主
                     * QTY_INT  数量
                     * DOSAGE_DEC 剂量
                     * DOSAGEUNIT_CHR 剂量单位
                     * ITEMIPUNIT_CHR 住院单位
                     * ITEMSPEC_VCHR  规格
                     * MinPrice       单价
                     * IPNOQTYFLAG_INT  药库
                     * orderdicid_chr
                     */

                    m_intChargeSum += QTY_INT * MinPrice;
                }
                this.m_lblChargeSum.Text = m_intChargeSum.ToString("0.00");
            }
        }
Пример #9
0
        /// <summary>
        /// Confirm
        /// </summary>
        void Confirm()
        {
            if (this.txtMedName.Tag == null)
            {
                MessageBox.Show("手术申请还未保存,不能审核。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            EntityBihSadcApply applyVo = this.txtMedName.Tag as EntityBihSadcApply;

            applyVo.drugname         = this.txtMedName.Text.Trim();
            applyVo.pathcheck        = this.chkYes.Checked ? 1 : 0;
            applyVo.pathdesc         = this.txtNoDesc.Text.Trim();
            applyVo.clinicdiag       = this.txtDiag.Text.Trim();
            applyVo.medhistory       = this.txtIllNess.Text.Trim();
            applyVo.applyreason      = this.txtApplyDesc.Text.Trim();
            applyVo.applyopername    = this.txtApplyDoct.Text.Trim();
            applyVo.applydate        = this.dtpApplyDate.Value;
            applyVo.directoropinion  = this.txtConfirmDesc.Text.Trim();
            applyVo.directorname     = this.txtConfirmDoct.Text.Trim();
            applyVo.directorsigndate = this.dtpConfirmDate.Value;

            List <EntityBihSadcExperts> lstExperts = new List <EntityBihSadcExperts>();

            if (this.lvExperts.Items.Count == 0)
            {
                MessageBox.Show("邀请专家不能为空", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }
            else
            {
                EntityBihSadcExperts expertVo = null;
                for (int i = 0; i < this.lvExperts.Items.Count; i++)
                {
                    if (this.lvExperts.Items[i].Tag == null)
                    {
                        expertVo            = new EntityBihSadcExperts();
                        expertVo.deptname   = this.lvExperts.Items[i].SubItems[0].Text;
                        expertVo.expertname = this.lvExperts.Items[i].SubItems[1].Text;
                        expertVo.deptid     = this.lvExperts.Items[i].SubItems[2].Text;
                        expertVo.expertid   = this.lvExperts.Items[i].SubItems[3].Text;
                    }
                    else
                    {
                        expertVo = this.lvExperts.Items[i].Tag as EntityBihSadcExperts;
                    }
                    lstExperts.Add(expertVo);
                }
            }
            if (applyVo.drugname == string.Empty)
            {
                MessageBox.Show("抗菌药物通用名不能为空", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.txtMedName.Focus();
                return;
            }
            if (applyVo.applyreason == string.Empty)
            {
                MessageBox.Show("申请理由不能为空", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.txtApplyDesc.Focus();
                return;
            }
            if (applyVo.applyopername == string.Empty)
            {
                MessageBox.Show("申请人不能为空", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.txtApplyDoct.Focus();
                return;
            }
            if (applyVo.applydate <= Convert.ToDateTime("2018-01-01 00:00:00"))
            {
                MessageBox.Show("申请日期不能小于2018-01-01", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.dtpApplyDate.Focus();
                return;
            }
            if (applyVo.directorname == string.Empty)
            {
                MessageBox.Show("审核人不能为空", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.txtConfirmDoct.Focus();
                return;
            }
            if (applyVo.directoropinion == string.Empty)
            {
                MessageBox.Show("科主任审核意见不能为空", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.txtConfirmDesc.Focus();
                return;
            }
            if (applyVo.directorsigndate <= Convert.ToDateTime("2018-01-01 00:00:00"))
            {
                MessageBox.Show("审核日期不能小于2018-01-01", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.dtpConfirmDate.Focus();
                return;
            }

            try
            {
                decimal  applyId  = 0;
                DateTime openDate = DateTime.Now;
                this.Cursor = Cursors.WaitCursor;
                clsBIHOrderService svc = new clsDcl_GetSvcObject().m_GetOrderSvcObject();
                applyVo.applyopername = applyVo.applyopername.Replace("主任医师", "").Replace("副主任医师", "").Replace("主治医师", "").Replace("医师", "");
                applyVo.applyoperid   = svc.GetEmployeeId(applyVo.applyopername.Trim());
                DataTable dt = svc.GetEmployeeByEmpId(applyVo.applyoperid);
                if (dt != null && dt.Rows.Count > 0)
                {
                    applyVo.applydeptid   = dt.Rows[0]["deptid_chr"].ToString();
                    applyVo.applydeptname = dt.Rows[0]["deptname_vchr"].ToString();
                }
                if (string.IsNullOrEmpty(applyVo.applydeptid))
                {
                    applyVo.applydeptid = LoginInfo.m_strDepartmentID;
                }
                if (string.IsNullOrEmpty(applyVo.applydeptname))
                {
                    applyVo.applydeptname = LoginInfo.m_strdepartmentName;
                }
                applyVo.directorname = applyVo.directorname.Replace("主任医师", "").Replace("副主任医师", "").Replace("主治医师", "").Replace("医师", "");
                applyVo.directorid   = svc.GetEmployeeId(applyVo.directorname.Trim());
                int ret = svc.SaveSadcApply(applyVo, lstExperts, out applyId);
                svc = null;
                if (ret > 0)
                {
                    MessageBox.Show("审核成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
                else
                {
                    MessageBox.Show("审核失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "审核异常", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Пример #10
0
        /// <summary>
        /// 打印带药处方
        /// </summary>
        /// <returns></returns>
        public clsOutpatientPrintRecipe_VO PrintRecipeData()
        {
            string             registerId = patVo.m_strRegisterID;
            clsBIHOrderService svc        = new clsDcl_GetSvcObject().m_GetOrderSvcObject();
            DataTable          dtPat      = svc.GetOutPatient(patVo.m_strPatientID);
            int      rowNo    = 0;
            decimal  totalMny = 0;
            DataView dvMed    = new DataView(dtMed);
            clsOutpatientPrintRecipe_VO       vo      = null;
            clsOutpatientPrintRecipeDetail_VO subItem = null;

            #region 主信息

            DataRow drPat = dtPat.Rows[0];
            vo = new clsOutpatientPrintRecipe_VO();
            vo.stroutpatrecipeMoney     = "";
            vo.m_strMatCost             = "";
            vo.m_strTimes               = "";
            vo.m_strHerbalmedicineUsage = "";
            vo.strCheckName             = "";
            vo.strDosageName            = "";
            vo.strMedMoney              = "";
            vo.strInvoiceNO             = "/";
            vo.m_strPhotoNo             = patVo.m_strHOMEPHONE_VCHR;
            vo.m_strAge         = patVo.m_strAge;
            vo.m_strIDcardno    = drPat["idcard_chr"].ToString();
            vo.strCheckOutName  = "";
            vo.m_strCardID      = patVo.m_strInHospitalNo; // 住院号
            vo.m_strRecipePrice = "";
            vo.m_strPatientType = patVo.m_strPayTypeName;
            vo.m_strPrintDate   = DateTime.Now.ToShortDateString();
            vo.m_strRecipeID    = "00000000" + DateTime.Now.ToString("yyMMddHHmm");
            vo.m_strSerNO       = "";
            vo.m_intRecipeCount = 1;

            vo.m_strRecipeDate    = "";
            vo.m_strSex           = patVo.m_strSex;
            vo.m_strPatientName   = patVo.m_strPatientName;
            vo.m_strdiagnose      = patVo.m_strDiagnose;
            vo.m_strAddress       = drPat["homeaddress_vchr"].ToString();
            vo.m_strHospitalName  = "";
            vo.m_strGOVCARD       = drPat["govcard_chr"].ToString();
            vo.m_strDiagDrName    = patVo.m_strDOCTOR_VCHR;
            vo.m_strDiagDeptID    = patVo.m_strDeptName + "(" + patVo.m_strBedName + "床)";
            vo.m_strINSURANCEID   = drPat["insuranceid_vchr"].ToString();
            vo.objPRDArr          = new System.Collections.ArrayList();
            vo.strSendMedStorage  = "";
            vo.m_strSendMedWindow = "";
            vo.strOutpatrecipeNO  = registerId;
            vo.objPRDArr2         = new System.Collections.ArrayList();
            vo.objPRDArr3         = new System.Collections.ArrayList();
            vo.objTreatArr        = new ArrayList();

            #endregion

            bool isCM = false;
            if (this.chk1.Checked)
            {
                vo.m_strRectype = "普通";
                dvMed.RowFilter = "medicinetypeid_chr = '2'";
            }
            else if (this.chk2.Checked)
            {
                isCM            = true;
                vo.m_strRectype = "中药";
                dvMed.RowFilter = "medicinetypeid_chr = '1' and recipeno_int = " + this.cboZyRecipeNo.Text;
            }
            else if (this.chk3.Checked)
            {
                vo.m_strRectype = "易制毒";
                dvMed.RowFilter = "ispoison_chr = '1'";
            }
            else if (this.chk4.Checked)
            {
                vo.m_strRectype = "麻醉";
                dvMed.RowFilter = "isanaesthesia_chr = '1'";
            }
            else if (this.chk5.Checked)
            {
                vo.m_strRectype = "精神一类";
                dvMed.RowFilter = "ischlorpromazine_chr = '1'";
            }
            else if (this.chk6.Checked)
            {
                vo.m_strRectype = "精神二类";
                dvMed.RowFilter = "ischlorpromazine2_chr = '1'";
            }
            else if (this.chk7.Checked)
            {
                vo.m_strRectype = "儿科";
                dvMed.RowFilter = "medicinetypeid_chr = '2'";
            }

            if (dvMed.Count > 0)
            {
                // 出院带药: 存在别医师代替管床医师开药情况,处方上医师需改用"开单医师(提交人)" 。
                if (dvMed[0]["poster_chr"] != DBNull.Value && dvMed[0]["poster_chr"].ToString().Trim() != string.Empty)
                {
                    patVo.m_strDOCTOR_VCHR = dvMed[0]["poster_chr"].ToString().Trim();
                }
            }

            #region 西药

            if (isCM == false)
            {
                vo.m_strRecipeDate   = Convert.ToDateTime(dvMed[0]["postdate_dat"].ToString()).ToString("yyyy-MM-dd");
                vo.strSendMedStorage = "中心药房";
                rowNo    = 0;
                totalMny = 0;
                for (int i = 0; i < dvMed.Count; i++)
                {
                    DataRowView drv = dvMed[i];
                    subItem = new clsOutpatientPrintRecipeDetail_VO();
                    // 西药
                    subItem.m_strDosageUnit    = drv["dosageunit_chr"].ToString();
                    subItem.m_strChargeName    = drv["medicinename_vchr"].ToString();
                    subItem.m_strMEDNORMALNAME = drv["mednormalname_vchr"].ToString();
                    subItem.m_strCount         = drv["get_dec"].ToString();
                    subItem.m_strDays          = drv["outgetmeddays_int"].ToString();
                    subItem.m_strDosage        = drv["dosage_dec"].ToString();
                    subItem.m_strFrequency     = drv["execfreqname_chr"].ToString().Trim();
                    subItem.m_strSpec          = drv["spec_vchr"].ToString();
                    subItem.m_strSumPrice      = drv["totalmny"].ToString();
                    subItem.m_strUnit          = drv["getunit_chr"].ToString().Trim();
                    subItem.m_strUsage         = drv["dosetypename_chr"].ToString().Trim();//drv["opusagedesc"].ToString() + " " + drv["opfredesc_vchr"].ToString();
                    if (i == 0)
                    {
                        subItem.m_strRowNo = Convert.ToString(++rowNo);
                    }
                    else
                    {
                        if (drv["parentid_chr"] != DBNull.Value && drv["parentid_chr"].ToString() == dvMed[i - 1]["orderid_chr"].ToString())
                        {
                            subItem.m_strRowNo = rowNo.ToString();
                        }
                        else
                        {
                            subItem.m_strRowNo = Convert.ToString(++rowNo);
                        }
                    }
                    subItem.m_strFreqDays       = drv["days_int"].ToString();
                    subItem.m_strFreqTimes      = drv["times_int"].ToString();
                    subItem.m_strBasicDosage    = subItem.m_strDosage;
                    subItem.m_strOPFreqDesc     = drv["opfredesc_vchr"].ToString();
                    subItem.m_strOPUsageDesc    = drv["opusagedesc"].ToString();
                    subItem.m_strItemIPUnit_chr = drv["dosageunit_chr"].ToString();
                    subItem.m_intPuted          = 1;
                    vo.objPRDArr.Add(subItem);
                    totalMny += clsPublic.ConvertObjToDecimal(subItem.m_strSumPrice);
                }
                vo.stroutpatrecipeMoney = totalMny.ToString();
                vo.strMedMoney          = totalMny.ToString();
                vo.m_strRecipePrice     = totalMny.ToString();
            }
            #endregion

            #region 中药
            vo.objPRDArr2  = new System.Collections.ArrayList();
            vo.objPRDArr3  = new System.Collections.ArrayList();
            vo.objTreatArr = new ArrayList();

            if (isCM)
            {
                vo.m_strRecipeDate   = Convert.ToDateTime(dvMed[0]["postdate_dat"].ToString()).ToString("yyyy-MM-dd");
                vo.strSendMedStorage = "门诊药房";
                rowNo    = 0;
                totalMny = 0;
                int fs = 0;
                foreach (DataRowView drv in dvMed)
                {
                    subItem = new clsOutpatientPrintRecipeDetail_VO();
                    // 中药
                    subItem.m_strChargeName    = drv["medicinename_vchr"].ToString();
                    subItem.m_strMEDNORMALNAME = drv["mednormalname_vchr"].ToString();
                    subItem.m_strCount         = drv["get_dec"].ToString();
                    subItem.m_strDays          = drv["outgetmeddays_int"].ToString();
                    subItem.m_strDosage        = drv["dosage_dec"].ToString();
                    subItem.m_strFrequency     = drv["execfreqname_chr"].ToString();
                    subItem.m_strSpec          = drv["spec_vchr"].ToString();
                    subItem.m_strSumPrice      = drv["totalmny"].ToString();
                    subItem.m_strUnit          = drv["getunit_chr"].ToString();
                    subItem.m_strUsage         = drv["dosetypename_chr"].ToString().Trim(); //drv["opusagedesc"].ToString() + " " + drv["opfredesc_vchr"].ToString();
                    //subItem.m_strUsageDetail = drv["dosetypename_chr"].ToString();
                    subItem.m_strBasicDosage    = subItem.m_strDosage;
                    subItem.m_strOPFreqDesc     = drv["opfredesc_vchr"].ToString();
                    subItem.m_strOPUsageDesc    = drv["opusagedesc"].ToString();
                    subItem.m_strItemIPUnit_chr = drv["dosageunit_chr"].ToString();
                    if (drv["remark_vchr"] != DBNull.Value && !string.IsNullOrEmpty(drv["remark_vchr"].ToString()))
                    {
                        subItem.m_strUsage = drv["remark_vchr"].ToString().Trim();
                    }
                    subItem.m_intPuted = 1;
                    vo.objPRDArr2.Add(subItem);
                    totalMny += clsPublic.ConvertObjToDecimal(subItem.m_strSumPrice);
                    if (fs == 0 && Convert.ToDecimal(drv["dosage_dec"].ToString()) > 0)
                    {
                        fs = Convert.ToInt32(Convert.ToDecimal(drv["get_dec"].ToString()) / Convert.ToDecimal(drv["dosage_dec"].ToString()));
                    }
                }
                vo.stroutpatrecipeMoney = totalMny.ToString();
                vo.strMedMoney          = totalMny.ToString();
                vo.m_strRecipePrice     = totalMny.ToString();
                vo.m_strTimes           = (fs > 0 ? fs.ToString() : "");
            }
            #endregion

            return(vo);
        }
Пример #11
0
        /// <summary>
        /// Save
        /// </summary>
        void Save()
        {
            int varId = 0;

            if (this.btnOK.Tag != null)
            {
                varId = Convert.ToInt32(this.btnOK.Tag.ToString());
            }

            EntityCpExecPlanVar varVo = new EntityCpExecPlanVar();

            varVo.varid      = varId;
            varVo.execid     = Convert.ToDecimal(this.ExecPlanDataSource["execid"]);
            varVo.registerid = patVo.m_strRegisterID;
            varVo.vardate    = Convert.ToDateTime(this.dtpVar.Text);
            if (this.chkEva1.Checked)
            {
                varVo.vartype = 1;
            }
            else if (this.chkEva2.Checked)
            {
                varVo.vartype = 2;
            }
            else if (this.chkEva3.Checked)
            {
                varVo.vartype = 3;
            }
            varVo.doctid     = patVo.m_strDOCTORID_CHR;
            varVo.operid     = this.LoginInfo.m_strEmpID;
            varVo.operdate   = DateTime.Now;
            varVo.status     = 1;
            varVo.varcontent = this.txtResult.Text.Trim();

            if (varVo.vartype == 0)
            {
                MessageBox.Show("请选择变异类型。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.chkEva1.Focus();
                return;
            }
            if (varVo.varcontent == string.Empty)
            {
                MessageBox.Show("请输入变异原因。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.txtResult.Focus();
                return;
            }
            if (varVo.vartype == 2)
            {
                if (this.txtPathName.Tag == null)
                {
                    MessageBox.Show("请选择新路径。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.txtPathName.Focus();
                    return;
                }
                else
                {
                    DataRow dr = this.txtPathName.Tag as DataRow;
                    varVo.newcpid = Convert.ToDecimal(dr["cpid"].ToString());
                }
            }

            List <EntityCpExecPlanVarDetail> lstVo = new List <EntityCpExecPlanVarDetail>();

            if (this.clstTarget.CheckedItems.Count > 0)
            {
                EntityCpExecPlanVarDetail vo = null;
                for (int i = 0; i < this.clstTarget.CheckedItems.Count; i++)
                {
                    vo            = new EntityCpExecPlanVarDetail();
                    vo.varcontent = this.clstTarget.CheckedItems[i].ToString();
                    lstVo.Add(vo);
                }
            }

            bool isNew             = varId <= 0 ? true : false;
            clsBIHOrderService svc = new clsDcl_GetSvcObject().m_GetOrderSvcObject();

            if (svc.SaveCpExecvariation(ref varId, varVo, lstVo) > 0)
            {
                this.btnOK.Tag = varId.ToString();
                if (isNew)
                {
                    GetHistory(svc.GetCpExecVarList(varVo.execid));
                }
                if ((varVo.vartype == 2 || varVo.vartype == 3) && this.IsStopCp == false)
                {
                    this.IsStopCp = true;
                }
                MessageBox.Show("保存变异成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            else
            {
                MessageBox.Show("保存变异失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Пример #12
0
        /// <summary>
        /// LoadVarInfo
        /// </summary>
        /// <param name="varId"></param>
        void LoadVarInfo(decimal varId)
        {
            try
            {
                this.Cursor = Cursors.WaitCursor;
                DataTable          dtMain = null;
                DataTable          dtDet  = null;
                clsBIHOrderService svc    = new clsDcl_GetSvcObject().m_GetOrderSvcObject();
                svc.GetCpExecVarInfo(varId, out dtMain, out dtDet);
                if (dtMain != null && dtMain.Rows.Count > 0)
                {
                    DataRow dr = dtMain.Rows[0];
                    this.dtpVar.Text = Convert.ToDateTime(dr["vardate"].ToString()).ToString("yyyy-MM-dd HH:mm:ss");;
                    if (dr["vartype"].ToString() == "1")
                    {
                        this.chkEva1.Checked = true;
                    }
                    else if (dr["vartype"].ToString() == "2")
                    {
                        this.chkEva2.Checked = true;
                    }
                    else if (dr["vartype"].ToString() == "3")
                    {
                        this.chkEva3.Checked = true;
                    }
                    if (Convert.ToDecimal(dr["newcpid"].ToString()) > 0)
                    {
                        decimal   cpid = Convert.ToDecimal(dr["newcpid"].ToString());
                        DataRow[] drr  = PathDataSource.Select("cpid = " + cpid.ToString());
                        if (drr != null && drr.Length > 0)
                        {
                            this.txtPathName.Text = drr[0]["cpname"].ToString();
                            this.txtPathName.Tag  = drr[0];
                        }
                    }
                    this.txtResult.Text = dr["varcontent"].ToString();
                }

                for (int i = 0; i < this.clstTarget.Items.Count; i++)
                {
                    if (dtDet != null && dtDet.Rows.Count > 0)
                    {
                        DataRow[] drr1 = dtDet.Select("varcontent = '" + this.clstTarget.Items[i].ToString() + "'");
                        if (drr1 != null && drr1.Length > 0)
                        {
                            this.clstTarget.SetItemChecked(i, true);
                        }
                        else
                        {
                            this.clstTarget.SetItemChecked(i, false);
                        }
                    }
                    else
                    {
                        this.clstTarget.SetItemChecked(i, false);
                    }
                }
                this.btnOK.Tag = varId.ToString();
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Пример #13
0
        /// <summary>
        /// 查询
        /// </summary>
        void Query()
        {
            try
            {
                if (this.dtmBegin.Text.Trim() == "" || this.dtmEnd.Text.Trim() == "")
                {
                    MessageBox.Show("请输入查询开始时间和结束时间", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }
                DateTime beginTime = Convert.ToDateTime(this.dtmBegin.Text + " 00:00:00");
                DateTime endTime   = Convert.ToDateTime(this.dtmEnd.Text + " 23:59:59");
                if (beginTime > endTime)
                {
                    MessageBox.Show("开始时间不能大于结束时间", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                string isHs     = string.Empty;
                string isSf     = string.Empty;
                string dateType = this.cboDateType.SelectedIndex.ToString();
                this.Cursor = Cursors.WaitCursor;
                string areaId      = (this.bizType == 1 ? "" : this.LoginInfo.m_strInpatientAreaID);
                string orderStatus = this.cboOrderStatus.Text.Trim();
                switch (orderStatus)
                {
                case "审核停止":
                    orderStatus = " and b.status_int in (3, 6) ";
                    break;

                case "未停止":
                    orderStatus = " and b.status_int not in (3, 6) ";
                    break;

                default:
                    orderStatus = "";
                    break;
                }
                if (this.chkHsYes.Checked)
                {
                    isHs = "1";
                }
                else if (this.chkHsNo.Checked)
                {
                    isHs = "0";
                }
                else
                {
                    isHs = "";
                }
                if (this.chkSfYes.Checked)
                {
                    isSf = "1";
                }
                else if (this.chkSfNo.Checked)
                {
                    isSf = "0";
                }
                else
                {
                    isSf = "";
                }
                using (clsBIHOrderService svc = new clsDcl_GetSvcObject().m_GetOrderSvcObject())
                {
                    DataSource = svc.GetPretestMed(beginTime.ToString("yyyy-MM-dd HH:mm:ss"), endTime.ToString("yyyy-MM-dd HH:mm:ss"), areaId, orderStatus, isHs, isSf, dateType);
                    this.dgvData.DataSource = DataSource;
                    this.SetRowBackColor();
                }
                DataSourceDept.Clear();
                this.cboDept.Items.Clear();
                List <string> lstDeptId = new List <string>();
                if (DataSource != null && DataSource.Count > 0)
                {
                    DataSourceDept.Add(new EntityDept()
                    {
                        deptId = "00", deptName = "全 院"
                    });
                    EntityDept vo = null;
                    foreach (EntityPretestMed item in DataSource)
                    {
                        vo          = new EntityDept();
                        vo.deptId   = item.deptId;
                        vo.deptName = item.deptName;
                        if (lstDeptId.IndexOf(vo.deptId) < 0)
                        {
                            lstDeptId.Add(vo.deptId);
                            DataSourceDept.Add(vo);
                        }
                    }
                }
                foreach (EntityDept item in DataSourceDept)
                {
                    this.cboDept.Items.Add(item.deptName);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            finally
            {
                this.Cursor = Cursors.Default;
            }
        }
Пример #14
0
        private void m_mthListChargeItems(string strFindCode, int m_intInputType)
        {
            ArrayList m_arlItems = new ArrayList();

            lsvChargeItem.Items.Clear();
            //组套
            clsBIHOrderGroup[] arrGroup;
            //clsBIHOrderGroupService m_objService2=new clsBIHOrderGroupService();
            clsBIHOrderGroupService m_objService2 = new clsDcl_GetSvcObject().m_GetOrderGroupSvcObject();
            long ret1 = m_objService2.m_lngFindGroup(strFindCode, (this.m_frmParent.m_objCurrentDoctor == null?"": this.m_frmParent.m_objCurrentDoctor.m_strDoctorID), this.m_frmParent.m_ctlOrderDetail.m_strDeptID, -1, out arrGroup);

            if ((ret1 > 0) && (arrGroup != null) && (arrGroup.Length > 0))
            {
                for (int i = 0; i < arrGroup.Length; i++)
                {
                    string strGroupCode = arrGroup[i].m_strGroupID;
                    if (m_intInputType == 1)
                    {
                        strGroupCode = arrGroup[i].m_strWBCode;
                    }
                    else if (m_intInputType == 2)
                    {
                        strGroupCode = arrGroup[i].m_strPYCode;
                    }

                    //ListViewItem objItem=new ListViewItem(arrGroup[i].m_strName,c_intItem_Group);
                    //用户编码
                    ListViewItem objItem = new ListViewItem("", 0);
                    //组套名称
                    objItem.SubItems.Add(arrGroup[i].m_strName);
                    //备注
                    objItem.SubItems.Add(arrGroup[i].m_strDes);
                    objItem.Tag = arrGroup[i];
                    m_arlItems.Add(objItem);
                }
            }
//
//			//基本项目
//			clsBIHOrderDic[] arrDic;
//			long ret2=m_objService.m_lngGetOrderDicByCode(strFindCode,out arrDic);
//			if((ret2>0) && (arrDic!=null) && (arrDic.Length>0))
//			{
//				for(int i=0;i<arrDic.Length;i++)
//				{
//					string strDicCode=arrDic[i].m_strUserCode;
//					if(m_intInputType==1) strDicCode=arrDic[i].m_strWBCode;
//					else if(m_intInputType==2) strDicCode=arrDic[i].m_strPYCode;
//
//					//ListViewItem objItem=new ListViewItem(strDicCode,c_intItem_Order);
//					//objItem.SubItems.Add(arrDic[i].m_strName);//项目名称
//					//ListViewItem objItem=new ListViewItem(arrDic[i].m_strName,c_intItem_Order);
//					//用户编码
//					ListViewItem objItem=new ListViewItem(arrDic[i].m_strUserCode,c_intItem_Order);
//					//项目名称
//					objItem.SubItems.Add(arrDic[i].m_strName);
//					//项目规格
//					objItem.SubItems.Add(arrDic[i].m_strSpec);
//					//包装
//					objItem.SubItems.Add(arrDic[i].m_StrPackage);
//					//住院单价
//					objItem.SubItems.Add(arrDic[i].m_dmlPrice.ToString("0.0000"));
//					objItem.Tag=arrDic[i];
//					m_arlItems.Add(objItem);
//				}
//			}
//
//			if(m_arlItems.Count>0)
//			{
//				ListViewItem[] arrItem=(ListViewItem[])(m_arlItems.ToArray(typeof(ListViewItem)));
//				lvwList.Items.AddRange(arrItem);
//			}
//			else
//			{	//如果没有值则,报告没有查到,否则调转焦点
//				if(m_txtOrderName.Tag==null || m_txtOrderName.Tag.ToString().Trim()=="")
//				{
//					MessageBox.Show("没有找到对应的医嘱或组套,请输入其它的查询条件","提示框!",MessageBoxButtons.OK,MessageBoxIcon.Information);
//					m_txtOrderName.SelectAll();
//				}
//				else
//				{
//					m_txtExecuteFreq.Focus();
//				}
//			}
        }
Пример #15
0
        /// <summary>
        /// Save
        /// </summary>
        void Save()
        {
            if (this.txtMainDiag.Tag == null)
            {
                MessageBox.Show("请输入主要诊断。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.txtMainDiag.Focus();
                return;
            }
            if (this.txtPathName.Tag == null)
            {
                MessageBox.Show("请输入路径名称。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.txtPathName.Focus();
                return;
            }
            if (this.clstDiagRef.CheckedItems.Count == 0)
            {
                MessageBox.Show("请选择诊断依据。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                this.clstDiagRef.Focus();
                return;
            }
            string refStr = string.Empty;

            for (int i = 0; i < this.clstDiagRef.CheckedItems.Count; i++)
            {
                refStr += this.clstDiagRef.CheckedItems[i].ToString() + ";";
            }

            DateTime         dtmCp  = Convert.ToDateTime(this.dtpCp.Text);
            EntityCpExecPlan execVo = new EntityCpExecPlan();

            execVo.registerid = patVo.m_strRegisterID;
            execVo.deptid     = patVo.m_strDeptID;
            execVo.areaid     = patVo.m_strAreaID;
            execVo.bedid      = patVo.m_strBedID;
            execVo.doctid     = patVo.m_strDOCTORID_CHR;
            execVo.indesc     = this.txtRemark.Text.Trim();
            execVo.currdate   = dtmCp;
            execVo.begindate  = dtmCp;
            execVo.status     = 1;
            execVo.recorder   = this.LoginInfo.m_strEmpID;
            execVo.recorddate = DateTime.Now;
            execVo.othexam    = refStr.TrimEnd(',');
            execVo.synname    = this.txtZyzx.Text.Trim();

            DataRow dr = this.txtMainDiag.Tag as DataRow;

            execVo.cpmainicdcode = dr["icdcode"].ToString();
            execVo.cpmainicdname = dr["icdname"].ToString();

            dr            = this.txtPathName.Tag as DataRow;
            execVo.cpid   = Convert.ToDecimal(dr["cpid"].ToString());
            execVo.cpname = dr["cpname"].ToString();

            decimal execId = 0;

            if (this.btnOK.Tag != null)
            {
                execId = Convert.ToDecimal(this.btnOK.Tag.ToString());
            }
            clsBIHOrderService svc = new clsDcl_GetSvcObject().m_GetOrderSvcObject();

            if (svc.CpIn(execVo, ref execId) > 0)
            {
                this.PathName  = execVo.cpname;
                this.IsSuccess = true;
                this.btnOK.Tag = execId.ToString();
                MessageBox.Show("入径成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            else
            {
                MessageBox.Show("入径失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }