Quellcode durchsuchen

pref:住院支持共济

zhengjie vor 8 Monaten
Ursprung
Commit
5ab384ed0c

+ 54 - 1
Business/AbstractProcess.cs

@@ -1,10 +1,13 @@
-using Newtonsoft.Json.Linq;
+using MedicalInsurance.Forms;
+using Newtonsoft.Json.Linq;
 using PTMedicalInsurance.Helper;
+using PTMedicalInsurance.Variables;
 using System;
 using System.Collections.Generic;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
+using System.Windows.Forms;
 
 namespace PTMedicalInsurance.Business
 {
@@ -84,5 +87,55 @@ namespace PTMedicalInsurance.Business
         /// <returns></returns>
         public abstract CallResult Process(JObject input);
 
+
+        /// <summary>
+        /// 根据是否需要使用共济支付重新计算结算数据
+        /// </summary>
+        /// <param name="setlInfo"></param>
+        /// <returns></returns>
+        protected JObject MutualAidPay(string setlInfo)
+        {
+            JObject joRtn = JObject.Parse(setlInfo);
+            if (Global.pat.mutualAidFlag)
+            {
+                try
+                {
+                    decimal psnCashPay = decimal.Parse(JsonHelper.getDestValue(joRtn, "psn_cash_pay"));
+                    if (psnCashPay == 0)
+                    {
+                        MessageBox.Show("该患者自付金额为0,不需要进行共济支付!");
+                    }
+                    else
+                    {
+                        //开启自付界面,因涉及到多次自付
+                        MutualAid frmMA = new MutualAid(joRtn);
+                        if (frmMA.dtSettlInfo.Rows.Count != 0)
+                        {
+                            frmMA.WindowState = FormWindowState.Maximized;
+                            if (frmMA.ShowDialog() == DialogResult.OK)
+                            {
+                                joRtn = JObject.Parse(frmMA.finalSettlementInfo);
+
+                            }
+                            else
+                            {
+                                MessageBox.Show("开启共济支付失败,原因为收款员取消共济支付!");
+                            }
+
+                        }
+                        else
+                        {
+                            MessageBox.Show("开启共济支付失败,原因为未检测到有效的被共济人的医保结算数据!");
+                        }
+                    }
+                }
+                catch (Exception ex)
+                {
+                    MessageBox.Show("共济支付失败:" + ex.Message);
+                }
+            }
+            return joRtn;
+
+        }
     }
 }

+ 6 - 2
Business/Inpatient/IPSettlementProcess.cs

@@ -35,7 +35,6 @@ namespace PTMedicalInsurance.Business
             //电子凭证存在二次校验且验证码为动态,必须使用最新码
             joSettlement["mdtrt_cert_no"] = Global.pat.mdtrtcertNO;
 
-
             //基线版扩展
             JObject joDataExp = (JObject)joSettlement["exp_content"] ?? new JObject();
             joDataExp.Add("card_token", Global.pat.card.Cardtoken);
@@ -43,6 +42,7 @@ namespace PTMedicalInsurance.Business
             joSettlement["exp_content"] = joDataExp;
             joSettlement.Add("data", joSettlement);
 
+
             
             JObject jo2304Rtn = invoker.invokeCenterService(TradeEnum.InpatientSettlement, joSettlement);
             if (JsonHelper.parseCenterRtnValue(jo2304Rtn, out errMsg) != 0)
@@ -66,8 +66,12 @@ namespace PTMedicalInsurance.Business
                 {
                     return Exception(-1, "云医保平台保存结算明细失败", errMsg);
                 }
+
+                // 住院共济支付
+                JObject joSetlinfoAid = MutualAidPay(JsonHelper.toJsonString(joSetlinfo));
+
                 //返回给HIS
-                if (hIS.returnInpatSettlementInfo(OrginalInput, joSetlinfo, out outParam) != 0)
+                if (hIS.returnInpatSettlementInfo(OrginalInput, joSetlinfoAid, out outParam) != 0)
                 {
                     return Exception(-1, "返回结算信息给HIS", outParam);
                 }

