Selaa lähdekoodia

perf: 住院优化

zhengjie 1 vuosi sitten
vanhempi
commit
9171c97f85

+ 7 - 5
Business/Basic/PatientService.cs

@@ -38,14 +38,14 @@ namespace PTMedicalInsurance.Business
         /// </summary>
         /// <param name="outParam"></param>
         /// <returns></returns>
-        public string readPatientInfo(out string outParam)
+        public int readPatientInfo(out string outParam)
         {
             string patInfo = "";
             //打开读卡窗口,操作员选择读卡类型后进行读卡器读卡,再进行1101获取参保信息
             if (readCard(out outParam) != 0)
             {
                 outParam = JsonHelper.setExceptionJson(-100, "读卡失败!", outParam).ToString();
-                return outParam;
+                return -1;
             }
             else
             {
@@ -59,19 +59,21 @@ namespace PTMedicalInsurance.Business
             string errMsg = "";
             if (hBus.setGlobalPatAfaterShowPatInfo(outParam, out errMsg) != 0)
             {
-                return JsonHelper.setExceptionJson(-1, "setGlobalPatAfaterShowPatInfo", errMsg).ToString();
+                outParam = JsonHelper.setExceptionJson(-1, "setGlobalPatAfaterShowPatInfo", errMsg).ToString();
+                return -1;
             }
 
 
             //校验HIS姓名与医保姓名是否一致
             if (hBus.checkName(Global.pat.name, out errMsg) != 0)
             {
-                return JsonHelper.setExceptionJson(-1, "校验HIS与医保姓名是否一致", errMsg).ToString();
+                outParam = JsonHelper.setExceptionJson(-1, "校验HIS与医保姓名是否一致", errMsg).ToString();
+                return -1;
             }
 
             #endregion
 
-            return "0";
+            return 0;
         }
 
 

+ 3 - 5
Business/Basic/ReadPatientProcess.cs

@@ -14,17 +14,15 @@ namespace PTMedicalInsurance.Business
         public override CallResult Process(JObject input)
         {
             string patInfo = "";
-            string errMsg = "";
             PatientService patientService = new PatientService();
             // 显示病人基本信息
             // 返回 baseinfo、insuinfo、selectedIdInfo、selectedInsuInfo
-            errMsg = patientService.readPatientInfo(out patInfo);
-            if (!errMsg.Equals("0"))
+            int ret = patientService.readPatientInfo(out patInfo);
+            if (ret != 0)
             {
-                return Error(errMsg);
+                return Error(patInfo);
             }
 
-
             if ("RegisterOP".Equals(Global.operationType))
             {
                 // 门诊挂号(医疗类别/统筹类别)

+ 1 - 1
Business/HisMainBusiness.cs

@@ -971,7 +971,7 @@ namespace PTMedicalInsurance.Business
                             }
                     }
 
-                    if (jaDiagnoses[i]["diaTypeCode"].ToString() == "DIS" || jaDiagnoses[i]["diaTypeCode"].ToString() == "ADD") //入院、出院
+                    if (jaDiagnoses[i]["diaTypeCode"].ToString() == "DIS") //入院、出院
                     {
                         jaConvertedDiagnoses.Add(jaDiagnoses[i]);
                     }

+ 8 - 5
Business/Local/ReadCardProcess.cs

@@ -33,10 +33,13 @@ namespace PTMedicalInsurance.Business
                     //电子凭证
                     if (cc.cardType == "01")
                     {
-
                         Global.pat.mdtrtcertType = "01";
                         Global.businessType = cc.businessType;
-                        tradeEcToken(out outParam);
+                        if (tradeEcToken(out outParam) != 0)
+                        {
+                            return Error(outParam);
+                        }
+
                         trade1101(out outParam);
                         return Success();
 
@@ -230,9 +233,9 @@ namespace PTMedicalInsurance.Business
         public int tradeEcToken(out string outParam)
         {
             //cardInfo
-            outParam = ECTokenReader.ECQuery("1");
-
-            return 0;
+            outParam = "";
+            int ret = ECTokenReader.ECQuery("1",out outParam);
+            return ret;
         }
 
 

+ 1 - 1
Business/Local/TestProcess.cs

@@ -17,7 +17,7 @@ namespace PTMedicalInsurance.Business
             //OPSettlementProcess process = new OPSettlementProcess();
             //process.Process(joInput);
 
-            IPSettlementProcess process = new IPSettlementProcess();
+            OPSettlementProcess process = new OPSettlementProcess();
             process.Process(joInput);
 
             //JObject joSetlinfo = JObject.Parse(JsonHelper.getDestValue(joInput, "output.setlinfo"));

+ 1 - 1
Common/CardReader.cs

@@ -182,7 +182,7 @@ namespace PTMedicalInsurance.Common
                 return -1;
             }
 
-            return pInt.ToInt32();
+            return 0;
 
         }
 

