Jelajahi Sumber

pref: 挂号优化

zhengjie 1 tahun lalu
induk
melakukan
0f4999521f

+ 1 - 0
Business/Basic/OPSettlementService.cs

@@ -17,6 +17,7 @@ namespace PTMedicalInsurance.Business
         /// </summary>
         public string Charge(string operationType, JObject joInput)
         {
+            Global.operationType = operationType;
             //joInput 包括( data、mdtrtinfo、diseinfo、settlement)
             ProcessManager pManager = new ProcessManager()
             .Add(new ReadPatientProcess())

+ 9 - 0
Business/Basic/ReadPatientProcess.cs

@@ -1,5 +1,6 @@
 using Newtonsoft.Json.Linq;
 using PTMedicalInsurance.Helper;
+using PTMedicalInsurance.Variables;
 using System;
 using System.Collections.Generic;
 using System.Linq;
@@ -23,6 +24,14 @@ namespace PTMedicalInsurance.Business
                 return Error(errMsg);
             }
 
+
+            if ("RegisterOP".Equals(Global.operationType))
+            {
+                // 门诊挂号(医疗类别/统筹类别)
+                Global.pat.medType = "12";
+            }
+            Global.writeLog("医疗类别:" + Global.pat.medType);
+
             // 返回:data、mdtrtinfo、diseinfo、settlement
             if (hBus.showOutPatRegisterForm(patInfo, out outParam) != 0)
             {

+ 0 - 6
Business/Outpatient/OPPreSettlementProcess.cs

@@ -12,7 +12,6 @@ namespace PTMedicalInsurance.Business
 {
     class OPPreSettlementProcess : AbstractProcess
     {
-        public string OperationType { set; get; }
         /// <summary>
         /// 返回预结算结果
         /// </summary>
@@ -32,11 +31,6 @@ namespace PTMedicalInsurance.Business
             joSettlement["mdtrt_id"] = Global.pat.mdtrtID;
             joSettlement["mdtrt_cert_no"] = Global.pat.mdtrtcertNO;   //与计算不需要转换
             joSettlement["medfee_sumamt"] = JsonHelper.getDestValue(joSumFee, "data.Sumamt");
-            if ("RegisterOP".Equals(OperationType))
-            {
-                // 门诊挂号(医疗类别/统筹类别)
-                joSettlement["med_type"] = "12";
-            }
 
             // 个性化(济南),费用不单独上传
             //joSettlement["patient"] = joReg;

+ 35 - 1
Common/CardReader.cs

@@ -29,6 +29,7 @@ using System.Windows.Forms;
 using PTMedicalInsurance.Entity.Local;
 using PTMedicalInsurance.Helper;
 using PTMedicalInsurance.Entity;
+using Newtonsoft.Json.Linq;
 
 namespace PTMedicalInsurance.Common
 {
@@ -51,7 +52,7 @@ namespace PTMedicalInsurance.Common
 
         //电子凭证
         [DllImport(DllPath, EntryPoint = "EcQuery", CharSet = CharSet.Ansi, ExactSpelling = false, CallingConvention = CallingConvention.StdCall)]
-        public static extern int NationEcTrans(StringBuilder InData, StringBuilder OutData);
+        private static extern int NationEcTrans(StringBuilder InData, StringBuilder OutData);
 
         public CardReader()
         {
@@ -145,6 +146,39 @@ namespace PTMedicalInsurance.Common
             }
         }
 
+        public int ReadECToken(string inputParam,out string sOutPar)
+        {
+            sOutPar = "";
+            StringBuilder sbInput = new StringBuilder(inputParam);
+            Global.writeLog("开始调用ECToken:" + inputParam);
+            StringBuilder sbOut = new StringBuilder(40960);
+            int pInt = CardReader.NationEcTrans(sbInput, sbOut);
+            string outputData = sbOut.ToString();
+            Global.writeLog("EcToken返回:" + pInt, inputParam, outputData);
+
+            sOutPar = parseECTokenOutput(outputData);
+
+            if (JsonHelper.getDestValue(JObject.Parse(outputData), "code") != "0")
+            {
+                Global.writeLog("调用认证接口失败:" + outputData);
+                return -1;
+            }
+
+            return pInt;
+
+        }
+
+        private static string parseECTokenOutput(string data)
+        {
+            JObject joRtn = JObject.Parse(data);
+            Global.pat.ecToken = JsonHelper.getDestValue(joRtn, "data.ecToken");
+            Global.pat.certNO = JsonHelper.getDestValue(joRtn, "data.idNo"); //身份证
+            Global.pat.name = JsonHelper.getDestValue(joRtn, "data.userName");
+            Global.pat.certType = JsonHelper.getDestValue(joRtn, "data.idType");
+            Global.pat.insuplc_admdvs = JsonHelper.getDestValue(joRtn, "data.insuOrg");
+            return data;
+        }
+
         /// <summary>
         /// 解析读卡结果
         /// </summary>

+ 2 - 24
Common/ECTokenReader.cs

@@ -110,20 +110,8 @@ namespace PTMedicalInsurance.Common
             sOutPar = "";
             try
             {
-                string inputParam = JsonHelper.toJsonString(input);
-                StringBuilder sbInput = new StringBuilder(inputParam);
-                Global.writeLog("开始调用ECToken:"+ inputParam);
-                StringBuilder sbOut = new StringBuilder(40960);
-                //string strToken = NationEcTrans(Global.inf.ecURL, inputParam, sbOut);
-                int pInt = CardReader.NationEcTrans(sbInput, sbOut);
-                string outputData = sbOut.ToString();
-                sOutPar = parseECTokenOutput(outputData);
-
-                Global.writeLog("EcToken返回:"+pInt,inputParam, sOutPar);
-                if (JsonHelper.getDestValue(JObject.Parse(outputData), "code") != "0")
-                {
-                    Global.writeLog("调用认证接口" + transType + "失败:" + outputData);
-                }
+                CardReader cardReader = new CardReader();
+                cardReader.ReadECToken(JsonHelper.toJsonString(input), out sOutPar);
             }
             catch (Exception e)
             {
@@ -132,16 +120,6 @@ namespace PTMedicalInsurance.Common
             
         }
 
-        private static string parseECTokenOutput(string data)
-        {
-            JObject joRtn = JObject.Parse(data);
-            Global.pat.ecToken = JsonHelper.getDestValue(joRtn, "data.ecToken");
-            Global.pat.certNO = JsonHelper.getDestValue(joRtn, "data.idNo"); //身份证
-            Global.pat.name = JsonHelper.getDestValue(joRtn, "data.userName");
-            Global.pat.certType = JsonHelper.getDestValue(joRtn, "data.idType");
-            Global.pat.insuplc_admdvs = JsonHelper.getDestValue(joRtn, "data.insuOrg");
-            return data;
-        }
     }
 
     class ECTokenInput 

+ 23 - 22
Forms/InpatientRegistration.designer.cs

@@ -30,11 +30,12 @@ namespace PTMedicalInsurance.Forms
         /// </summary>
         private void InitializeComponent()
         {
-            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle();
+            System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle();
             this.panel1 = new System.Windows.Forms.Panel();
             this.chkEmergency = new Sunny.UI.UICheckBox();
             this.cbxAccountPay = new Sunny.UI.UICheckBox();
             this.Chk_RelTtpFlag = new Sunny.UI.UICheckBox();
+            this.chkDanger = new Sunny.UI.UICheckBox();
             this.Chk_TraumaFlag = new Sunny.UI.UICheckBox();
             this.dblkcbxExitway = new PTControl.DBLookupCombox();
             this.label8 = new System.Windows.Forms.Label();
@@ -62,7 +63,6 @@ namespace PTMedicalInsurance.Forms
             this.dise_dor_name = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.diag_time = new System.Windows.Forms.DataGridViewTextBoxColumn();
             this.panel2 = new System.Windows.Forms.Panel();
-            this.chkDanger = new Sunny.UI.UICheckBox();
             this.panel1.SuspendLayout();
             this.panel3.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dgvDiagnose)).BeginInit();
@@ -110,6 +110,7 @@ namespace PTMedicalInsurance.Forms
             // cbxAccountPay
             // 
             this.cbxAccountPay.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+            this.cbxAccountPay.Checked = true;
             this.cbxAccountPay.Cursor = System.Windows.Forms.Cursors.Hand;
             this.cbxAccountPay.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.cbxAccountPay.Location = new System.Drawing.Point(1100, 27);
@@ -134,6 +135,19 @@ namespace PTMedicalInsurance.Forms
             this.Chk_RelTtpFlag.Text = "涉及第三方";
             this.Chk_RelTtpFlag.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
+            // chkDanger
+            // 
+            this.chkDanger.Cursor = System.Windows.Forms.Cursors.Hand;
+            this.chkDanger.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
+            this.chkDanger.Location = new System.Drawing.Point(944, 125);
+            this.chkDanger.MinimumSize = new System.Drawing.Size(1, 1);
+            this.chkDanger.Name = "chkDanger";
+            this.chkDanger.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0);
+            this.chkDanger.Size = new System.Drawing.Size(139, 29);
+            this.chkDanger.TabIndex = 45;
+            this.chkDanger.Text = "危重患者";
+            this.chkDanger.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
+            // 
             // Chk_TraumaFlag
             // 
             this.Chk_TraumaFlag.Cursor = System.Windows.Forms.Cursors.Hand;
