Bladeren bron

pref: 住院结算支持共济结算

zhengjie 8 maanden geleden
bovenliggende
commit
cbe50aa88d

+ 43 - 0
Business/AbstractProcess.cs

@@ -1,9 +1,11 @@
 using MedicalInsurance.Forms;
+using Newtonsoft.Json;
 using Newtonsoft.Json.Linq;
 using PTMedicalInsurance.Helper;
 using PTMedicalInsurance.Variables;
 using System;
 using System.Collections.Generic;
+using System.Data;
 using System.Linq;
 using System.Text;
 using System.Threading.Tasks;
@@ -137,5 +139,46 @@ namespace PTMedicalInsurance.Business
             return joRtn;
 
         }
+
+
+        protected JObject CancelMutualAidPay(JObject joRtn)
+        {
+            DataTable dtSettlInfo = (DataTable)JsonConvert.DeserializeObject(joRtn["result"]["data"].ToString(), (typeof(DataTable)));
+            if (dtSettlInfo.Rows.Count != 1)
+            {
+                Global.writeLog("无共济支付信息!");
+                return JsonHelper.setExceptionJson(-1, "未查询到相关结算信息!", "");
+            }
+
+            int mutualAidFlag = 0;
+            if (!string.IsNullOrEmpty(dtSettlInfo.Rows[0]["MutualAidFlag"].ToString()))
+            {
+                mutualAidFlag = Convert.ToInt32(dtSettlInfo.Rows[0]["MutualAidFlag"].ToString());
+            }
+            Global.writeLog("共济支付标志:" + mutualAidFlag);
+            if (mutualAidFlag > 0)
+            {
+                //开启自付界面,因涉及到多次自付
+                MutualAid frmMA = new MutualAid(Global.pat.settlID);
+                if (frmMA.dtSettlInfo.Rows.Count != 0)
+                {
+                    frmMA.WindowState = FormWindowState.Maximized;
+                    if (frmMA.ShowDialog() == DialogResult.OK)
+                    {
+
+                    }
+                    else
+                    {
+                        return JsonHelper.setExceptionJson(-1, "收款员取消共济支付撤销!", null);
+                    }
+
+                }
+                else
+                {
+                    return JsonHelper.setExceptionJson(-1, "开启共济支付失败,原因为未检测到有效的被共济人的医保结算数据!", null);
+                }
+            }
+            return joRtn;
+        }
     }
 }

+ 4 - 1
Business/Inpatient/IPQuerySettlementProcess.cs

@@ -14,7 +14,7 @@ namespace PTMedicalInsurance.Business
         public override CallResult Process(JObject input)
         {
             //查询结算表
-            string sqlStr = "SELECT * FROM  BS_MedInsuSettlement WHERE billType = 1 and Hospital_Dr=" + Global.inf.hospitalDr
+            string sqlStr = "SELECT * FROM  BS_MedInsuSettlement WHERE billType = 1  and ValidFlag = 1  and Hospital_Dr=" + Global.inf.hospitalDr
                           + " and Adm_Dr='" + Global.pat.adm_Dr + "'"
                           + " and MdtrtID='" + Global.pat.mdtrtID + "'"
                           + " Order By ID DESC ";
@@ -45,6 +45,9 @@ namespace PTMedicalInsurance.Business
                 Global.pat.settlID = Global.pat.SettID_YBJSB;
             }
 
+            //取消共济(成都)
+            joSettlInfo = CancelMutualAidPay(joSettlInfo);
+
             return Success();
         }
     }

+ 0 - 37
Business/Outpatient/OPQuerySettlementProcess.cs

@@ -43,42 +43,5 @@ namespace PTMedicalInsurance.Business
             return Success();
         }
 
-        private JObject CancelMutualAidPay(JObject joRtn)
-        {
-            DataTable dtSettlInfo = (DataTable)JsonConvert.DeserializeObject(joRtn["result"]["data"].ToString(), (typeof(DataTable)));
-            if (dtSettlInfo.Rows.Count != 1)
-            {
-                return JsonHelper.setExceptionJson(-1, "未查询到相关结算信息!","");
-            }
-
-            int mutualAidFlag = 0;
-            if (!string.IsNullOrEmpty(dtSettlInfo.Rows[0]["MutualAidFlag"].ToString()))
-            {
-                mutualAidFlag = Convert.ToInt32(dtSettlInfo.Rows[0]["MutualAidFlag"].ToString());
-            }
-            if (mutualAidFlag > 0)
-            {
-                //开启自付界面,因涉及到多次自付
-                MutualAid frmMA = new MutualAid(Global.pat.settlID);
-                if (frmMA.dtSettlInfo.Rows.Count != 0)
-                {
-                    frmMA.WindowState = FormWindowState.Maximized;
-                    if (frmMA.ShowDialog() == DialogResult.OK)
-                    {
-
-                    }
-                    else
-                    {
-                       return JsonHelper.setExceptionJson(-1, "收款员取消共济支付撤销!", null);
-                    }
-
-                }
-                else
-                {
-                    return JsonHelper.setExceptionJson(-1, "开启共济支付失败,原因为未检测到有效的被共济人的医保结算数据!", null);
-                }
-            }
-            return joRtn;
-        }
     }
 }

+ 0 - 54
Business/Outpatient/OPSettlementProcess.cs

@@ -55,59 +55,5 @@ namespace PTMedicalInsurance.Business
                 }
             }
         }
-<<<<<<< HEAD
-        
-=======
-        /// <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;
-
-        }
->>>>>>> remotes/origin/ChengDu_Base
     }
 }

+ 52 - 51
Forms/SettlementForm.designer.cs

@@ -43,12 +43,13 @@ namespace PTMedicalInsurance.Forms
         /// </summary>
         private void InitializeComponent()
         {
-            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();
+            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();
             this.pnlBottom = new Sunny.UI.UIPanel();
+            this.cbMutualAid = new Sunny.UI.UICheckBox();
             this.uiButton2 = new Sunny.UI.UIButton();
             this.uiButton1 = new Sunny.UI.UIButton();
             this.pnlClient = new Sunny.UI.UIPanel();
@@ -116,7 +117,6 @@ 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();
@@ -143,6 +143,20 @@ namespace PTMedicalInsurance.Forms
             this.pnlBottom.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
             this.pnlBottom.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
+            // cbMutualAid
+            // 
+            this.cbMutualAid.BackColor = System.Drawing.Color.Transparent;
+            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);
+            // 
             // uiButton2
             // 
             this.uiButton2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
@@ -1049,50 +1063,50 @@ namespace PTMedicalInsurance.Forms
             // dgvSetlDetail
             // 
             this.dgvSetlDetail.AllowUserToAddRows = false;
-            dataGridViewCellStyle6.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
-            this.dgvSetlDetail.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle6;
+            dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255)))));
+            this.dgvSetlDetail.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1;
             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;
-            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;
+            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;
             this.dgvSetlDetail.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
-            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;
+            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;
             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";
-            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;
+            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;
             this.dgvSetlDetail.RowHeadersWidth = 51;
-            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;
+            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;
             this.dgvSetlDetail.RowTemplate.Height = 23;
             this.dgvSetlDetail.SelectedIndex = -1;
             this.dgvSetlDetail.ShowGridLine = false;
@@ -1101,19 +1115,6 @@ 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;