Browse Source

fix: 门诊慢特病bug

zhengjie 1 year ago
parent
commit
f3a088f97c
2 changed files with 73 additions and 57 deletions
  1. 43 27
      Forms/OutpatientRegistration.cs
  2. 30 30
      Forms/OutpatientRegistration.designer.cs

+ 43 - 27
Forms/OutpatientRegistration.cs

@@ -21,7 +21,8 @@ namespace PTMedicalInsurance.Forms
 {
     public partial class OutpatientRegistration : Form
     {
-        private InvokeHelper invoker =new InvokeHelper();
+        private InvokeHelper invoker = new InvokeHelper();
+        BindingSource bindingSource = new BindingSource();
         public OutpatientRegistration()
         {
             InitializeComponent();
@@ -48,7 +49,7 @@ namespace PTMedicalInsurance.Forms
 
                 //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 = 'IPT_TYPE'" + sqlCondition;
                 //SetDBLKCombox(ref dblkcbxHospType, sqlStr);                
-                
+
             }
             else
             {
@@ -69,9 +70,12 @@ namespace PTMedicalInsurance.Forms
                 //SetDBLKCombox(ref dblkcbxHospType, sqlStr);
 
                 sqlStr = " SELECT Code, Name,'' as SearchCode  FROM HB_MedInsuDirectory A where A.ValidFlag='1' AND A.HisType=6" + sqlCondition;
-                SetDBLKCombox(ref dblkcbxDisease, sqlStr);
+                DataTable dt = GetDBLKComboxTable(sqlStr);
+                bindingSource.DataSource = dt;
+                SetDBLKCombox(ref dblkcbxDisease, bindingSource);
+
             }
-                       
+
         }
 
         public Boolean b2001 = false;
@@ -84,17 +88,17 @@ namespace PTMedicalInsurance.Forms
         //private DataTable dtSettelmentType;
         //private DataTable dtHospType;
         //险种
-        public string  insuType { get; set; }
+        public string insuType { get; set; }
         public string insuTypeName { get; set; }
         //医疗类别
         public string med_type { get; set; }
         public string med_type_name { get; set; }
         //诊断
         public string diseCodg { get; set; }
-        public string diseName{ get; set; }
+        public string diseName { get; set; }
         //手术
         public string oprn_oprt_code { get; set; }
-        public string oprn_oprt_name{ get; set; }
+        public string oprn_oprt_name { get; set; }
         //病种
         public string dise_type_code { get; set; }
         public string dise_type_name { get; set; }
@@ -106,7 +110,7 @@ namespace PTMedicalInsurance.Forms
         public string relTtpFlag = "0";
         public string hospType = "0";
         public string otpErReflFlag = "0";
-        public string mdtrtGrpType="0";
+        public string mdtrtGrpType = "0";
         public string claTrtFlag = "0";
         public string unifPayStdType = "0";
         public string ouOrEmrefFlag = "0";
@@ -124,7 +128,7 @@ namespace PTMedicalInsurance.Forms
         {
             InvokeHelper invoker = new InvokeHelper();
             dynamic joInparm = new JObject();
-            
+
             dynamic joTmp = new JObject();
             joTmp.sqlStr = sqlStr;
             JArray jaParams = new JArray();
@@ -132,7 +136,7 @@ namespace PTMedicalInsurance.Forms
             joInparm.Add("params", JArray.FromObject(jaParams));
             joInparm.code = "09010014";
             string inParam = joInparm.ToString();
-            JObject joRtn = invoker.invokeInsuService(inParam,"获取下拉框消息");
+            JObject joRtn = invoker.invokeInsuService(inParam, "获取下拉框消息");
             //dynamic jsonRtn = JsonConvert.DeserializeObject(strRtn);
             DataTable dt = (DataTable)joRtn["result"].ToObject(typeof(DataTable));
             //dt.Columns[0].ColumnName = "编码";
@@ -140,12 +144,13 @@ namespace PTMedicalInsurance.Forms
             //dt.Columns[2].ColumnName = "拼音查找码";
             return dt;
         }
-        private void SetDBLKCombox(ref  PTControl.DBLookupCombox dblcbx, string sqlStr)
+
+        private void SetDBLKCombox(ref PTControl.DBLookupCombox dblcbx, object datasource)
         {
             dblcbx.sDisplayField = "Code,Name,SearchCode";
             dblcbx.sDisplayMember = "名称";
             dblcbx.sKeyWords = "Code,SearchCode";
-            dblcbx.DataSource = GetDBLKComboxTable(sqlStr);
+            dblcbx.DataSource = datasource;
             dblcbx.RowFilterVisible = true;
             dblcbx.TextBox.Width = 400;
             dblcbx.DataGridView.Width = 400;
@@ -155,6 +160,10 @@ namespace PTMedicalInsurance.Forms
             dblcbx.DataGridView.Columns[0].Width = 100;
             dblcbx.DataGridView.Columns[1].Width = 200;
         }
+        private void SetDBLKCombox(ref  PTControl.DBLookupCombox dblcbx, string sqlStr)
+        {
+            SetDBLKCombox(ref dblcbx, GetDBLKComboxTable(sqlStr));
+        }
         private void OutpatientRegistration_Load(object sender, EventArgs e)
         {
             dgvDiagnose.AutoGenerateColumns = false;
@@ -239,23 +248,30 @@ namespace PTMedicalInsurance.Forms
                 JObject data5301 = new JObject();
                 data5301.Add("data", Jo5301);
                 JObject Out5301 = new JObject();
-                Out5301 = invoker.invokeCenterService("5301", JObject.Parse(JsonHelper.setCenterInpar("5301", data5301)));                
-                JArray joMbxx = JArray.Parse(JsonHelper.getDestValue(Out5301, "output.feedetail"));
-                if (joMbxx.Count > 0)
-                {
-                    for (int i = 0; i < joMbxx.Count; i++)
-                    {
-                        Utils.convertTimestamp((JObject)joMbxx[i], "begndate");
-                        Utils.convertTimestamp((JObject)joMbxx[i], "enddate");
-
-                    }
-                    MessageBox.Show("人员慢病信息查询结果:" + joMbxx.ToString());
-                }
-                else
+                Out5301 = invoker.invokeCenterService("5301", JObject.Parse(JsonHelper.setCenterInpar("5301", data5301)));
+                loadOPDiseInfo(Out5301);
+            }
+        }
+        public void loadOPDiseInfo(JObject joRtn)
+        {
+            JArray joMbxx = JArray.Parse(JsonHelper.getDestValue(joRtn, "output.feedetail"));
+            if (joMbxx.Count > 0)
+            {
+                foreach (JObject joRow in joMbxx)
                 {
-                    MessageBox.Show("人员慢病信息查询结果:" + Out5301.ToString());
+                    joRow["Code"] = joRow["opsp_dise_code"].ToString();
+                    joRow["Name"] = joRow["opsp_dise_name"].ToString();
+                    joRow["SearchCode"] = joRow["opsp_dise_code"].ToString();
                 }
-                
+
+                DataTable dt = joMbxx.ToObject<DataTable>();
+                bindingSource.DataSource = dt;
+                bindingSource.ResetBindings(true);
+                //MessageBox.Show("人员慢病信息查询结果:" + dt.Rows[0]["Name"]);
+            }
+            else
+            {
+                MessageBox.Show("人员慢病信息查询结果:" + joRtn.ToString());
             }
         }
 

