Forráskód Böngészése

feat: 接口调整

zhengjie 1 éve
szülő
commit
ed2b4a7134

+ 22 - 31
Business/HisMainBusiness.cs

@@ -1223,12 +1223,25 @@ namespace PTMedicalInsurance.Business
                     }
 
                     #region 组织挂号入参
+
+                    dynamic joExpContent = new JObject();
+                    joExpContent.card_token = Global.pat.card.Cardtoken;
+                    joExpContent.enddate = "";
+                    joExpContent.adsetl_codg = "0";
+                    joExpContent.mdtrt_grp_type = frmReg.mdtrtGrpType;
+                    joExpContent.opt_er_refl_flag = frmReg.relTtpFlag; ;
+
                     JObject joRegInpar = new JObject();
                     string occurTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss");
                     joRegInpar.Add("psn_no", Global.pat.psn_no);
                     joRegInpar.Add("insutype", frmReg.insuType);
                     Global.pat.insuType = frmReg.insuType;
-                    joRegInpar.Add("begntime", JsonHelper.getDestValue(joHisRtnInfo, "mdtrtinfo.begntime"));//挂号时间 occurTime
+                    string beginTime = JsonHelper.getDestValue(joHisRtnInfo, "mdtrtinfo.begntime");
+                    if (string.IsNullOrEmpty(beginTime))
+                    {
+                        beginTime = occurTime;
+                    }
+                    joRegInpar.Add("begntime", beginTime);//挂号时间 occurTime
                     joRegInpar.Add("mdtrt_cert_type", Global.pat.mdtrtcertType);
                     joRegInpar.Add("mdtrt_cert_no", Utils.ConvertMdtrtcertNo());
                     
@@ -1239,7 +1252,7 @@ namespace PTMedicalInsurance.Business
                     joRegInpar.Add("dr_name", JsonHelper.getDestValue(joHisRtnInfo, "mdtrtinfo.chfpdr_name"));
                     joRegInpar.Add("dept_code", JsonHelper.getDestValue(joHisRtnInfo, "mdtrtinfo.adm_dept_codg"));
                     joRegInpar.Add("dept_name", JsonHelper.getDestValue(joHisRtnInfo, "mdtrtinfo.adm_dept_name"));
-                    joRegInpar.Add("exp_content", "");
+                    joRegInpar.Add("exp_content", joExpContent);
                     joRegInpar.Add("caty", "A10");
 
                     //南昌新增
@@ -1264,33 +1277,13 @@ namespace PTMedicalInsurance.Business
                     joMdtrtinfo.Add("psn_no", Global.pat.psn_no);          //人员编号
                     Global.pat.medType = frmReg.med_type;
                     joMdtrtinfo.Add("med_type", frmReg.med_type);          //医疗类别
-                    joMdtrtinfo.Add("begntime", JsonHelper.getDestValue(joHisRtnInfo, "mdtrtinfo.begntime"));          //开始时间
+                    joMdtrtinfo.Add("begntime", beginTime);          //开始时间
                     joMdtrtinfo.Add("main_cond_dscr", JsonHelper.getDestValue(joHisRtnInfo, "mdtrtinfo.main_cond_dscr"));          //主要病情描述
                     joMdtrtinfo.Add("dise_codg", diseCodg);          //病种编码
                     joMdtrtinfo.Add("dise_name", diseName);          //病种名称
                     joMdtrtinfo.Add("birctrl_type", JsonHelper.getDestValue(joHisRtnInfo, "mdtrtinfo.birctrl_type"));          //计划生育手术类别
-                    //joMdtrtinfo.Add("birctrl_matn_date", "");          //计划生育手术或生育日期 JsonHelper.getDestValue(joHisRtnInfo, "mdtrtinfo.birctrl_matn_date") 20230228医保中心校验传正确时间或空
                     joMdtrtinfo.Add("matn_type", JsonHelper.getDestValue(joHisRtnInfo, "mdtrtinfo.matn_type"));          //生育类别
-                    //joMdtrtinfo.Add("geso_val", JsonHelper.getDestValue(joHisRtnInfo, "mdtrtinfo.geso_val"));          //孕周数
-                    
-
-                    // 特殊2203A需要exp_content字段
-                    JObject ExportObj = new JObject();
-                    ExportObj.Add("dise_reim_mon", "");
-                    ExportObj.Add("deve_flag", "");
-                    ExportObj.Add("otp_reim_flag", "");
-                    ExportObj.Add("local_dise", "");              //单病种编码
-                    ExportObj.Add("ifen_flag", "");                 //传染性标志 
-                    //ExportObj.Add("cla_trt_flag", frmReg.claTrtFlag);       //分级诊疗标志
-                    ExportObj.Add("trum_flag", frmReg.traumaFlag);          //外伤标志
-                    //ExportObj.Add("ipt_type", frmReg.iptTypeCode);          //住院类型(离院)
-                    ExportObj.Add("rel_ttp_flag", frmReg.relTtpFlag);       //涉及第三方标志
-                    ExportObj.Add("mdtrt_grp_type", "");   //就诊人群类型
-                    ExportObj.Add("elec_bill_code", "");   //电子票据代码
-                    ExportObj.Add("elec billno_code", ""); //电子票据号码
-                    ExportObj.Add("otp_er_refl_flag", ""); //门诊转急诊
-
-                    joMdtrtinfo.Add("exp_content", ExportObj);          //字段扩展
+                    joMdtrtinfo.Add("expContent", "");          //字段扩展
 
                     #endregion
 