+ 1 - 49
Business/Outpatient/OPSettlementProcess.cs

@@ -55,54 +55,6 @@ namespace PTMedicalInsurance.Business
                 }
             }
         }
-        /// <summary>
-        /// 根据是否需要使用共济支付重新计算结算数据
-        /// </summary>
-        /// <param name="setlInfo"></param>
-        /// <returns></returns>
-        private JObject MutualAidPay(string setlInfo)
-        {
-            JObject joRtn = JObject.Parse(setlInfo);
-            if (Global.pat.mutualAidFlag)
-            {
-                try
-                {
-                    decimal psnCashPay = decimal.Parse(JsonHelper.getDestValue(joRtn, "psn_cash_pay"));
-                    if (psnCashPay == 0)
-                    {
-                        MessageBox.Show("该患者自付金额为0,不需要进行共济支付!");
-                    }
-                    else
-                    {
-                        //开启自付界面,因涉及到多次自付
-                        MutualAid frmMA = new MutualAid(joRtn);
-                        if (frmMA.dtSettlInfo.Rows.Count != 0)
-                        {
-                            frmMA.WindowState = FormWindowState.Maximized;
-                            if (frmMA.ShowDialog() == DialogResult.OK)
-                            {
-                                joRtn = JObject.Parse(frmMA.finalSettlementInfo);
-
-                            }
-                            else
-                            {
-                                MessageBox.Show("开启共济支付失败,原因为收款员取消共济支付!");
-                            }
-
-                        }
-                        else
-                        {
-                            MessageBox.Show("开启共济支付失败,原因为未检测到有效的被共济人的医保结算数据!");
-                        }
-                    }
-                }
-                catch (Exception ex)
-                {
-                    MessageBox.Show("共济支付失败:" + ex.Message);
-                }
-            }
-            return joRtn;
-
-        }
+        
     }
 }

+ 1 - 0
Forms/SettlementForm.cs

@@ -108,6 +108,7 @@ namespace PTMedicalInsurance.Forms
 
         private void uiButton1_Click(object sender, EventArgs e)
         {
+            Global.pat.mutualAidFlag = cbMutualAid.Checked;
             DialogResult = DialogResult.OK;
         }
 

+ 53 - 39
Forms/SettlementForm.designer.cs

@@ -43,11 +43,11 @@ namespace PTMedicalInsurance.Forms
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle();
             this.pnlBottom = new Sunny.UI.UIPanel();
             this.uiButton2 = new Sunny.UI.UIButton();
             this.uiButton1 = new Sunny.UI.UIButton();
@@ -116,6 +116,7 @@ namespace PTMedicalInsurance.Forms
             this.uiLabel30 = new Sunny.UI.UILabel();
             this.gbSetldetail = new Sunny.UI.UIGroupBox();
             this.dgvSetlDetail = new Sunny.UI.UIDataGridView();
+            this.cbMutualAid = new Sunny.UI.UICheckBox();
             this.pnlBottom.SuspendLayout();
             this.pnlClient.SuspendLayout();
             this.gbSetlinfo.SuspendLayout();
@@ -127,6 +128,7 @@ namespace PTMedicalInsurance.Forms
             // 
             // pnlBottom
             // 
+            this.pnlBottom.Controls.Add(this.cbMutualAid);
             this.pnlBottom.Controls.Add(this.uiButton2);
             this.pnlBottom.Controls.Add(this.uiButton1);
             this.pnlBottom.Dock = System.Windows.Forms.DockStyle.Bottom;
@@ -149,9 +151,7 @@ namespace PTMedicalInsurance.Forms
             this.uiButton2.Location = new System.Drawing.Point(380, 16);
             this.uiButton2.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiButton2.Name = "uiButton2";
-            this.uiButton2.RectHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(192)))), ((int)(((byte)(192)))), ((int)(((byte)(255)))));
             this.uiButton2.Size = new System.Drawing.Size(100, 38);
-            this.uiButton2.Style = Sunny.UI.UIStyle.Custom;
             this.uiButton2.TabIndex = 1;
             this.uiButton2.Text = "放弃";
             this.uiButton2.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