+ 30 - 30
Forms/OutpatientRegistration.designer.cs

@@ -30,7 +30,7 @@ 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();
             this.panel1 = new System.Windows.Forms.Panel();
             this.dblkcbxOuOrEmref = new PTControl.DBLookupCombox();
             this.label10 = new System.Windows.Forms.Label();
@@ -120,7 +120,7 @@ namespace PTMedicalInsurance.Forms
             "1 急诊 ",
             "2 转诊",
             "3 转诊合并急诊"});
-            this.dblkcbxOuOrEmref.Location = new System.Drawing.Point(648, 223);
+            this.dblkcbxOuOrEmref.Location = new System.Drawing.Point(699, 223);
             this.dblkcbxOuOrEmref.Name = "dblkcbxOuOrEmref";
             this.dblkcbxOuOrEmref.NullValue = "";
             this.dblkcbxOuOrEmref.PopupGridAutoSize = false;
@@ -128,7 +128,7 @@ namespace PTMedicalInsurance.Forms
             this.dblkcbxOuOrEmref.sDisplayField = "";
             this.dblkcbxOuOrEmref.sDisplayMember = "";
             this.dblkcbxOuOrEmref.SeparatorChar = "|";
-            this.dblkcbxOuOrEmref.Size = new System.Drawing.Size(257, 23);
+            this.dblkcbxOuOrEmref.Size = new System.Drawing.Size(160, 30);
             this.dblkcbxOuOrEmref.sKeyWords = "";
             this.dblkcbxOuOrEmref.sValueMember = "";
             this.dblkcbxOuOrEmref.TabIndex = 52;
