zhanfei 3 settimane fa
parent
commit
8421529a4c

+ 27 - 0
Common/Utils.cs

@@ -365,5 +365,32 @@ namespace PTMedicalInsurance.Common
             //Global.writeLog("ConvertRequest", request.ToString(),joOutput.ToString());
             return joOutput;
         }
+
+        private static string getAreaCode()
+        {
+            string areaCode = Global.pat.insuplc_admdvs ?? Global.inf.areaCode;
+            if (Global.pat.OtherProv == 1)
+            {
+                areaCode = Global.pat.card.SearchAdmCode;
+            }
+            return areaCode;
+        }
+
+        public static bool isOtherCity()
+        {
+            return isOtherCity(getAreaCode());
+        }
+        /// <summary>
+        /// 省内异地
+        /// </summary>
+        /// <returns></returns>
+        public static bool isOtherCity(string areaCode)
+        {
+            if (!string.IsNullOrEmpty(areaCode) && areaCode.Length > 4 && areaCode.Substring(0, 4) != Global.inf.areaCode.Substring(0, 4))
+            {
+                return true;
+            }
+            return false;
+        }
     }
 }

+ 14 - 0
FormSetter/GridViewSetterBase.cs

@@ -80,5 +80,19 @@ namespace PTMedicalInsurance.FormSetter
             //dt.Columns[2].ColumnName = "拼音查找码";
             return dt;
         }
+
+        public void SetCombox(ref System.Windows.Forms.ComboBox cbx, string sqlStr, string displayMember = "Name", string valueMember = "Code")
+        {
+            try
+            {
+                cbx.DataSource = GetDBLKComboxTable(sqlStr);
+                cbx.DisplayMember = displayMember;
+                cbx.ValueMember = valueMember;
+            }
+            catch (Exception ex)
+            {
+                MessageBox.Show($"SetCombox控件{cbx.Name}设置异常:{ex.Message}");
+            }
+        }
     }
 }

+ 46 - 12
Forms/AddSignleDirectory.cs

@@ -1,4 +1,6 @@
 using Newtonsoft.Json.Linq;
+using PTMedicalInsurance.FormSetter;
+using PTMedicalInsurance.Variables;
 using System;
 using System.Collections.Generic;
 using System.ComponentModel;
@@ -15,8 +17,10 @@ namespace PTMedicalInsurance
 
     public partial class AddSingleDirectory : Form
     {
-        private int direcType ;
+        private int direcType;
         public JObject joPamam = new JObject();
+        private GridViewSetterBase grdSetterBase = new GridViewSetterBase();
+
         public AddSingleDirectory()
         {
             InitializeComponent();
@@ -93,18 +97,38 @@ namespace PTMedicalInsurance
                         break;
                     }
             }
+
+            string sqlCondition = " and A.Interface_Dr = '" + Global.inf.interfaceDr.ToString() + "'";
+
+            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 = 'list_type'" + sqlCondition;
+
+            grdSetterBase.SetCombox(ref cbxListType, sqlStr);
+
+            //med_chrgitm_type
+
+            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 = 'med_chrgitm_type'" + sqlCondition;
+
+            grdSetterBase.SetCombox(ref cbxChargeItemType, sqlStr);
         }