+ 8 - 6
Common/ECTokenReader.cs

@@ -19,7 +19,7 @@ namespace PTMedicalInsurance.Common
         //[DllImport("NationECCode.dll", EntryPoint = "NationEcTrans", CharSet = CharSet.Ansi, ExactSpelling = false, CallingConvention = CallingConvention.StdCall)]
         //static extern string NationEcTrans(string strUrl,string InData,StringBuilder OutData);
 
-        public static string ECQuery(string EcCertDecodeType) {
+        public static int ECQuery(string EcCertDecodeType,out string sOutPar) {
             Random rd = new Random();
             int iNum = rd.Next();
             string bizNo = DateTime.Now.ToString("yyyyMMddHHmmsss") + Global.inf.hospitalNO + iNum.ToString().Substring(0, 5);
@@ -60,13 +60,13 @@ namespace PTMedicalInsurance.Common
             //    }
             //}
             
-            string sOutPar = "";
+            sOutPar = "";
             //调用电子凭证动态库NationECCode.dll获取身份信息
-            callECQuery(eCToken,"ec.query",out sOutPar);
+            int pRet = callECQuery(eCToken,"ec.query",out sOutPar);
 
             //int ret = call1162(eCToken, out sOutPar);
            
-            return sOutPar;
+            return pRet;
         }
 
         public static void faceAuth(out string outParam,string bizNo)
@@ -100,7 +100,7 @@ namespace PTMedicalInsurance.Common
             return 0;
         }
 
-        private static void callECQuery(ECTokenData eCToken,string transType,out string sOutPar)
+        private static int callECQuery(ECTokenData eCToken,string transType,out string sOutPar)
         {
             var input = new ECTokenInput();
             input.data = eCToken;
@@ -111,12 +111,14 @@ namespace PTMedicalInsurance.Common
             try
             {
                 CardReader cardReader = new CardReader();
-                cardReader.ReadECToken(Global.inf.ecURL, JsonHelper.toJsonString(input), out sOutPar);
+                return cardReader.ReadECToken(Global.inf.ecURL, JsonHelper.toJsonString(input), out sOutPar);
             }
             catch (Exception e)
             {
+                sOutPar = e.Message;
                 Global.writeLog("调用电子凭证【"+ Global.inf.ecURL + "】异常:"+e.Message);
             }
+            return -1;
             
         }
 

+ 1 - 1
Forms/HandleException.cs

@@ -153,7 +153,7 @@ namespace PTMedicalInsurance.Forms
             MessageBox.Show(joInparam.ToString());
             JObject joRtn = invoker.invokeCenterService(TradeEnum.ReverseTransaction,joInparam);
             //将中心返回的结果返回HIS 调用HIS服务进行保存
-            if (JsonHelper.parseIrisRtnValue(joRtn, out errorMessage) != 0)
+            if (JsonHelper.parseCenterRtnValue(joRtn, out errorMessage) != 0)
             {
                 MessageBox.Show("冲正失败:" + errorMessage);
             }

+ 4 - 2
Forms/SettlementForm.designer.cs

@@ -146,10 +146,12 @@ namespace PTMedicalInsurance.Forms
             this.uiButton2.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
             this.uiButton2.Cursor = System.Windows.Forms.Cursors.Hand;
             this.uiButton2.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiButton2.Location = new System.Drawing.Point(473, 16);
+            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)));
@@ -161,7 +163,7 @@ namespace PTMedicalInsurance.Forms
             this.uiButton1.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
             this.uiButton1.Cursor = System.Windows.Forms.Cursors.Hand;
             this.uiButton1.Font = new System.Drawing.Font("微软雅黑", 12F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134)));
-            this.uiButton1.Location = new System.Drawing.Point(348, 16);
+            this.uiButton1.Location = new System.Drawing.Point(566, 16);
             this.uiButton1.MinimumSize = new System.Drawing.Size(1, 1);
             this.uiButton1.Name = "uiButton1";
             this.uiButton1.Size = new System.Drawing.Size(100, 38);

+ 2 - 0
InsuBusiness.cs

@@ -180,11 +180,13 @@ namespace PTMedicalInsurance
             string businessType = JsonHelper.getDestValue(joInParam,"businessType");
             try
             {
+               
                 switch (businessType)
                 {
                     case "M1"://门诊读卡
                     case "Z1"://住院读卡
                         {
+                            Global.pat.adm_Dr = int.Parse(JsonHelper.getDestValue(joInParam, "params[0].admID"));
                             //打开读卡窗口,操作员选择读卡类型后进行读卡器读卡,再进行1101获取参保信息
                             PatientService patientService = new PatientService();
                             patientService.readPatientInfo(out outParam);