@@ -347,13 +361,13 @@ namespace PTMedicalInsurance.Forms
             // 
             this.dgvDiagnose.AllowUserToAddRows = false;
             this.dgvDiagnose.BorderStyle = System.Windows.Forms.BorderStyle.None;
-            dataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.ButtonShadow;
-            dataGridViewCellStyle4.Font = new System.Drawing.Font("新宋体", 11F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            dataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight;
-            dataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.WindowText;
-            dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True;
-            this.dgvDiagnose.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle4;
+            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;
             this.dgvDiagnose.ColumnHeadersHeight = 40;
             this.dgvDiagnose.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;
             this.dgvDiagnose.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] {
@@ -475,19 +489,6 @@ namespace PTMedicalInsurance.Forms
             this.panel2.Size = new System.Drawing.Size(1267, 465);
             this.panel2.TabIndex = 13;
             // 
-            // chkDanger
-            // 
-            this.chkDanger.Cursor = System.Windows.Forms.Cursors.Hand;
-            this.chkDanger.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.chkDanger.Location = new System.Drawing.Point(944, 125);
-            this.chkDanger.MinimumSize = new System.Drawing.Size(1, 1);
-            this.chkDanger.Name = "chkDanger";
-            this.chkDanger.Padding = new System.Windows.Forms.Padding(22, 0, 0, 0);
-            this.chkDanger.Size = new System.Drawing.Size(139, 29);
-            this.chkDanger.TabIndex = 45;
-            this.chkDanger.Text = "危重患者";
-            this.chkDanger.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
-            // 
             // InpatientRegistration
             // 
             this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;

+ 0 - 2
Forms/OutpatientRegistration.cs

@@ -91,8 +91,6 @@ namespace PTMedicalInsurance.Forms
             this.StartPosition = FormStartPosition.CenterParent;
 
             initCombox();
-
-            cbxAccountPay.Checked = false;
         }
 
         public Boolean b2001 = false;

