/// <summary> /// 生成医保统筹费用 /// </summary> public void m_mthBuild() { clsPublic.PlayAvi("findFILE.avi", "正在生成医保试算费用,请稍候..."); string ErrMsg = ""; try { ArrayList PayIDArr = clsPublic.m_mthGetYBPayID(); DataTable dt; clsDcl_CommonFind objComm = new clsDcl_CommonFind(); clsDcl_Charge objCharge = new clsDcl_Charge(); long l = objComm.m_lngGetBihPatient(out dt); if (l > 0) { int row = 1; this.lvHistory.Items.Clear(); clsCtl_YBCharge objYB = new clsCtl_YBCharge(); for (int i = 0; i < dt.Rows.Count; i++) { DataRow dr = dt.Rows[i]; if (PayIDArr.IndexOf(dr["paytypeid_chr"].ToString()) >= 0) { decimal TotalMoney = 0; decimal InsuredMoney = 0; string StrErr = ""; if (objYB.m_blnBudget(dr["registerid_chr"].ToString(), dr["zyh"].ToString(), int.Parse(dr["zycs"].ToString()), out TotalMoney, out InsuredMoney, out StrErr)) { //更新 objCharge.m_lngUpdateInsuredSum(dr["registerid_chr"].ToString(), InsuredMoney); ListViewItem lv = new ListViewItem(row.ToString()); lv.SubItems.Add(dr["deptname_vchr"].ToString()); lv.SubItems.Add(dr["bed_no"].ToString()); lv.SubItems.Add(dr["zyh"].ToString()); lv.SubItems.Add(dr["inpatientcount_int"].ToString()); lv.SubItems.Add(dr["lastname_vchr"].ToString()); lv.SubItems.Add(InsuredMoney.ToString()); lv.SubItems.Add("成功"); lv.ImageIndex = 0; this.lvHistory.Items.Add(lv); row++; } else { ErrMsg += StrErr + "\r\n\r\n"; } } } } } catch { } finally { clsPublic.CloseAvi(); if (ErrMsg.Trim().Length > 0) { MessageBox.Show("试算失败。" + ErrMsg, "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } } clsPublic.CloseAvi(); }
private void label29_Click(object sender, EventArgs e) { if (this.registerid == "") { return; } #region 医保试算 string ybCity = clsPublic.m_strGetSysparm("1000").Trim(); if (ybCity == "006") //江门台山医保试算 { string strybpayID = clsPublic.m_strGetSysparm("0008").Trim(); ArrayList arrPayID = clsPublic.m_ArrGettoken(strybpayID, ";"); if (arrPayID.IndexOf(this.BihPatient_VO.PayTypeID) >= 0) { decimal InsuredMoney = 0; frmYB_TS frmYB = new frmYB_TS(); frmYB.objPatient_VO = this.BihPatient_VO; string strPatNameWithInID = ""; strPatNameWithInID = this.BihPatient_VO.Name.Trim(); if (this.BihPatient_VO.Zyh.Trim() != "") { if (strPatNameWithInID != "") { strPatNameWithInID += "(" + this.BihPatient_VO.Zyh.Trim() + ")"; } else { strPatNameWithInID = this.BihPatient_VO.Zyh.Trim(); } } frmYB.lblzyh.Text = strPatNameWithInID; frmYB.lblTotal.Text = this.lblTotalFee.Text; frmYB.m_mthUploadYbInfo(this.BihPatient_VO.RegisterID, this.BihPatient_VO.Zyh); if (frmYB.ShowDialog() == DialogResult.OK) { InsuredMoney = (frmYB.txtYBpay.Text == "" ? 0 : Convert.ToDecimal(frmYB.txtYBpay.Text)); decimal d = this.BihPatient_VO.TotalFee - InsuredMoney; this.lblYbFee.Text = InsuredMoney.ToString("###,##0.00"); this.lblSelfPay.Text = d.ToString("###,##0.00"); Patient_VO.BalanceMoney += InsuredMoney - YBSum; d = Patient_VO.BalanceMoney; this.lblBalanceMoney.Text = (d == 0 ? "" : d.ToString("###,##0.00")) + " (含医保统筹)"; if (d > 0) { this.lblBalanceMoney.ForeColor = Color.Blue; this.lblSpec.ForeColor = Color.Blue; this.lblSpecialInfo.ForeColor = Color.Blue; this.lblFee.ForeColor = Color.Blue; } this.objSvc.m_lngUpdateInsuredSum(this.registerid, InsuredMoney); } } return; } ArrayList PayIDArr = clsPublic.m_mthGetYBPayID(); if (PayIDArr.IndexOf(this.BihPatient_VO.PayTypeID) >= 0) { decimal TotalMoney = 0; decimal InsuredMoney = 0; string ErrMsg = ""; clsCtl_YBCharge objYB = new clsCtl_YBCharge(); if (objYB.m_blnBudget(this.registerid, this.BihPatient_VO.Zyh, this.Patient_VO.InsuredZycs, out TotalMoney, out InsuredMoney, out ErrMsg)) { decimal d = this.BihPatient_VO.TotalFee - InsuredMoney; this.lblYbFee.Text = InsuredMoney.ToString("###,##0.00"); this.lblSelfPay.Text = d.ToString("###,##0.00"); Patient_VO.BalanceMoney += InsuredMoney - YBSum; d = Patient_VO.BalanceMoney; this.lblBalanceMoney.Text = (d == 0 ? "" : d.ToString("###,##0.00")) + " (含医保统筹)"; if (d > 0) { this.lblBalanceMoney.ForeColor = Color.Blue; this.lblSpec.ForeColor = Color.Blue; this.lblSpecialInfo.ForeColor = Color.Blue; this.lblFee.ForeColor = Color.Blue; } //更新 this.objSvc.m_lngUpdateInsuredSum(this.registerid, InsuredMoney); } else { MessageBox.Show("试算失败。" + ErrMsg, "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { MessageBox.Show("根据当前系统设定,该病人不能享受医保政策,试算终止。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information); } #endregion }