@@ -141,7 +141,7 @@ namespace PTMedicalInsurance.Forms
             this.label10.Location = new System.Drawing.Point(506, 226);
             this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label10.Name = "label10";
-            this.label10.Size = new System.Drawing.Size(135, 15);
+            this.label10.Size = new System.Drawing.Size(186, 22);
             this.label10.TabIndex = 51;
             this.label10.Text = "门诊急诊转诊标志";
             this.label10.Click += new System.EventHandler(this.label10_Click);
@@ -159,7 +159,7 @@ namespace PTMedicalInsurance.Forms
             "6\t非体外循环"});
             this.cbxUnifPayStdType.Location = new System.Drawing.Point(163, 223);
             this.cbxUnifPayStdType.Name = "cbxUnifPayStdType";
-            this.cbxUnifPayStdType.Size = new System.Drawing.Size(257, 23);
+            this.cbxUnifPayStdType.Size = new System.Drawing.Size(257, 30);
             this.cbxUnifPayStdType.TabIndex = 50;
             // 
             // label7
@@ -169,7 +169,7 @@ namespace PTMedicalInsurance.Forms
             this.label7.Location = new System.Drawing.Point(35, 226);
             this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label7.Name = "label7";
-            this.label7.Size = new System.Drawing.Size(103, 15);
+            this.label7.Size = new System.Drawing.Size(142, 22);
             this.label7.TabIndex = 49;
             this.label7.Text = "包干标准类型";
             // 
@@ -242,7 +242,7 @@ namespace PTMedicalInsurance.Forms
             this.dblkcbxHospType.sDisplayField = "";
             this.dblkcbxHospType.sDisplayMember = "";
             this.dblkcbxHospType.SeparatorChar = "|";
-            this.dblkcbxHospType.Size = new System.Drawing.Size(257, 23);
+            this.dblkcbxHospType.Size = new System.Drawing.Size(257, 30);
             this.dblkcbxHospType.sKeyWords = "";
             this.dblkcbxHospType.sValueMember = "";
             this.dblkcbxHospType.TabIndex = 44;
@@ -255,7 +255,7 @@ namespace PTMedicalInsurance.Forms
             this.label8.Location = new System.Drawing.Point(506, 177);
             this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label8.Name = "label8";
-            this.label8.Size = new System.Drawing.Size(71, 15);
+            this.label8.Size = new System.Drawing.Size(98, 22);
             this.label8.TabIndex = 43;
             this.label8.Text = "住院类型";
             // 
@@ -270,7 +270,7 @@ namespace PTMedicalInsurance.Forms
             "4.无症状感染者"});
             this.cbxMdtrtGrpType.Location = new System.Drawing.Point(163, 174);
             this.cbxMdtrtGrpType.Name = "cbxMdtrtGrpType";
-            this.cbxMdtrtGrpType.Size = new System.Drawing.Size(257, 23);
+            this.cbxMdtrtGrpType.Size = new System.Drawing.Size(257, 30);
             this.cbxMdtrtGrpType.TabIndex = 42;
             // 
             // label9
