|
|
@@ -35,6 +35,7 @@ using System.Text;
|
|
|
using System.Threading.Tasks;
|
|
|
using System.Windows.Forms;
|
|
|
using SettlementInfo = PTMedicalInsurance.Forms.SettlementInfo;
|
|
|
+using Org.BouncyCastle.Utilities.Encoders;
|
|
|
|
|
|
namespace PTMedicalInsurance.Business
|
|
|
{
|
|
|
@@ -112,6 +113,7 @@ namespace PTMedicalInsurance.Business
|
|
|
inf.areaCode = JsonHelper.getDestValue(joInpar, "AreaCode");
|
|
|
inf.dllName = JsonHelper.getDestValue(joInpar, "DLLName");
|
|
|
inf.hospitalNO = JsonHelper.getDestValue(joInpar, "HospitalNO");
|
|
|
+ inf.HospitalLevel = JsonHelper.getDestValue(joInpar, "HospitalLevel");
|
|
|
inf.version = "v1.0";
|
|
|
inf.signatureType = "SM3";
|
|
|
inf.recivedSystem = "YBXT";
|
|
|
@@ -152,6 +154,43 @@ namespace PTMedicalInsurance.Business
|
|
|
}
|
|
|
|
|
|
inf.cainfo = "";
|
|
|
+
|
|
|
+ #region【取医保平台接口信息】
|
|
|
+ inf.centerURL2 = JsonHelper.getDestValue(joInpar, "CenterURL2");
|
|
|
+
|
|
|
+ byte[] b = Base64.Decode(inf.centerURL2);
|
|
|
+ string centerURL2 = System.Text.Encoding.UTF8.GetString(b);
|
|
|
+
|
|
|
+ JObject joCenterURL2 = JObject.Parse(centerURL2);
|
|
|
+
|
|
|
+ inf.AK = JsonHelper.getDestValue(joCenterURL2, "core.ak");
|
|
|
+ inf.SK = JsonHelper.getDestValue(joCenterURL2, "core.sk");
|
|
|
+ inf.ecURL = JsonHelper.getDestValue(joCenterURL2, "core.ecURL");
|
|
|
+ inf.cardURL = JsonHelper.getDestValue(joCenterURL2, "core.cardURL");
|
|
|
+
|
|
|
+ inf.CreditID = JsonHelper.getDestValue(joCenterURL2, "core.CreditID");
|
|
|
+ inf.BusinessID = JsonHelper.getDestValue(joCenterURL2, "core.BusinessID");
|
|
|
+
|
|
|
+ //西安医保移动支付测试环境
|
|
|
+ //Global.inf.mobilePayURL = @"http://10.37.128.40:8086";
|
|
|
+ //西安医保移动支付正式环境
|
|
|
+ //Global.inf.mobilePayURL = @"http://10.37.128.41:8086";
|
|
|
+ inf.MobilePay.url = JsonHelper.getDestValue(joCenterURL2, "mobilePay.url");
|
|
|
+ inf.MobilePay.appid = JsonHelper.getDestValue(joCenterURL2, "mobilePay.appid");
|
|
|
+ inf.MobilePay.secretKey = JsonHelper.getDestValue(joCenterURL2, "mobilePay.secretKey");
|
|
|
+ inf.MobilePay.privateKey = JsonHelper.getDestValue(joCenterURL2, "mobilePay.privateKey");
|
|
|
+ inf.MobilePay.publicKey = JsonHelper.getDestValue(joCenterURL2, "mobilePay.publicKey");
|
|
|
+ inf.MobilePay.devSafeInfo = JsonHelper.getDestValue(joCenterURL2, "mobilePay.devSafeInfo");
|
|
|
+
|
|
|
+ inf.PresCir.ak = JsonHelper.getDestValue(joCenterURL2, "presCir.ak");
|
|
|
+ inf.PresCir.sk = JsonHelper.getDestValue(joCenterURL2, "presCir.sk");
|
|
|
+
|
|
|
+ inf.PresCir.url = JsonHelper.getDestValue(joCenterURL2, "presCir.url");
|
|
|
+ inf.PresCir.appid = JsonHelper.getDestValue(joCenterURL2, "presCir.appId");
|
|
|
+ inf.PresCir.secretKey = JsonHelper.getDestValue(joCenterURL2, "presCir.secretKey");
|
|
|
+ inf.PresCir.privateKey = JsonHelper.getDestValue(joCenterURL2, "presCir.privateKey");
|
|
|
+ inf.PresCir.publicKey = JsonHelper.getDestValue(joCenterURL2, "presCir.publicKey");
|
|
|
+ #endregion
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -173,6 +212,7 @@ namespace PTMedicalInsurance.Business
|
|
|
inf.areaCode = JsonHelper.getDestValue(joInpar, "areaCode");
|
|
|
inf.dllName = JsonHelper.getDestValue(joInpar, "dLLName");
|
|
|
inf.hospitalNO = JsonHelper.getDestValue(joInpar, "hospitalNO");
|
|
|
+ inf.HospitalLevel = JsonHelper.getDestValue(joInpar, "HospitalLevel");
|
|
|
inf.version = "v1.0";
|
|
|
inf.signatureType = "SM3";
|
|
|
inf.recivedSystem = "YBXT";
|
|
|
@@ -215,6 +255,43 @@ namespace PTMedicalInsurance.Business
|
|
|
|
|
|
inf.cainfo = "";
|
|
|
|
|
|
+ #region【取医保平台接口信息】
|
|
|
+ inf.centerURL2 = JsonHelper.getDestValue(joInpar, "CenterURL2");
|
|
|
+
|
|
|
+ byte[] b = Base64.Decode(inf.centerURL2);
|
|
|
+ string centerURL2 = System.Text.Encoding.UTF8.GetString(b);
|
|
|
+
|
|
|
+ JObject joCenterURL2 = JObject.Parse(centerURL2);
|
|
|
+
|
|
|
+ inf.AK = JsonHelper.getDestValue(joCenterURL2, "core.ak");
|
|
|
+ inf.SK = JsonHelper.getDestValue(joCenterURL2, "core.sk");
|
|
|
+ inf.ecURL = JsonHelper.getDestValue(joCenterURL2, "core.ecURL");
|
|
|
+ inf.cardURL = JsonHelper.getDestValue(joCenterURL2, "core.cardURL");
|
|
|
+
|
|
|
+ inf.CreditID = JsonHelper.getDestValue(joCenterURL2, "core.CreditID");
|
|
|
+ inf.BusinessID = JsonHelper.getDestValue(joCenterURL2, "core.BusinessID");
|
|
|
+
|
|
|
+ //西安医保移动支付测试环境
|
|
|
+ //Global.inf.mobilePayURL = @"http://10.37.128.40:8086";
|
|
|
+ //西安医保移动支付正式环境
|
|
|
+ //Global.inf.mobilePayURL = @"http://10.37.128.41:8086";
|
|
|
+ inf.MobilePay.url = JsonHelper.getDestValue(joCenterURL2, "mobilePay.url");
|
|
|
+ inf.MobilePay.appid = JsonHelper.getDestValue(joCenterURL2, "mobilePay.appid");
|
|
|
+ inf.MobilePay.secretKey = JsonHelper.getDestValue(joCenterURL2, "mobilePay.secretKey");
|
|
|
+ inf.MobilePay.privateKey = JsonHelper.getDestValue(joCenterURL2, "mobilePay.privateKey");
|
|
|
+ inf.MobilePay.publicKey = JsonHelper.getDestValue(joCenterURL2, "mobilePay.publicKey");
|
|
|
+ inf.MobilePay.devSafeInfo = JsonHelper.getDestValue(joCenterURL2, "mobilePay.devSafeInfo");
|
|
|
+
|
|
|
+ inf.PresCir.ak = JsonHelper.getDestValue(joCenterURL2, "presCir.ak");
|
|
|
+ inf.PresCir.sk = JsonHelper.getDestValue(joCenterURL2, "presCir.sk");
|
|
|
+
|
|
|
+ inf.PresCir.url = JsonHelper.getDestValue(joCenterURL2, "presCir.url");
|
|
|
+ inf.PresCir.appid = JsonHelper.getDestValue(joCenterURL2, "presCir.appId");
|
|
|
+ inf.PresCir.secretKey = JsonHelper.getDestValue(joCenterURL2, "presCir.secretKey");
|
|
|
+ inf.PresCir.privateKey = JsonHelper.getDestValue(joCenterURL2, "presCir.privateKey");
|
|
|
+ inf.PresCir.publicKey = JsonHelper.getDestValue(joCenterURL2, "presCir.publicKey");
|
|
|
+ #endregion
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -232,6 +309,8 @@ namespace PTMedicalInsurance.Business
|
|
|
|
|
|
getInsuConfingue(out Global.insuConfig);
|
|
|
|
|
|
+ getLocalConfingue();
|
|
|
+
|
|
|
JObject joInparam = JObject.Parse(inParam);
|
|
|
|
|
|
JObject JoSession = JObject.Parse(JsonHelper.getDestValue(joInparam, "session[0]"));
|
|
|
@@ -1486,10 +1565,15 @@ namespace PTMedicalInsurance.Business
|
|
|
for (int i = 0; i < jaConvertedDiagnoses.Count; i++)
|
|
|
{
|
|
|
jaConvertedDiagnoses[i]["diag_srt_no"] = i + 1;
|
|
|
- if (jaConvertedDiagnoses[i]["maindiag_flag"].ToString() == "1")
|
|
|
+ string diaTypeCode = jaConvertedDiagnoses[i]["diaTypeCode"].ToString();
|
|
|
+ string maindiag_flag = jaConvertedDiagnoses[i]["maindiag_flag"].ToString();
|
|
|
+ string diag_type = jaConvertedDiagnoses[i]["diag_type"].ToString();
|
|
|
+
|
|
|
+ //取出院主诊断
|
|
|
+ if (diaTypeCode == "DIS" || maindiag_flag == "1" || diag_type == "1")
|
|
|
{
|
|
|
- dscg_maindiag_code = jaConvertedDiagnoses[i]["diag_code"].ToString();
|
|
|
- dscg_maindiag_name = jaConvertedDiagnoses[i]["diag_name"].ToString();
|
|
|
+ Global.pat.discDiagCode = dscg_maindiag_code = jaConvertedDiagnoses[i]["diag_code"].ToString();
|
|
|
+ Global.pat.discDiagName = dscg_maindiag_name = jaConvertedDiagnoses[i]["diag_name"].ToString();
|
|
|
}
|
|
|
//增加就诊ID
|
|
|
jaConvertedDiagnoses[i]["mdtrt_id"] = new JObject();
|
|
|
@@ -1636,6 +1720,9 @@ namespace PTMedicalInsurance.Business
|
|
|
joSetlInpar.Add("preselfpay_amt", JsonHelper.getDestValue(joSumFee, "data.PreSelfPayAmount"));
|
|
|
joSetlInpar.Add("dscgTime", Global.pat.hisDischargeTime);
|
|
|
|
|
|
+ joSetlInpar.Add("minpacunt_drug_trac_cnt", Global.Set.minpacunt_drug_trac_cnt); //本次结算应上传最小包装追溯码数量
|
|
|
+ joSetlInpar.Add("mcs_trac_cnt", Global.Set.mcs_trac_cnt); //本次结算应上传耗材追溯码数量
|
|
|
+
|
|
|
JObject joDataExp = new JObject();
|
|
|
joDataExp.Add("acct_payamt", "0.00");
|
|
|
joDataExp.Add("cla_trt_flag", "");
|
|
|
@@ -1815,6 +1902,8 @@ namespace PTMedicalInsurance.Business
|
|
|
joSetlInpar.Add("insutype", frmReg.insuType);//险种类型
|
|
|
joSetlInpar.Add("pub_hosp_rfom_flag", "");
|
|
|
joSetlInpar.Add("exp_content11", "");
|
|
|
+ joSetlInpar.Add("minpacunt_drug_trac_cnt", Global.Set.minpacunt_drug_trac_cnt); //本次结算应上传最小包装追溯码数量
|
|
|
+ joSetlInpar.Add("mcs_trac_cnt", Global.Set.mcs_trac_cnt); //本次结算应上传耗材追溯码数量
|
|
|
|
|
|
|
|
|
joReg.Add("mdtrtinfo", joMdtrtinfo);
|
|
|
@@ -2446,6 +2535,8 @@ namespace PTMedicalInsurance.Business
|
|
|
pat.recordID = JsonHelper.getDestValue(joInparam, "params[0].recordID");
|
|
|
pat.billID = JsonHelper.getDestValue(joInparam, "params[0].billID");
|
|
|
Global.pat.insuplc_admdvs = "";
|
|
|
+ Global.Set.minpacunt_drug_trac_cnt = JsonHelper.getDestValue(joInparam, "insuAdmObj.minpacunt_drug_trac_cnt");
|
|
|
+ Global.Set.mcs_trac_cnt = JsonHelper.getDestValue(joInparam, "insuAdmObj.mcs_trac_cnt");
|
|
|
if (string.IsNullOrEmpty(JsonHelper.getDestValue(joInparam, "insuAdmObj.inDays")))
|
|
|
{
|
|
|
Global.Set.hospitalizationsDays = 0;
|
|
|
@@ -2575,6 +2666,8 @@ namespace PTMedicalInsurance.Business
|
|
|
pat.name = JsonHelper.getDestValue(joInparam, "insuAdmObj.psn_name");
|
|
|
pat.billID = JsonHelper.getDestValue(joInparam, "params[0].billID");
|
|
|
pat.hisDischargeTime = Convert.ToDateTime(JsonHelper.getDestValue(joInparam, "insuAdmObj.disDateTime")).ToString("yyyy-MM-dd HH:mm:ss");
|
|
|
+ Global.Set.minpacunt_drug_trac_cnt = JsonHelper.getDestValue(joInparam, "insuAdmObj.minpacunt_drug_trac_cnt");
|
|
|
+ Global.Set.mcs_trac_cnt = JsonHelper.getDestValue(joInparam, "insuAdmObj.mcs_trac_cnt");
|
|
|
if (string.IsNullOrEmpty(JsonHelper.getDestValue(joInparam, "insuAdmObj.inDays")))
|
|
|
{
|
|
|
Global.Set.hospitalizationsDays = 0;
|
|
|
@@ -2886,6 +2979,17 @@ namespace PTMedicalInsurance.Business
|
|
|
return -1;
|
|
|
}
|
|
|
|
|
|
+ #region 【事中分析】
|
|
|
+ if (Global.curEvt.ext.isOpenAnalysis)
|
|
|
+ {
|
|
|
+ string outMsg;
|
|
|
+ if (InProcessAnalysis(out outMsg) != 0)
|
|
|
+ {
|
|
|
+ //outParam = "【3102】医保明细审核事中分析服务调用失败:" + outMsg;
|
|
|
+ //return -1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
|
|
|
//编码转换
|
|
|
if (mIS.convertSettlementWithInsuCode(jo2206Rtn, out outParam) != 0)
|
|
|
@@ -2989,6 +3093,18 @@ namespace PTMedicalInsurance.Business
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
|
+ #region 【事中分析】
|
|
|
+ if (Global.curEvt.ext.isOpenAnalysis)
|
|
|
+ {
|
|
|
+ string outMsg;
|
|
|
+ if (InProcessAnalysis(out outMsg) != 0)
|
|
|
+ {
|
|
|
+ outParam = "【3102】医保明细审核事中分析服务调用失败:" + outMsg;
|
|
|
+ //return -1;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
//调用服务获取门诊诊断信息
|
|
|
string diagnoses;
|
|
|
if (hIS.getPatDiagnoses(Global.pat, out diagnoses) != 0)
|