+ 32 - 31
Forms/OutpatientRegistration.designer.cs

@@ -36,10 +36,12 @@ namespace PTMedicalInsurance.Forms
             this.Chk_RelTtpFlag = new Sunny.UI.UICheckBox();
             this.chkEmergency = new Sunny.UI.UICheckBox();
             this.Chk_TraumaFlag = new Sunny.UI.UICheckBox();
+            this.dblkcbxSettelmentWay = new PTControl.DBLookupCombox();
             this.dblkcbxDisease = new PTControl.DBLookupCombox();
             this.dblkcbxMedicalType = new PTControl.DBLookupCombox();
             this.dblkcbxInsuranceType = new PTControl.DBLookupCombox();
             this.label4 = new System.Windows.Forms.Label();
+            this.label3 = new System.Windows.Forms.Label();
             this.label2 = new System.Windows.Forms.Label();
             this.label1 = new System.Windows.Forms.Label();
             this.panel3 = new System.Windows.Forms.Panel();
@@ -85,8 +87,6 @@ namespace PTMedicalInsurance.Forms
             this.uiLabel21 = new Sunny.UI.UILabel();
             this.uiGroupBox2 = new Sunny.UI.UIGroupBox();
             this.uiGroupBox3 = new Sunny.UI.UIGroupBox();
-            this.label3 = new System.Windows.Forms.Label();
-            this.dblkcbxSettelmentWay = new PTControl.DBLookupCombox();
             this.panel1.SuspendLayout();
             this.panel3.SuspendLayout();
             ((System.ComponentModel.ISupportInitialize)(this.dgvDiagnose)).BeginInit();
@@ -118,6 +118,7 @@ namespace PTMedicalInsurance.Forms
             // 
             // cbxAccountPay
             // 
+            this.cbxAccountPay.Checked = true;
             this.cbxAccountPay.Cursor = System.Windows.Forms.Cursors.Hand;
             this.cbxAccountPay.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
             this.cbxAccountPay.Location = new System.Drawing.Point(1044, 26);
@@ -168,6 +169,24 @@ namespace PTMedicalInsurance.Forms
             this.Chk_TraumaFlag.Text = "外伤";
             this.Chk_TraumaFlag.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
