Example #1
0
        /// <summary>
        /// 添加诊疗项目类型
        /// </summary>
        private void m_mthAddOrderCate()
        {
            DataTable         dt;
            clsDcl_CommonFind objFind = new clsDcl_CommonFind();
            long l = objFind.m_lngGetOrderCate(out dt);

            if (l > 0)
            {
                this.cboClass.Items.Clear();

                this.cboClass.Items.Add("全部");
                hasOrderCate.Add("全部", "%");
                this.cboClass.Items.Add("非诊疗项目");
                hasOrderCate.Add("非诊疗项目", "&");

                for (int i = 0; i < dt.Rows.Count; i++)
                {
                    if (!hasOrderCate.ContainsKey(dt.Rows[i]["name_chr"].ToString().Trim()))
                    {
                        this.cboClass.Items.Add(dt.Rows[i]["name_chr"].ToString().Trim());
                        hasOrderCate.Add(dt.Rows[i]["name_chr"].ToString().Trim(), dt.Rows[i]["ordercateid_chr"].ToString());
                    }
                }

                //this.cboClass.SelectedIndex = 0;
            }
        }
Example #2
0
        public void m_mthChargeMedBag()
        {
            if (this.dtPutMed != null)
            {
                List <string>     lisNeedChargePatient = new List <string>();
                List <string>     lisOrderCreateAreaID = new List <string>();
                clsDcl_CommonFind objDcl = new clsDcl_CommonFind();
                for (int intI = 0; intI < dtPutMed.Rows.Count; intI++)
                {
                    string strPutMedDetailID = dtPutMed.Rows[intI]["putmeddetailid_chr"].ToString();
                    string strInpatientID    = dtPutMed.Rows[intI]["inpatientid_chr"].ToString();
                    bool   blnIfCharge       = false;

                    if (!lisNeedChargePatient.Contains(strInpatientID))
                    {
                        string strOrderCreateAreaID = "";
                        objDcl.m_lngQueryIfChargeMedBag(strPutMedDetailID, ref blnIfCharge, ref strOrderCreateAreaID);
                        if (blnIfCharge == false)
                        {
                            lisNeedChargePatient.Add(strInpatientID);
                            lisOrderCreateAreaID.Add(strOrderCreateAreaID);
                        }
                    }
                }

                ArrayList alsOrderDic      = new ArrayList();
                ArrayList alsPatientCharge = new ArrayList();
                string    strOrderID       = "";

                for (int intI = 0; intI < lisNeedChargePatient.Count; intI++)
                {
                    string strInPatientID       = lisNeedChargePatient[intI];
                    string strOrderCreateAreaID = lisOrderCreateAreaID[intI];
                    int    intBagNum            = dicMedBagNum[strInPatientID];

                    clsBihOrderDic_VO      objOrderDicVO      = new clsBihOrderDic_VO();
                    clsBihPatientCharge_VO objPatientChargeVO = new clsBihPatientCharge_VO();
                    m_mthCreateChargeVO(ref objOrderDicVO, ref objPatientChargeVO, strInPatientID, intBagNum, strOrderCreateAreaID);
                    alsOrderDic.Add(objOrderDicVO);
                    alsPatientCharge.Add(objPatientChargeVO);
                }
                clsDcl_Charge objDcl1 = new clsDcl_Charge();
                objDcl1.m_lngGenPatientChargeByDir(alsOrderDic, alsPatientCharge, 9, ref strOrderID);

                for (int intI = 0; intI < dtPutMed.Rows.Count; intI++)
                {
                    string strPutMedDetailID = dtPutMed.Rows[intI]["putmeddetailid_chr"].ToString();
                    string strInpatientID    = dtPutMed.Rows[intI]["inpatientid_chr"].ToString();

                    if (lisNeedChargePatient.Contains(strInpatientID))
                    {
                        objDcl.m_lngUpdateIfChargeMedBag(strPutMedDetailID, 1);
                    }
                }
            }
        }