@@ -280,7 +280,7 @@ namespace PTMedicalInsurance.Forms
             this.label9.Location = new System.Drawing.Point(35, 177);
             this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label9.Name = "label9";
-            this.label9.Size = new System.Drawing.Size(103, 15);
+            this.label9.Size = new System.Drawing.Size(142, 22);
             this.label9.TabIndex = 41;
             this.label9.Text = "就诊人群类型";
             // 
@@ -295,7 +295,7 @@ namespace PTMedicalInsurance.Forms
             this.dblkcbxDiseaseType.sDisplayField = "";
             this.dblkcbxDiseaseType.sDisplayMember = "";
             this.dblkcbxDiseaseType.SeparatorChar = "|";
-            this.dblkcbxDiseaseType.Size = new System.Drawing.Size(257, 23);
+            this.dblkcbxDiseaseType.Size = new System.Drawing.Size(257, 30);
             this.dblkcbxDiseaseType.sKeyWords = "";
             this.dblkcbxDiseaseType.sValueMember = "";
             this.dblkcbxDiseaseType.TabIndex = 23;
@@ -313,7 +313,7 @@ namespace PTMedicalInsurance.Forms
             this.dblkcbxSettelmentWay.sDisplayField = "";
             this.dblkcbxSettelmentWay.sDisplayMember = "";
             this.dblkcbxSettelmentWay.SeparatorChar = "|";
-            this.dblkcbxSettelmentWay.Size = new System.Drawing.Size(257, 23);
+            this.dblkcbxSettelmentWay.Size = new System.Drawing.Size(257, 30);
             this.dblkcbxSettelmentWay.sKeyWords = "";
             this.dblkcbxSettelmentWay.sValueMember = "";
             this.dblkcbxSettelmentWay.TabIndex = 22;
@@ -331,7 +331,7 @@ namespace PTMedicalInsurance.Forms
             this.dblkcbxOperation.sDisplayField = "";
             this.dblkcbxOperation.sDisplayMember = "";
             this.dblkcbxOperation.SeparatorChar = "|";
-            this.dblkcbxOperation.Size = new System.Drawing.Size(257, 23);
+            this.dblkcbxOperation.Size = new System.Drawing.Size(257, 30);
             this.dblkcbxOperation.sKeyWords = "";
             this.dblkcbxOperation.sValueMember = "";
             this.dblkcbxOperation.TabIndex = 21;
@@ -349,7 +349,7 @@ namespace PTMedicalInsurance.Forms
             this.dblkcbxDisease.sDisplayField = "";
             this.dblkcbxDisease.sDisplayMember = "";
             this.dblkcbxDisease.SeparatorChar = "|";
-            this.dblkcbxDisease.Size = new System.Drawing.Size(257, 23);
+            this.dblkcbxDisease.Size = new System.Drawing.Size(257, 30);
             this.dblkcbxDisease.sKeyWords = "";
             this.dblkcbxDisease.sValueMember = "";
             this.dblkcbxDisease.TabIndex = 20;
@@ -368,7 +368,7 @@ namespace PTMedicalInsurance.Forms
             this.dblkcbxMedicalType.sDisplayField = "";
             this.dblkcbxMedicalType.sDisplayMember = "";
             this.dblkcbxMedicalType.SeparatorChar = "|";
-            this.dblkcbxMedicalType.Size = new System.Drawing.Size(257, 23);
+            this.dblkcbxMedicalType.Size = new System.Drawing.Size(257, 30);
             this.dblkcbxMedicalType.sKeyWords = "";
             this.dblkcbxMedicalType.sValueMember = "";
             this.dblkcbxMedicalType.TabIndex = 19;
@@ -387,7 +387,7 @@ namespace PTMedicalInsurance.Forms
             this.dblkcbxInsuranceType.sDisplayField = "";
             this.dblkcbxInsuranceType.sDisplayMember = "";
             this.dblkcbxInsuranceType.SeparatorChar = "|";