-        //private void setValue(DataRow dr)
-        //{
-        //    switch (direcType)
-        //    {
-        //        case 0:
-        //            {
-        //                setDrugInfo(dr);
-        //                break;
-        //            }
-        //    }
-        //}
+
+        private void SetSelectValue(System.Windows.Forms.ComboBox cbx, string targetName)
+        {
+            for (int i = 0; i < cbx.Items.Count; i++)
+            {
+                // 假设数据源是 DataTable,绑定的是 DataRowView
+                if (cbx.Items[i] is DataRowView rowView)
+                {
+                    if (rowView["Name"].ToString() == targetName)
+                    {
+                        cbx.SelectedIndex = i;
+                        break;
+                    }
+                }
+            }
+        }
+
         private void setValue(DataRow dr)
         {
             try
@@ -138,6 +162,12 @@ namespace PTMedicalInsurance
                 tbNationalCode.Text = dr["NationalCode"].ToString();
                 tbNationalName.Text = dr["NationalName"].ToString();
                 tbManufacturers.Text = dr["Manufacturers"].ToString();
+
+                tbMinPackagingQuantity.Text = dr["MinPackagingQuantity"].ToString();
+                cbxListType.SelectedValue = dr["ListType"].ToString();
+                //cbxChargeItemType.SelectedValue = dr["ChargeItemType"].ToString();
+                SetSelectValue(cbxChargeItemType, dr["ChargeItemType"].ToString());
+
                 if (dr["ChargeItemLevel"].ToString() != "")
                 {
                     cbxChargeItemLevel.SelectedIndex = int.Parse(dr["ChargeItemLevel"].ToString()) - 1;
@@ -207,6 +237,10 @@ namespace PTMedicalInsurance
             joPamam.Add("UpdateTime", DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"));
             joPamam.Add("ChargeItemLevel", ChargeItemLevel);
             joPamam.Add("Company", tbCompany.Text);
+
+            joPamam.Add("MinPackagingQuantity", tbMinPackagingQuantity.Text);
+            joPamam.Add("ChargeItemType", cbxChargeItemType.SelectedValue?.ToString());
+            joPamam.Add("ListType", cbxListType.SelectedValue?.ToString());
         }
 
         private void initDrugForm()

+ 72 - 0
Forms/AddSignleDirectory.designer.cs

@@ -97,6 +97,12 @@
             this.rtbLimitRange = new System.Windows.Forms.RichTextBox();
             this.gbConnotation = new System.Windows.Forms.GroupBox();
             this.rtbConnotation = new System.Windows.Forms.RichTextBox();
+            this.cbxListType = new System.Windows.Forms.ComboBox();
+            this.cbxChargeItemType = new System.Windows.Forms.ComboBox();
+            this.label3 = new System.Windows.Forms.Label();
+            this.label2 = new System.Windows.Forms.Label();
+            this.tbMinPackagingQuantity = new System.Windows.Forms.TextBox();
+            this.label1 = new System.Windows.Forms.Label();
             this.pnlTop.SuspendLayout();
             this.pnlBottom.SuspendLayout();
             this.pnlClient.SuspendLayout();
@@ -631,6 +637,12 @@
             // 
             // pnlClient
             // 
+            this.pnlClient.Controls.Add(this.cbxListType);
+            this.pnlClient.Controls.Add(this.cbxChargeItemType);
+            this.pnlClient.Controls.Add(this.label3);
+            this.pnlClient.Controls.Add(this.label2);
+            this.pnlClient.Controls.Add(this.tbMinPackagingQuantity);
+            this.pnlClient.Controls.Add(this.label1);
             this.pnlClient.Controls.Add(this.cbxChargeItemLevel);
             this.pnlClient.Controls.Add(this.tbCompany);
             this.pnlClient.Controls.Add(this.lbCompany);
@@ -838,6 +850,60 @@
             this.rtbConnotation.TabIndex = 0;
             this.rtbConnotation.Text = "";
             // 
+            // cbxListType
+            // 
+            this.cbxListType.FormattingEnabled = true;
+            this.cbxListType.Location = new System.Drawing.Point(799, 243);
+            this.cbxListType.Name = "cbxListType";
+            this.cbxListType.Size = new System.Drawing.Size(225, 23);
+            this.cbxListType.TabIndex = 101;
+            // 
+            // cbxChargeItemType
+            // 
+            this.cbxChargeItemType.FormattingEnabled = true;
+            this.cbxChargeItemType.Location = new System.Drawing.Point(455, 243);
+            this.cbxChargeItemType.Name = "cbxChargeItemType";
+            this.cbxChargeItemType.Size = new System.Drawing.Size(225, 23);
+            this.cbxChargeItemType.TabIndex = 100;
+            // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.Location = new System.Drawing.Point(700, 247);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(67, 15);
+            this.label3.TabIndex = 99;
+            this.label3.Text = "目录类别";
+            // 
+            // label2
+            // 
+            this.label2.AutoSize = true;
+            this.label2.Location = new System.Drawing.Point(356, 247);
+            this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label2.Name = "label2";
+            this.label2.Size = new System.Drawing.Size(97, 15);
+            this.label2.TabIndex = 98;
+            this.label2.Text = "收费项目类别";
+            // 
+            // tbMinPackagingQuantity
+            // 
+            this.tbMinPackagingQuantity.Location = new System.Drawing.Point(154, 243);
+            this.tbMinPackagingQuantity.Margin = new System.Windows.Forms.Padding(4);
+            this.tbMinPackagingQuantity.Name = "tbMinPackagingQuantity";
+            this.tbMinPackagingQuantity.Size = new System.Drawing.Size(179, 25);
+            this.tbMinPackagingQuantity.TabIndex = 97;
+            // 
+            // label1
+            // 
+            this.label1.AutoSize = true;
+            this.label1.Location = new System.Drawing.Point(34, 247);
+            this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label1.Name = "label1";
+            this.label1.Size = new System.Drawing.Size(112, 15);
+            this.label1.TabIndex = 96;
+            this.label1.Text = "最小包装转换数";
+            // 
             // AddSingleDirectory
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
@@ -938,5 +1004,11 @@
         private System.Windows.Forms.TextBox tbCompany;
         private System.Windows.Forms.Label lbCompany;
         private System.Windows.Forms.ComboBox cbxChargeItemLevel;
+        private System.Windows.Forms.ComboBox cbxListType;
+        private System.Windows.Forms.ComboBox cbxChargeItemType;
+        private System.Windows.Forms.Label label3;
+        private System.Windows.Forms.Label label2;
+        private System.Windows.Forms.TextBox tbMinPackagingQuantity;
+        private System.Windows.Forms.Label label1;
     }
 }

+ 29 - 0
Readme.md

@@ -0,0 +1,29 @@
+## 医保业务DLL库使用说明:
+  该项目遵循以下原则:
+
+  1. Master为空项目,仅保留说明文件,便于其他新分支的建立
+
+  2. 按市+医保类型建立代码分支,如“安徽基线版”,分支名为:AnHui_Base,医保类型包括:Base(基线版)、工伤(Injury)、异地(Offsite)、其它(Other),如果没有可适当增加
+
+  3. 每个分支下存放每个省的业务逻辑代码项目,项目名应遵循与分支名保持一致,如AnHui_Base
+
+  4. 每个分支的根目录应保留本Readme.md文档,同时应将各个分支的特殊业务场景或版本更新日志放到此文档
+
+  5. 使用手册见文档:https://dqqslxaq2y.feishu.cn/docx/VxZhdSrFDonnwTxxTPZctr7onSb?from=from_copylink
+ 
+
+## 业务分支说明(分支特性,请做相应调整)
+ 名称:重庆医保
+	接口开发:东软
+	上线范围:结算(社保、身份证、电子医保卡)、进销存、事前事中、Lis项目、清单上传
+
+### 版本特性:
+  - 住院结算,默认不采用个人账户支付(结算界面默认不选中)
+
+  - 本地和异地结算单打印样式不同
+
+  - 对码界面增加了“价格”显示
+
+  - 只有省外异地(直辖市)
+
+