Quellcode durchsuchen

医保钱包支付业务更新

837390164@qq.com vor 2 Monaten
Ursprung
Commit
5523b7290d

+ 23 - 2
Business/HisMainBusiness.cs

@@ -1077,7 +1077,7 @@ namespace PTMedicalInsurance.Business
                     }
 
                     //兰州要求必须传病种。普通疾病传主诊断
-                    if ((frmReg.med_type == "2101") && (diseCodg == "") && (Global.pat.RYorCY == "2"))
+                    if ((frmReg.med_type == "2101") && (string.IsNullOrEmpty(diseCodg)) && (Global.pat.RYorCY == "2"))
                     {
                         if (string.IsNullOrEmpty(frmReg.diseCodg))
                         {
@@ -2062,6 +2062,17 @@ namespace PTMedicalInsurance.Business
                 return -1;
             }
 
+            //结算明细
+            Global.Set.wltpayAmt = "0";
+            JArray jaSetlDetail = JArray.Parse(JsonHelper.getDestValue(jo2206Rtn, "output.setldetail"));
+            for (int i = 0; i < jaSetlDetail.Count; i++)
+            {
+                if (jaSetlDetail[i]["fund_pay_type"].ToString() == "9999981")
+                {
+                    Global.Set.wltpayAmt = jaSetlDetail[i]["fund_payamt"].ToString(); //医保钱包支付金额
+                }
+            }
+
             //返回给HIS进行预结算判断
             JObject joSetlinfo = JObject.Parse(JsonHelper.getDestValue(jo2206Rtn, "output.setlinfo"));
             if (hIS.preSettlement(joSettlement, joSetlinfo, out outParam) != 0)
@@ -2070,7 +2081,6 @@ namespace PTMedicalInsurance.Business
                 return -1;
             }
 
-
             //编码转换
             if (mIS.convertSettlementWithInsuCode(jo2206Rtn, out outParam) != 0)
             {
@@ -2209,6 +2219,17 @@ namespace PTMedicalInsurance.Business
                 return -1;
             }
 