+            // dblkcbxSettelmentWay
+            // 
+            this.dblkcbxSettelmentWay.FormattingEnabled = true;
+            this.dblkcbxSettelmentWay.Location = new System.Drawing.Point(575, 75);
+            this.dblkcbxSettelmentWay.Name = "dblkcbxSettelmentWay";
+            this.dblkcbxSettelmentWay.NullValue = "";
+            this.dblkcbxSettelmentWay.PopupGridAutoSize = false;
+            this.dblkcbxSettelmentWay.RowFilterVisible = false;
+            this.dblkcbxSettelmentWay.sDisplayField = "";
+            this.dblkcbxSettelmentWay.sDisplayMember = "";
+            this.dblkcbxSettelmentWay.SeparatorChar = "|";
+            this.dblkcbxSettelmentWay.Size = new System.Drawing.Size(257, 25);
+            this.dblkcbxSettelmentWay.sKeyWords = "";
+            this.dblkcbxSettelmentWay.sValueMember = "";
+            this.dblkcbxSettelmentWay.TabIndex = 22;
+            this.dblkcbxSettelmentWay.Value = "";
+            this.dblkcbxSettelmentWay.AfterSelector += new PTControl.AfterSelectorEventHandler(this.dblkcbxSettelmentWay_AfterSelector);
+            // 
             // dblkcbxDisease
             // 
             this.dblkcbxDisease.FormattingEnabled = true;
@@ -233,6 +252,17 @@ namespace PTMedicalInsurance.Forms
             this.label4.TabIndex = 15;
             this.label4.Text = "医疗类别";
             // 
+            // label3
+            // 
+            this.label3.AutoSize = true;
+            this.label3.ForeColor = System.Drawing.SystemColors.InfoText;
+            this.label3.Location = new System.Drawing.Point(479, 78);
+            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
+            this.label3.Name = "label3";
+            this.label3.Size = new System.Drawing.Size(80, 18);
+            this.label3.TabIndex = 14;
+            this.label3.Text = "结算方式";
+            // 
             // label2
             // 
             this.label2.AutoSize = true;
@@ -815,35 +845,6 @@ namespace PTMedicalInsurance.Forms
             this.uiGroupBox3.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter;
             this.uiGroupBox3.ZoomScaleRect = new System.Drawing.Rectangle(0, 0, 0, 0);
             // 
-            // label3
-            // 
-            this.label3.AutoSize = true;
-            this.label3.ForeColor = System.Drawing.SystemColors.InfoText;
-            this.label3.Location = new System.Drawing.Point(479, 78);
-            this.label3.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
-            this.label3.Name = "label3";
-            this.label3.Size = new System.Drawing.Size(80, 18);
-            this.label3.TabIndex = 14;
-            this.label3.Text = "结算方式";
-            // 
-            // dblkcbxSettelmentWay
-            // 
-            this.dblkcbxSettelmentWay.FormattingEnabled = true;
-            this.dblkcbxSettelmentWay.Location = new System.Drawing.Point(575, 75);
-            this.dblkcbxSettelmentWay.Name = "dblkcbxSettelmentWay";
-            this.dblkcbxSettelmentWay.NullValue = "";
-            this.dblkcbxSettelmentWay.PopupGridAutoSize = false;
-            this.dblkcbxSettelmentWay.RowFilterVisible = false;
-            this.dblkcbxSettelmentWay.sDisplayField = "";
-            this.dblkcbxSettelmentWay.sDisplayMember = "";
-            this.dblkcbxSettelmentWay.SeparatorChar = "|";
-            this.dblkcbxSettelmentWay.Size = new System.Drawing.Size(257, 25);
-            this.dblkcbxSettelmentWay.sKeyWords = "";
-            this.dblkcbxSettelmentWay.sValueMember = "";
-            this.dblkcbxSettelmentWay.TabIndex = 22;
-            this.dblkcbxSettelmentWay.Value = "";
-            this.dblkcbxSettelmentWay.AfterSelector += new PTControl.AfterSelectorEventHandler(this.dblkcbxSettelmentWay_AfterSelector);
-            // 
             // OutpatientRegistration
             // 
             this.AutoScaleDimensions = new System.Drawing.SizeF(9F, 18F);

+ 1 - 0
Variables/Global.cs

@@ -34,6 +34,7 @@ namespace PTMedicalInsurance.Variables
         public static currentEnvironment curEvt;
         public static User user;
         public static string businessType;
+        public static string operationType;
         //写日志 二次封装
         public static void writeLog(string content)
         {