@@ -1307,14 +1300,11 @@ namespace PTMedicalInsurance.Business
                     joSetlInpar.Add("acct_used_flag", frmReg.personAccountUsedFlag);//个人账户使用标志
                     joSetlInpar.Add("insutype", frmReg.insuType);//险种类型
                     joSetlInpar.Add("pub_hosp_rfom_flag", "");
-                    joSetlInpar.Add("exp_content", "");
 
-                    //南昌新增
-                    joSetlInpar.Add("card_sn", Global.pat.card.SN);
-                    joSetlInpar.Add("psn_cert_type", Global.pat.certType);
-                    joSetlInpar.Add("certno", Global.pat.certNO);
-                    joSetlInpar.Add("psn_type", Global.pat.psn_type);
-                    joSetlInpar.Add("psn_name", Global.pat.name);
+                    //成都新增
+                    joSetlInpar.Add("insuplc_admdvs", Global.pat.insuplc_admdvs);
+                    joSetlInpar.Add("exp_content", joExpContent);
+
 
                     #endregion
 
@@ -1324,6 +1314,7 @@ namespace PTMedicalInsurance.Business
                     joReg.Add("settlement", joSetlInpar);
 
                     regInfo = joReg.ToString();
+
                     return 0;
                 }
                 else

+ 3 - 3
Business/IrisServices.cs

@@ -528,15 +528,15 @@ namespace PTMedicalInsurance.Business
                 hospAmt = getFee(jo, "hosp_part_amt");   //医院承担金额
 
                 medFee = getFee(jo, "medfee_sumamt");    //总费用
-                //ybAmt = medFee - psnAcctAmt - psnCashAmt - hospAmt;  //(医保支付金额)
-                ybAmt = fundAmt + psnAcctAmt + psnCashAmt + hospAmt;
+                ybAmt = medFee - psnAcctAmt - psnCashAmt - hospAmt;  //(医保支付金额)
+                //ybAmt = fundAmt + psnAcctAmt + psnCashAmt + hospAmt;
 
                 joSumFee.Add("ybAmt", ybAmt);
                 joSumFee.Add("psnAcctAmt", psnAcctAmt);
                 joSumFee.Add("hospAmt", hospAmt);
                 joSumFee.Add("psnCashAmt", psnCashAmt);
 
-                decimal total = (ybAmt);
+                decimal total = (ybAmt + psnAcctAmt + psnCashAmt + hospAmt);
                 if (medFee != total)
                 {
                     Global.writeLog("ybAmt:"+ybAmt+ ",psnAcctAmt:" + psnAcctAmt + "psnCashAmt:"+ psnCashAmt + ",hospAmt:" + hospAmt);

+ 1 - 1
Business/Other/MedDirDownloadProcess.cs

@@ -139,7 +139,7 @@ namespace PTMedicalInsurance.Business
                     //MessageBox.Show("获取txt数据往IRIS插入文件路径:"+ txtPath);
 
                     DataImoport bus = new DataImoport();
-                    JObject joImportRtn = bus.importDataToIrisByTxt(txtPath, 30, directoryType + 1, uiProcessBar);
+                    JObject joImportRtn = bus.importDataToIrisByTxt(txtPath, 50, directoryType + 1, uiProcessBar);
 
                     //MessageBox.Show("往IRIS插入数据:" + joImportRtn.ToString());
 

+ 1 - 3
Business/Outpatient/OPPreSettlementProcess.cs

@@ -106,9 +106,7 @@ namespace PTMedicalInsurance.Business
             //joDataExp.Add("acct_payamt", acctPay);
             //joRtnSettle["exp_content"] = joDataExp;
 
-            joRtn.Add("setlinfo", joRtnSettle);
-            //结算需要转换
-            joRtn["mdtrt_cert_no"] = Utils.ConvertMdtrtcertNo();
+            //joRtn.Add("setlinfo", joRtnSettle);
             outParam = joRtn.ToString();
 
             return Success();

+ 4 - 2
Business/Outpatient/OPRegProcess.cs

@@ -59,7 +59,9 @@ namespace PTMedicalInsurance.Business
         public override CallResult Process(JObject joPatient)
         {
             JObject jo2201Inpar_plain = JObject.Parse(JsonHelper.getDestProperty(joPatient, "data"));
-            jo2201Inpar_plain = JObject.Parse(JsonHelper.setCenterInpar("2201", jo2201Inpar_plain));
+            JObject jo2201Inpar = new JObject();
+            jo2201Inpar["input"] = joPatient;
+
             JObject jo2201Rtn = OutpatientReg(joPatient);
 
             if (jo2201Rtn.ContainsKey("errorCode"))
@@ -84,7 +86,7 @@ namespace PTMedicalInsurance.Business
             jo2201Rtn.Add("regstate", 1);
             jo2201Rtn.Add("type", 3);
 
-            if (mIS.saveOutpatRegisterInfo(jo2201Inpar_plain, jo2201Rtn, jo2203Inpar_plain, out outParam) != 0)
+            if (mIS.saveOutpatRegisterInfo(jo2201Inpar, jo2201Rtn, jo2203Inpar_plain, out outParam) != 0)
             {
                 return Error(-1, "中心登记成功但医保平台保存失败,请联系管理员!");
             }

+ 1 - 0
Business/Outpatient/OPSettlementProcess.cs

@@ -1,5 +1,6 @@
 using MedicalInsurance.Forms;
 using Newtonsoft.Json.Linq;
+using PTMedicalInsurance.Common;
 using PTMedicalInsurance.Helper;
 using PTMedicalInsurance.Variables;
 using System;