Example #3
0
        private void txtZyh_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                string zyh = this.txtZyh.Text.Trim();

                if (zyh == "")
                {
                    MessageBox.Show("请输入住院号.", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    return;
                }

                clsDcl_CommonFind objFind = new clsDcl_CommonFind();
                DataTable         dt;
                long l = objFind.m_lngGetPatientinfoByZyh(zyh, out dt);
                if (l > 0 && dt.Rows.Count > 0)
                {
                    DataRow Dr;
                    if (dt.Rows.Count == 1)
                    {
                        Dr = dt.Rows[0];
                    }
                    else
                    {
                        frmAidChooseZyh f = new frmAidChooseZyh(dt);
                        if (f.ShowDialog() == DialogResult.OK)
                        {
                            Dr = f.DR;
                        }
                        else
                        {
                            return;
                        }
                    }

                    this.txtZyh.Tag   = Dr["registerid_chr"].ToString();
                    this.lblZycs.Text = Dr["inpatientcount_int"].ToString();
                    this.lblName.Text = Dr["lastname_vchr"].ToString();
                }
                else
                {
                    this.txtZyh.Tag   = "";
                    this.lblZycs.Text = "";
                    this.lblName.Text = "";
                    MessageBox.Show("没有找到满足条件的病人记录.", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                    this.txtZyh.SelectAll();
                    this.txtZyh.Focus();
                }
            }
        }