@@ -1049,50 +1049,50 @@ namespace PTMedicalInsurance.Forms
             // dgvSetlDetail
             // 
             this.dgvSetlDetail.AllowUserToAddRows = false;
-            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            this.dgvSetlDetail.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
+            dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgvSetlDetail.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
             this.dgvSetlDetail.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
             this.dgvSetlDetail.BorderStyle = System.Windows.Forms.BorderStyle.None;
             this.dgvSetlDetail.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.None;
             this.dgvSetlDetail.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single;
-            dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
-            dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White;
-            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
-            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvSetlDetail.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
+            dataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter;
+            dataGridViewCellStyle7.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle7.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle7.ForeColor = System.Drawing.Color.White;
+            dataGridViewCellStyle7.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText;
+            dataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvSetlDetail.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle7;
             this.dgvSetlDetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle3.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
-            this.dgvSetlDetail.DefaultCellStyle = dataGridViewCellStyle3;
+            dataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle8.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle8.Font = new System.Drawing.Font("微软雅黑", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle8.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle8.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle8.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.False;
+            this.dgvSetlDetail.DefaultCellStyle = dataGridViewCellStyle8;
             this.dgvSetlDetail.Dock = System.Windows.Forms.DockStyle.Fill;
             this.dgvSetlDetail.EnableHeadersVisualStyles = false;
             this.dgvSetlDetail.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.dgvSetlDetail.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(104)))), ((int)(((byte)(173)))), ((int)(((byte)(255)))));
             this.dgvSetlDetail.Location = new System.Drawing.Point(0, 32);
             this.dgvSetlDetail.Name = "dgvSetlDetail";
-            dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
-            dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvSetlDetail.RowHeadersDefaultCellStyle = dataGridViewCellStyle4;
+            dataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft;
+            dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle9.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle9.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle9.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle9.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvSetlDetail.RowHeadersDefaultCellStyle = dataGridViewCellStyle9;
             this.dgvSetlDetail.RowHeadersWidth = 51;
-            dataGridViewCellStyle5.BackColor = System.Drawing.Color.White;
-            dataGridViewCellStyle5.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle5.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            dataGridViewCellStyle5.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
-            dataGridViewCellStyle5.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
-            this.dgvSetlDetail.RowsDefaultCellStyle = dataGridViewCellStyle5;
+            dataGridViewCellStyle10.BackColor = System.Drawing.Color.White;
+            dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle10.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            dataGridViewCellStyle10.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(220)))), ((int)(((byte)(236)))), ((int)(((byte)(255)))));
+            dataGridViewCellStyle10.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48)))));
+            this.dgvSetlDetail.RowsDefaultCellStyle = dataGridViewCellStyle10;
             this.dgvSetlDetail.RowTemplate.Height = 23;
             this.dgvSetlDetail.SelectedIndex = -1;
             this.dgvSetlDetail.ShowGridLine = false;
@@ -1101,6 +1101,19 @@ namespace PTMedicalInsurance.Forms
             this.dgvSetlDetail.TabIndex = 1;
             this.dgvSetlDetail.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
+            // cbMutualAid
+            // 
+            this.cbMutualAid.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.cbMutualAid.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.cbMutualAid.Location = new System.Drawing.Point(26, 16);
+            this.cbMutualAid.MinimumSize = new System.Drawing.Size(1, 1);
+            this.cbMutualAid.Name = "cbMutualAid";
+            this.cbMutualAid.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0);
+            this.cbMutualAid.Size = new System.Drawing.Size(202, 29);
+            this.cbMutualAid.TabIndex = 3;
+            this.cbMutualAid.Text = "启用共济支付";
+            this.cbMutualAid.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
             // SettlementForm
             // 
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
@@ -1192,5 +1205,6 @@ namespace PTMedicalInsurance.Forms
         private Sunny.UI.UITextBox tbClearingType;
         private Sunny.UI.UILabel uiLabel29;
         private Sunny.UI.UIButton uiButton2;
+        private Sunny.UI.UICheckBox cbMutualAid;
     }
 }