+            //结算明细
+            Global.Set.wltpayAmt = "0";
+            JArray jaSetlDetail = JArray.Parse(JsonHelper.getDestValue(jo2303Rtn, "output.setldetail"));
+            for (int i = 0; i < jaSetlDetail.Count; i++)
+            {
+                if (jaSetlDetail[i]["fund_pay_type"].ToString() == "9999981")
+                {
+                    Global.Set.wltpayAmt = jaSetlDetail[i]["fund_payamt"].ToString(); //医保钱包支付金额
+                }
+            }
+
             //预结算结果传给HIS进行HIS判断 
             if (funNO == "2303")
             {

+ 5 - 4
Business/IrisServices.cs

@@ -588,8 +588,7 @@ namespace PTMedicalInsurance.Business
             string errMsg;
             try
             {
-            
-                   JObject joSumFee = new JObject();
+                JObject joSumFee = new JObject();
                 if (sumInsuRtnSettlInfo(joSetlinfo, out joSumFee, out errMsg) != 0)
                 {
                     outParam = "汇总结算结果失败,请联系管理员!" + errMsg;
@@ -741,14 +740,14 @@ namespace PTMedicalInsurance.Business
                 ybAmt = getFee(jo, "hifp_pay") //基本医保统筹基金支出
                       + getFee(jo, "hifes_pay") //企业补充医疗保险基金支出
                       + getFee(jo, "hifmi_pay") //居民大病保险
-                                                //+ getFee(jo, "hifob_pay") //大额医疗费用补助
+                      //+ getFee(jo, "hifob_pay") //大额医疗费用补助
                       + getFee(jo, "hifob_pay") //职工大额医疗费用补助
                       + getFee(jo, "cvlserv_pay") //公务员医疗补助
                       + getFee(jo, "maf_pay") //医疗救助基金支出
                       + getFee(jo, "oth_pay"); //其他支出
 
                 acctMulaidPay= getFee(jo, "acct_mulaid_pay");     //个人账户共济支付金额
-                psnAcctAmt = getFee(jo, "acct_pay");     //账户支付金额
+                psnAcctAmt = getFee(jo, "acct_pay") + decimal.Parse(Global.Set.wltpayAmt);     //账户支付金额+医保钱包支付金额
                 psnCashAmt = getFee(jo, "psn_cash_pay"); //现金支付金额
                 hospAmt = getFee(jo, "hosp_part_amt");   //医院承担金额
                 medFee = getFee(jo, "medfee_sumamt");    //总费用
@@ -2134,6 +2133,8 @@ namespace PTMedicalInsurance.Business
                 joSetlinfo.Add("HISAdmTime", Global.Set.hisAdmTime);
                 joSetlinfo.Add("HISDischargeTime", Global.Set.hisDischargeTime);
 
+                joSetlinfo.Add("medIns_wallet_pay", Global.Set.wltpayAmt); //医保钱包支付金额
+
                 joSetlinfo.Add("DiseasecCode", Global.pat.DiseasecCode);
                 joSetlinfo.Add("DiseasecName", Global.pat.DiseasecName);
 

+ 9 - 2
Forms/Clearing.cs

@@ -194,6 +194,10 @@ namespace PTMedicalInsurance.Forms
             DataTable dt = (DataTable)dgvSettlSummary.DataSource;
             int i = dgvSettlSummary.CurrentRow.Index;
 
+
+            JObject jo = new JObject();
+            jo.Add("wlt_fee_sumamt", dt.Rows[i]["WalletPay"].ToString());
+
             dynamic joCheck = new JObject();
             joCheck.insutype = dt.Rows[i]["insutype"].ToString();                       //险种类型
             joCheck.clr_type = dt.Rows[i]["clr_type"].ToString();                       //清算类别            
@@ -216,6 +220,8 @@ namespace PTMedicalInsurance.Forms
             joCheck.stmt_begndate = dpST.Value.ToString("yyyy-MM-dd HH:mm:ss");         //对账开始日期
             joCheck.stmt_enddate = dpED.Value.ToString("yyyy-MM-dd HH:mm:ss");          //对账结束日期
 
+            joCheck.exp_content = jo;                   //钱包支付金额
+
             JObject joData = new JObject();
             joData.Add("data", joCheck);
             //上传给中心
@@ -1772,8 +1778,9 @@ namespace PTMedicalInsurance.Forms
             //string sqlStr = "SELECT SUM(BillType*Sumamt) AS medfee_sumamt,count(*) AS fixmedins_setl_cnt,SUM(BillType*PersonCashPay) AS cash_payamt, ";
             //sqlStr = sqlStr + " SUM(BillType*AccountPaySumamt) AS acct_pay,SUM(BillType*FundPaySumamt) AS fund_pay_sumamt ";
 
-            string sqlStr = "SELECT SUM(BillType*Sumamt) AS medfee_sumamt,count(*) AS fixmedins_setl_cnt,SUM(BillType*PersonCashPay) AS cash_payamt,  ";
-            sqlStr = sqlStr + " SUM(billType*AccountPaySumamt)+SUM(billType*AccountMutualAidAmount) AS acct_pay,SUM(BillType*FundPaySumamt) AS fund_pay_sumamt ";
+            string sqlStr = " SELECT SUM(BillType*Sumamt) AS medfee_sumamt,count(*) AS fixmedins_setl_cnt,";
+            sqlStr = sqlStr + " SUM(BillType*PersonCashPay) AS cash_payamt,SUM(billType*AccountPaySumamt)+SUM(billType*AccountMutualAidAmount) AS acct_pay,  ";
+            sqlStr = sqlStr + " SUM(BillType*FundPaySumamt) AS fund_pay_sumamt,SUM(BillType*WalletPay) AS WalletPay ";
             //sqlStr = sqlStr + " Interface_dr,clearingWay AS clr_way,clearingType AS clr_type ";
             string conditionStr = " Group By";
             if (cbgGroupSet.GetItemCheckState(0))

+ 1 - 1
Forms/OutpatientRegistration.cs

@@ -58,7 +58,7 @@ namespace PTMedicalInsurance.Forms
                 string sqlStr = "SELECT B.Code,B.Descripts AS Name FROM HB_Dictionary A JOIN HB_DictionaryDataDetail B ON A.ID = B.HBDictionary_Dr  WHERE A.InsuCode = 'insutype'" + sqlCondition;
                 SetDBLKCombox(ref dblkcbxInsuranceType, sqlStr);
 
-                sqlStr = "select A.Code, A.Name FROM HB_MedInsuDirectory A where A.UseFlag='1' And A.HisType=7" + sqlCondition;
+                sqlStr = "select A.Code, A.Name FROM HB_MedInsuDirectory A where A.UseFlag='1' And A.HisType=8" + sqlCondition;
                 SetDBLKCombox(ref dblkcbxDisease, sqlStr);
 
                 sqlStr = "select A.Code, A.Name FROM HB_MedInsuDirectory A where A.UseFlag='1' And A.HisType=5" + sqlCondition;

+ 3 - 0
Forms/SettlementInfo.cs

@@ -64,7 +64,10 @@ namespace PTMedicalInsurance.Forms
             this.tbAccountMutualAidAmount.Text = joSettlmentInfo["acct_mulaid_pay"].ToString();
             this.tbClearingWay.Text = joSettlmentInfo["clr_way"].ToString();
             this.tbClearingType.Text = joSettlmentInfo["clr_type"].ToString();
+            this.tbMedInsWalletPay.Text = Global.Set.wltpayAmt;
+
             Global.Set.acctPay = joSettlmentInfo["acct_pay"].ToString();
+
             setDgvSettlDetailHeader();
             dgvSetlDetail.DataSource = dtSettlmentDetail;           
 

+ 31 - 0
Forms/SettlementInfo.designer.cs

@@ -116,6 +116,8 @@ namespace PTMedicalInsurance.Forms
             this.uiLabel30 = new Sunny.UI.UILabel();
             this.gbSetldetail = new Sunny.UI.UIGroupBox();
             this.dgvSetlDetail = new Sunny.UI.UIDataGridView();
+            this.tbMedInsWalletPay = new Sunny.UI.UITextBox();
+            this.uiLabel34 = new Sunny.UI.UILabel();
             this.pnlBottom.SuspendLayout();
             this.pnlClient.SuspendLayout();
             this.gbSetlinfo.SuspendLayout();
@@ -207,6 +209,8 @@ namespace PTMedicalInsurance.Forms
             // 
             // pnlPayInfo
             // 
+            this.pnlPayInfo.Controls.Add(this.tbMedInsWalletPay);
+            this.pnlPayInfo.Controls.Add(this.uiLabel34);
             this.pnlPayInfo.Controls.Add(this.tbAccountMutualAidAmount);
             this.pnlPayInfo.Controls.Add(this.uiLabel22);
             this.pnlPayInfo.Controls.Add(this.tbBalc);
@@ -1095,6 +1099,31 @@ namespace PTMedicalInsurance.Forms
             this.dgvSetlDetail.TabIndex = 1;
             this.dgvSetlDetail.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
+            // tbMedInsWalletPay
+            // 
+            this.tbMedInsWalletPay.Cursor = System.Windows.Forms.Cursors.IBeam;
+            this.tbMedInsWalletPay.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.tbMedInsWalletPay.Location = new System.Drawing.Point(361, 224);
+            this.tbMedInsWalletPay.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5);
+            this.tbMedInsWalletPay.MinimumSize = new System.Drawing.Size(1, 16);
+            this.tbMedInsWalletPay.Name = "tbMedInsWalletPay";
+            this.tbMedInsWalletPay.ShowText = false;
+            this.tbMedInsWalletPay.Size = new System.Drawing.Size(100, 29);
+            this.tbMedInsWalletPay.TabIndex = 55;
+            this.tbMedInsWalletPay.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft;
+            this.tbMedInsWalletPay.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
+            // uiLabel34
+            // 
+            this.uiLabel34.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.uiLabel34.Location = new System.Drawing.Point(253, 225);
+            this.uiLabel34.Name = "uiLabel34";
+            this.uiLabel34.Size = new System.Drawing.Size(100, 23);
+            this.uiLabel34.TabIndex = 54;
+            this.uiLabel34.Text = "钱包支付金额";
+            this.uiLabel34.TextAlign = System.Drawing.ContentAlignment.MiddleLeft;
+            this.uiLabel34.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
             // SettlementInfo
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F);
@@ -1186,5 +1215,7 @@ namespace PTMedicalInsurance.Forms
         private Sunny.UI.UITextBox tbClearingType;
         private Sunny.UI.UILabel uiLabel29;
         private Sunny.UI.UIButton uiButton2;
+        private Sunny.UI.UITextBox tbMedInsWalletPay;
+        private Sunny.UI.UILabel uiLabel34;
     }
 }

+ 0 - 1
InsuBusiness.cs

@@ -857,7 +857,6 @@ namespace PTMedicalInsurance
                             }
 
                             #region【门诊预结算2206前调用3102医保明细审核事中服务】     
-
                             if (Global.curEvt.ext.isOpenAnalysis)
                             {
                                 //1.获取3102入参报文

+ 2 - 0
Variables/Struct.cs

@@ -257,6 +257,8 @@ namespace PTMedicalInsurance.Variables
 
         public string minpacunt_drug_trac_cnt; //本次结算应上传最小包装追溯码数量
         public string mcs_trac_cnt; //本次结算应上传耗材追溯码数量
+
+        public string wltpayAmt;
     }
 
     //当前环境实时信息