Example #4
0
        /// <summary>
        /// 装载数据
        /// </summary>
        private void m_mthLoad()
        {
            clsDcl_CommonFind objComm = new clsDcl_CommonFind();

            DataTable dt1, dt2;

            long l = objComm.m_lngGetUsageInfo(out dt1);

            if (l > 0)
            {
                for (int i = 0; i < dt1.Rows.Count; i++)
                {
                    DataRow dr = dt1.Rows[i];

                    string[] sarr = new string[3];

                    sarr[0] = Convert.ToString(i + 1);
                    sarr[1] = dr["usercode_chr"].ToString().Trim();
                    sarr[2] = dr["usagename_vchr"].ToString().Trim();

                    this.dvLeft.Rows.Add(sarr);
                    this.dvLeft.Rows[i].Tag = dr;
                }
            }
            else
            {
                MessageBox.Show("获取用法信息列表失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            l = objComm.m_lngGetUsageAddItem(out dt2, PatType, ApplyAreaID);
            if (l > 0)
            {
                DV = new DataView(dt2);

                if (dt1.Rows.Count > 0)
                {
                    this.m_mthFilter(dt1.Rows[0]["usageid_chr"].ToString());
                    blStatus = true;
                }
            }
            else
            {
                MessageBox.Show("获取用法带出收费项目信息失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Example #5
0
        /// <summary>
        /// 加载字典数据
        /// </summary>
        private void m_mthLoadData()
        {
            long l = 0;

            dtRecord = null;

            if (ParmType == 1)
            {
                clsDcl_Charge objCharge = new clsDcl_Charge();
                l = objCharge.m_lngGetDeptArea(out dtRecord, 2);
            }
            else if (ParmType == 2 || ParmType == 3)
            {
                clsDcl_CommonFind objFind = new clsDcl_CommonFind();
                l = objFind.m_lngGetBedinfo(ParmAreaID, 0, out dtRecord);
            }

            if (l > 0)
            {
                this.m_mthFillArea("1=1");
            }
        }
Example #6
0
 /// <summary>
 /// 构造
 /// </summary>
 public clsCtl_AreaBedInfo()
 {
     objSvc = new clsDcl_CommonFind();
 }
Example #7
0
        public void m_mthCreateChargeVO(ref clsBihOrderDic_VO p_objOrderDicVO, ref clsBihPatientCharge_VO p_objPatientChargeVO, string p_strInPatientID, int p_intBagNum, string p_strOrderCreateAreaID)
        {
            clsDcl_CommonFind objDcl         = new clsDcl_CommonFind();
            DataTable         dtOrderDicInfo = new DataTable();
            DataTable         dtPatientInfo  = new DataTable();

            objDcl.m_lngQueryInfoForChargeMedBag("0001039661", p_strInPatientID, ref dtOrderDicInfo, ref dtPatientInfo);

            clsDcl_Charge objDcl1    = new clsDcl_Charge();
            DataTable     dtItemInfo = new DataTable();

            objDcl1.m_lngGetChargeItemByOrderID("0001039661", dtPatientInfo.Rows[0]["paytypeid_chr"].ToString(), out dtItemInfo);
            DataRow dr = dtItemInfo.Rows[0];

            //p_objOrderDicVO
            p_objOrderDicVO.Type          = 1;
            p_objOrderDicVO.OrderQue      = 1;
            p_objOrderDicVO.OrderDicID    = "0001039661";
            p_objOrderDicVO.OrderDicName  = dtOrderDicInfo.Rows[0][0].ToString();
            p_objOrderDicVO.Spec          = dtOrderDicInfo.Rows[0][1].ToString();
            p_objOrderDicVO.Qty           = 0;
            p_objOrderDicVO.PriceMny      = 0;
            p_objOrderDicVO.TotalMny      = 0;
            p_objOrderDicVO.AttachOrderID = "1->0001039661";
            p_objOrderDicVO.SbBaseMny     = 0;


            //p_objPatientChargeVO
            p_objPatientChargeVO.PatientID      = dtPatientInfo.Rows[0]["patientid_chr"].ToString();
            p_objPatientChargeVO.RegisterID     = dtPatientInfo.Rows[0]["registerid_chr"].ToString();
            p_objPatientChargeVO.ClacArea       = dtPatientInfo.Rows[0]["areaid_chr"].ToString();
            p_objPatientChargeVO.CreateArea     = p_strOrderCreateAreaID;
            p_objPatientChargeVO.CalcCateID     = dr["itemipcalctype_chr"].ToString();
            p_objPatientChargeVO.InvCateID      = dr["itemipinvtype_chr"].ToString();
            p_objPatientChargeVO.ChargeItemID   = dr["itemid_chr"].ToString();
            p_objPatientChargeVO.ChargeItemName = dr["itemname_vchr"].ToString();

            if (dr["ipchargeflg_int"].ToString().Trim() == "1")
            {
                p_objPatientChargeVO.Unit      = dr["itemipunit_chr"].ToString().Trim();
                p_objPatientChargeVO.UnitPrice = clsPublic.ConvertObjToDecimal(dr["submoney"]);
            }
            else
            {
                p_objPatientChargeVO.Unit      = dr["itemunit_chr"].ToString().Trim();
                p_objPatientChargeVO.UnitPrice = clsPublic.ConvertObjToDecimal(dr["itemprice_mny"]);
            }

            p_objPatientChargeVO.Amount                  = clsPublic.ConvertObjToDecimal(p_intBagNum);
            p_objPatientChargeVO.Discount                = Convert.ToDecimal(dr["precent_dec"]);
            p_objPatientChargeVO.Ismepay                 = 0;
            p_objPatientChargeVO.Des                     = "";
            p_objPatientChargeVO.CreateType              = 4;
            p_objPatientChargeVO.Creator                 = this.strEmpID;
            p_objPatientChargeVO.Operator                = this.strEmpID;
            p_objPatientChargeVO.PStatus                 = 1;
            p_objPatientChargeVO.Activator               = this.strEmpID;
            p_objPatientChargeVO.ActivateType            = 2;
            p_objPatientChargeVO.IsRich                  = int.Parse(dr["isrich_int"].ToString());
            p_objPatientChargeVO.CurAreaID               = dtPatientInfo.Rows[0]["areaid_chr"].ToString();
            p_objPatientChargeVO.CurBedID                = dtPatientInfo.Rows[0]["bedid_chr"].ToString();
            p_objPatientChargeVO.DoctorID                = dtPatientInfo.Rows[0]["casedoctor_chr"].ToString();
            p_objPatientChargeVO.Doctor                  = dtPatientInfo.Rows[0]["lastname_vchr"].ToString();
            p_objPatientChargeVO.DoctorGroupID           = "";
            p_objPatientChargeVO.NeedConfirm             = 0;
            p_objPatientChargeVO.ActiveDat               = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
            p_objPatientChargeVO.TotalMoney_dec          = clsPublic.Round(p_objPatientChargeVO.UnitPrice * p_objPatientChargeVO.Amount, 2);
            p_objPatientChargeVO.AcctMoney_dec           = p_objPatientChargeVO.TotalMoney_dec - clsPublic.Round(p_objPatientChargeVO.UnitPrice * p_objPatientChargeVO.Amount * p_objPatientChargeVO.Discount / 100, 2);
            p_objPatientChargeVO.AttachOrderID           = "1->0001039661";
            p_objPatientChargeVO.AttachOrderBaseNum      = 0;
            p_objPatientChargeVO.SPEC_VCHR               = dr["itemspec_vchr"].ToString();
            p_objPatientChargeVO.PutMedicineFlag         = 0;
            p_objPatientChargeVO.CHARGEDOCTORID_CHR      = dtPatientInfo.Rows[0]["casedoctor_chr"].ToString();
            p_objPatientChargeVO.CHARGEDOCTOR_VCHR       = dtPatientInfo.Rows[0]["lastname_vchr"].ToString();
            p_objPatientChargeVO.CHARGEDOCTORGROUPID_CHR = "";
        }
Example #8
0
        /// <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();
        }
Example #9
0
 /// <summary>
 /// 构造
 /// </summary>
 public clsCtl_CommonFind()
 {
     objSvc = new clsDcl_CommonFind();
 }
Example #10
0
        /// <summary>
        /// 建树
        /// </summary>
        private void m_mthLoad()
        {
            clsDcl_CommonFind objCom = new clsDcl_CommonFind();

            DataTable dt;

            long l = objCom.m_lngGetItemGroup(this.LoginInfo.m_strEmpID, out dt);

            if (l > 0)
            {
                dvMain = new DataView(dt);

                //子节点id
                string childId = "";
                //子节点text
                string childName = "";

                for (int i = 0; i < 3; i++)
                {
                    int    typeid   = i;
                    string typecode = "";
                    string typename = "";

                    if (typeid == 0)
                    {
                        typecode = "public";
                        typename = "公用";
                    }
                    else if (typeid == 1)
                    {
                        typeid   = 2;
                        typecode = "dept";
                        typename = "科室";
                    }
                    else if (typeid == 2)
                    {
                        typeid   = 1;
                        typecode = "indi";
                        typename = "个人";
                    }

                    //typeid: 0 公用 2 个人 1 科室

                    dvMain.RowFilter = "privilege_int = " + typeid.ToString();
                    if (dvMain.Count > 0)
                    {
                        TreeNode tn = new TreeNode(typename);
                        tn.Tag                = typecode;
                        tn.ImageIndex         = 0;
                        tn.SelectedImageIndex = 0;
                        this.tv.Nodes.Add(tn);

                        for (int j = 0; j < dvMain.Count; j++)
                        {
                            DataRow dr = dvMain[j].Row;

                            childId   = dr["recipeid_chr"].ToString();
                            childName = dr["recipename_chr"].ToString().Trim();
                            //childName = "[" + dr["usercode_chr"].ToString() + "] " + dr["recipename_chr"].ToString().Trim();

                            TreeNode tnChild = new TreeNode(childName);
                            tnChild.Tag                = childId;
                            tnChild.ImageIndex         = 2;
                            tnChild.SelectedImageIndex = 3;
                            tn.Nodes.Add(tnChild);
                        }
                    }
                }

                this.tv.ExpandAll();
                //复原
                dvMain.RowFilter = "1 = 1";
            }
            else
            {
                return;
            }

            l = objCom.m_lngGetItemGroupDet(out dt, PatType, ApplyAreaID);
            if (l > 0)
            {
                dvDet = new DataView(dt);
            }
        }