Exemple #1
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);
                    }
                }
            }
        }
Exemple #2
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 = "";
        }
Exemple #3
0
        /// <summary>
        /// 保存(补期帐)
        /// </summary>
        public void m_mthSave()
        {
            if (this.dtgItem.Rows.Count == 0)
            {
                MessageBox.Show("请录入收费项目。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);
                return;
            }

            frmAidDayAccountList f = new frmAidDayAccountList(this.BihPatient_VO.RegisterID);

            if (f.ShowDialog() == DialogResult.OK)
            {
                clsPublic.PlayAvi("findFILE.avi", "正在调整期帐信息,请稍候...");

                string    DayAccountID     = f.DayAccountID;
                string    ActiveDat        = f.ActiveDat;
                ArrayList PatientChargeArr = new ArrayList();

                for (int i = 0; i < this.dtgItem.Rows.Count; i++)
                {
                    clsBihPatientCharge_VO PatientCharge_VO = new clsBihPatientCharge_VO();

                    DataRow dr = this.dtgItem.Rows[i].Tag as DataRow;

                    PatientCharge_VO.DayaccountID   = DayAccountID;
                    PatientCharge_VO.PatientID      = this.BihPatient_VO.PatientID;
                    PatientCharge_VO.RegisterID     = this.BihPatient_VO.RegisterID;
                    PatientCharge_VO.ClacArea       = this.dtgItem.Rows[i].Cells["execareaid"].Value.ToString();
                    PatientCharge_VO.CreateArea     = this.dtgItem.Rows[i].Cells["applyareaid"].Value.ToString();
                    PatientCharge_VO.CalcCateID     = dr["itemipcalctype_chr"].ToString();
                    PatientCharge_VO.InvCateID      = dr["itemipinvtype_chr"].ToString();
                    PatientCharge_VO.ChargeItemID   = dr["itemid_chr"].ToString();
                    PatientCharge_VO.ChargeItemName = dr["itemname_vchr"].ToString();

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

                    PatientCharge_VO.Amount             = clsPublic.ConvertObjToDecimal(this.dtgItem.Rows[i].Cells["amount"].Value);
                    PatientCharge_VO.Discount           = clsPublic.ConvertObjToDecimal(this.dtgItem.Rows[i].Cells["scale"].Value);
                    PatientCharge_VO.Ismepay            = 0;
                    PatientCharge_VO.Des                = "";
                    PatientCharge_VO.CreateType         = 4;
                    PatientCharge_VO.Creator            = this.LoginInfo.m_strEmpID;
                    PatientCharge_VO.Operator           = this.LoginInfo.m_strEmpID;
                    PatientCharge_VO.PStatus            = 2;
                    PatientCharge_VO.Activator          = this.dtgItem.Rows[i].Cells["applydoctorid"].Value.ToString();
                    PatientCharge_VO.ActivateType       = 1;
                    PatientCharge_VO.IsRich             = int.Parse(dr["isrich_int"].ToString());
                    PatientCharge_VO.CurAreaID          = this.BihPatient_VO.AreaID;
                    PatientCharge_VO.CurBedID           = this.BihPatient_VO.BedID;
                    PatientCharge_VO.DoctorID           = this.BihPatient_VO.DoctorID;
                    PatientCharge_VO.Doctor             = this.BihPatient_VO.DoctorName;
                    PatientCharge_VO.DoctorGroupID      = this.BihPatient_VO.DoctorGroupID;
                    PatientCharge_VO.NeedConfirm        = 0;
                    PatientCharge_VO.ActiveDat          = ActiveDat;
                    PatientCharge_VO.TotalMoney_dec     = clsPublic.Round(PatientCharge_VO.UnitPrice * PatientCharge_VO.Amount, 2);
                    PatientCharge_VO.AcctMoney_dec      = PatientCharge_VO.TotalMoney_dec - clsPublic.Round(PatientCharge_VO.UnitPrice * PatientCharge_VO.Amount * PatientCharge_VO.Discount / 100, 2);
                    PatientCharge_VO.CHARGEDOCTORID_CHR = this.dtgItem.Rows[i].Cells["applydoctorid"].Value.ToString();
                    PatientCharge_VO.CHARGEDOCTOR_VCHR  = this.dtgItem.Rows[i].Cells["colChargeDoctorName"].Value.ToString();

                    PatientChargeArr.Add(PatientCharge_VO);
                }

                long l = this.objSvc.m_lngPatchDayAccount(PatientChargeArr, DayAccountID);

                clsPublic.CloseAvi();

                if (l > 0)
                {
                    MessageBox.Show("补期帐成功!", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Information);

                    this.btnAdd.Enabled  = false;
                    this.btnDel.Enabled  = false;
                    this.btnSave.Enabled = false;
                    this.btnSave.Tag     = DayAccountID;

                    modifyflag = true;
                }
                else
                {
                    MessageBox.Show("补期帐失败。", "系统提示", MessageBoxButtons.OK, MessageBoxIcon.Stop);
                }
            }
        }