-            this.dblkcbxInsuranceType.Size = new System.Drawing.Size(257, 23);
+            this.dblkcbxInsuranceType.Size = new System.Drawing.Size(257, 30);
             this.dblkcbxInsuranceType.sKeyWords = "";
             this.dblkcbxInsuranceType.sValueMember = "";
             this.dblkcbxInsuranceType.TabIndex = 18;
@@ -401,7 +401,7 @@ namespace PTMedicalInsurance.Forms
             this.label6.Location = new System.Drawing.Point(506, 128);
             this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label6.Name = "label6";
-            this.label6.Size = new System.Drawing.Size(71, 15);
+            this.label6.Size = new System.Drawing.Size(98, 22);
             this.label6.TabIndex = 17;
             this.label6.Text = "病种类型";
             // 
@@ -412,7 +412,7 @@ namespace PTMedicalInsurance.Forms
             this.label5.Location = new System.Drawing.Point(506, 79);
             this.label5.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label5.Name = "label5";
-            this.label5.Size = new System.Drawing.Size(71, 15);
+            this.label5.Size = new System.Drawing.Size(98, 22);
             this.label5.TabIndex = 16;
             this.label5.Text = "手术操作";
             // 
@@ -423,7 +423,7 @@ namespace PTMedicalInsurance.Forms
             this.label4.Location = new System.Drawing.Point(506, 30);
             this.label4.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label4.Name = "label4";
-            this.label4.Size = new System.Drawing.Size(71, 15);
+            this.label4.Size = new System.Drawing.Size(98, 22);
             this.label4.TabIndex = 15;
             this.label4.Text = "医疗类别";
             // 
@@ -434,7 +434,7 @@ namespace PTMedicalInsurance.Forms
             this.label3.Location = new System.Drawing.Point(67, 128);
             this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(71, 15);
+            this.label3.Size = new System.Drawing.Size(98, 22);
             this.label3.TabIndex = 14;
             this.label3.Text = "结算方式";
             // 
@@ -445,7 +445,7 @@ namespace PTMedicalInsurance.Forms
             this.label2.Location = new System.Drawing.Point(67, 79);
             this.label2.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label2.Name = "label2";
-            this.label2.Size = new System.Drawing.Size(71, 15);
+            this.label2.Size = new System.Drawing.Size(98, 22);
             this.label2.TabIndex = 13;
             this.label2.Text = "病种名称\r\n";
             // 
@@ -456,7 +456,7 @@ namespace PTMedicalInsurance.Forms
             this.label1.Location = new System.Drawing.Point(67, 30);
             this.label1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
             this.label1.Name = "label1";
-            this.label1.Size = new System.Drawing.Size(71, 15);
+            this.label1.Size = new System.Drawing.Size(98, 22);
             this.label1.TabIndex = 12;
             this.label1.Text = "险种类型";
             // 
@@ -473,13 +473,13 @@ namespace PTMedicalInsurance.Forms
             // 
             this.dgvDiagnose.AllowUserToAddRows = false;
             this.dgvDiagnose.BorderStyle = System.Windows.Forms.BorderStyle.None;
-            dataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.ButtonShadow;
-            dataGridViewCellStyle1.Font = new System.Drawing.Font("新宋体", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvDiagnose.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle1;
+            dataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.ButtonShadow;
+            dataGridViewCellStyle2.Font = new System.Drawing.Font("新宋体", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            dataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight;
+            dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.WindowText;
+            dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
+            this.dgvDiagnose.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2;
             this.dgvDiagnose.ColumnHeadersHeight = 40;
             this.dgvDiagnose.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
             this.dgvDiagnose.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@@ -645,7 +645,7 @@ namespace PTMedicalInsurance.Forms
             // 
             // OutpatientRegistration
             // 
-            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F);
+            this.AutoScaleDimensions = new System.Drawing.SizeF(11F, 22F);
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
             this.ClientSize = new System.Drawing.Size(1197, 527);
             this.Controls.Add(this.panel3);